Difference between revisions of "Template:Note"

From HPC Wiki
Jump to navigation Jump to search
Line 1: Line 1:
<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>
+
<div class="youtubebox ratio-{{{ratio|16x9}}} hd-{{#if:{{{hd|{{{audio|}}}}}}|on|off}} widths-{{{widths|{{{width|512}}}}}} {{#if:{{{audio|}}}|youtube-audio|}}" style="margin:0.75em 0em;">
{{Doc begin}} Template embeds a YouTube video thumbnail.
+
{{#if: {{{align|}}}|{{#ev:youtube|{{{1|tax4e4hBBZc}}}|{{{width|512}}}|{{{align}}}}}|{{#ev:youtube|{{{1|tax4e4hBBZc}}}|{{{width|512}}}}}}}{{#if:{{{2|<noinclude>yes</noinclude>}}}
== Syntax ==
+
| <br /><div style="margin-top:0.75em;">{{hatnote|1={{{2|Caption here.}}}}}</div>
Basic:
+
}}</div><noinclude>{{Doc begin}}
<nowiki>{{youtube tn|YouTube id}}</nowiki>
 
  
Caption:
+
This template will embed a video inside an article.
<nowiki>{{youtube tn|YouTube id|Caption}}</nowiki>
 
  
With all definable characters:
+
=== Syntax ===
  <nowiki>{{youtube tn|YouTube id|Caption|width=value|float=alignment}}</nowiki>
+
Basic:
 +
  <nowiki>{{youtube|YouTube id}}</nowiki>
  
;YouTube Video Id: The YouTube video id of the video to include.
+
With a defined thumbnail width:
;Width: Width of the video, in pixels. Height is automatically calculated. Default is 350px.
+
<nowiki>{{youtube|YouTube id|width=value|align=alignment}}</nowiki>
;Float: Horizontal direction video floats. Default is right.
 
  
== See also ==
+
;YouTube Video ID: The YouTube video id of the video to include.
* {{tl|Youtube}}
+
;{{code|width}}: Width of the video, in pixels. Height is calculated based on ratio. Default is 512px.
 +
;{{code|widths}}: If specified, must be a list of hyphen-separated integers representing possible video widths (Example: <code>460-500-700</code>). The video size will be based on the browser window size and the ratio of the video. If left unspecified, the video will stay at the value of the <code>width</code> attribute.
 +
;{{code|align}}: Horizontal alignment of video. Default is left.
 +
;{{code|ratio}}: Ratio of embedded video, with <code>x</code> as separator (Example: <code>4x3</code>). Default is <code>16x9</code>.
 +
;{{code|hd}}: Whether HD should be turned on or off by default. Default is to let YouTube decide. YouTube users may override this value in their YouTube preferences.  This parameter can be set to {{code|on}} or {{code|off}}.
 +
;{{code|audio}}: Whether this video should be presented as an audio file (display only the seek bar, no video).  This parameter can be set to {{code|on}} or {{code|off}}.
  
[[Category:Formatting templates|Youtube]]
+
=== See also ===
</noinclude>
+
* {{tl|youtube tn}}

Revision as of 17:06, 16 September 2020

{{#ev:youtube|tax4e4hBBZc|512}}

Documentation for Note


This template will embed a video inside an article.

Syntax

Basic:

{{youtube|YouTube id}}

With a defined thumbnail width:

{{youtube|YouTube id|width=value|align=alignment}}
YouTube Video ID
The YouTube video id of the video to include.
Template:Code
Width of the video, in pixels. Height is calculated based on ratio. Default is 512px.
Template:Code
If specified, must be a list of hyphen-separated integers representing possible video widths (Example: 460-500-700). The video size will be based on the browser window size and the ratio of the video. If left unspecified, the video will stay at the value of the width attribute.
Template:Code
Horizontal alignment of video. Default is left.
Template:Code
Ratio of embedded video, with x as separator (Example: 4x3). Default is 16x9.
Template:Code
Whether HD should be turned on or off by default. Default is to let YouTube decide. YouTube users may override this value in their YouTube preferences. This parameter can be set to Template:Code or Template:Code.
Template:Code
Whether this video should be presented as an audio file (display only the seek bar, no video). This parameter can be set to Template:Code or Template:Code.

See also