Jump to content

Template:Youtube thumbnail: Difference between revisions

From Insurer Brain
Content deleted Content added
No edit summary
No edit summary
Line 1: Line 1:
<includeonly><span class="yt-thumb" style="display:inline-block;vertical-align:top;margin:0 {{#if:{{{gapx|}}}|{{{gapx}}}|16px}} {{#if:{{{gapy|}}}|{{{gapy}}}|16px}} 0;width:{{{width|320}}}px;"><youtube width="{{{width|320}}}" height="{{{height|180}}}">{{{1}}}</youtube><span class="yt-caption" style="display:block;font-size:0.85em;line-height:1.35;margin-top:0.35em;">{{{caption|{{{2|}}}}}}</span></span></includeonly><noinclude>
<includeonly>
<span class="yt-thumb"
style="display:inline-block;vertical-align:top;
/* horizontal gap (right) + vertical gap (bottom) */
margin:0 {{#if:{{{gapx|}}}|{{{gapx}}}|16px}} {{#if:{{{gapy|}}}|{{{gapy}}}|16px}} 0;
/* set a fixed card width so the row can pack left→right */
width:{{{width|320}}}px;">
<!-- The video (works with Extension:YouTube and also with EmbedVideo's <youtube> tag) -->
<youtube width="{{{width|320}}}" height="{{{height|180}}}">{{{1}}}</youtube>
<!-- The caption -->
<span class="yt-caption"
style="display:block;font-size:0.85em;line-height:1.35;margin-top:0.35em;">
{{{caption|{{{2|}}}}}}
</span>
</span>
</includeonly>
<noinclude>
Usage:
Usage:
* {{YouTube thumbnail | VIDEO_ID | Caption here}}
* {{YouTube thumbnail | VIDEO_ID | Caption here}}

Revision as of 22:52, 16 October 2025

Usage: