Difference between revisions of "Template:Example box"

From HPC Wiki
Jump to navigation Jump to search
m (Mukund-pondkule-6a11@uni-paderborn.de moved page Template to Template:Youtube)
Line 1: Line 1:
<includeonly>{{#tag:graph| {
+
<div class="thumb t{{{float|right}}}"><div class="thumbinner" style="width:{{{width|350}}};">{{Youtube|{{{1|I3yKmjMmo6M}}}|width={{{width|500}}}}}<div class="thumbcaption">{{{2|<noinclude>Caption goes here</noinclude>}}}</div></div></div><noinclude>
  "version": 2,
+
{{Doc begin}} Template embeds a YouTube video thumbnail.
  "height": {{{radius|100}}},
+
== Syntax ==
  "width": {{{radius|100}}},
+
Basic:
{{#ifeq: {{{legend|}}} | - |
+
<nowiki>{{youtube tn|YouTube id}}</nowiki>
| "legends": [{"title": "{{{legend|Legend}}}","fill": "color"}], }}
+
 
  "padding": "auto",
+
Caption:
  "marks": [
+
<nowiki>{{youtube tn|YouTube id|Caption}}</nowiki>
    {
+
 
      "properties": {
+
With all definable characters:
        "enter": {
+
<nowiki>{{youtube tn|YouTube id|Caption|width=value|float=alignment}}</nowiki>
          "innerRadius": {"value": {{{innerradius|0}}} },
+
 
          "stroke": {"value": "white"},
+
;YouTube Video Id: The YouTube video id of the video to include.
          "startAngle": {"field": "layout_start"},
+
;Width: Width of the video, in pixels. Height is automatically calculated. Default is 350px.
          "outerRadius": {"value": {{{radius|100}}} },
+
;Float: Horizontal direction video floats. Default is right.
          "endAngle": {"field": "layout_end"},
+
 
          "fill": {"field": "x","scale": "color"},
+
== See also ==
        }
+
* {{tl|Youtube}}
      },
+
 
      "from": {
+
[[Category:Formatting templates|Youtube]]
        "data": "table",
+
</noinclude>
        "transform": [{"field": "y","type": "pie"}]
 
      },
 
      "type": "arc"
 
    }
 
  ],
 
  "data": [
 
    {
 
      "name": "table", "values": {{{values| [
 
      {"x": "peaches","y": 100},
 
      {"x": "plums","y": 32},
 
      {"x": "blueberries","y": 180},
 
      {"x": "strawberries","y": 46},
 
      {"x": "bananas","y": 21}
 
    ] }}}
 
    }
 
  ],
 
  "scales": [
 
    {
 
      "name": "color",
 
      "range": {{{rangeliteral|"category10"}}},
 
      "domain": {"data": "table","field": "x"},
 
      "type": "ordinal"
 
    }
 
  ]
 
} }}</includeonly>
 

Revision as of 16:29, 16 September 2020

Note: I3yKmjMmo6M

Caption goes here

Documentation for Example box

Template embeds a YouTube video thumbnail.

Syntax

Basic:

{{youtube tn|YouTube id}}

Caption:

{{youtube tn|YouTube id|Caption}}

With all definable characters:

{{youtube tn|YouTube id|Caption|width=value|float=alignment}}
YouTube Video Id
The YouTube video id of the video to include.
Width
Width of the video, in pixels. Height is automatically calculated. Default is 350px.
Float
Horizontal direction video floats. Default is right.

See also