Template:HeroHeader: Difference between revisions

From The Largs to Largs Grand Tour
Jump to navigation Jump to search
No edit summary
No edit summary
Line 1: Line 1:
<noinclude>
<noinclude>
{{Documentation}}
{{Documentation}}
;Usage
;Usage
:<nowiki>{{HeroHeader|image=|alt=|caption=|link=|width=|imgwidth=}}</nowiki>
:<nowiki>{{HeroHeader|image=|alt=|caption=|link=|width=}}</nowiki>
 
;Parameters
;Parameters
:* image — File name only (e.g. 1918_camel_caravan.jpg)
:* image — File name only (e.g. 1918_camel_caravan.jpg)
Line 10: Line 8:
:* caption — Optional caption
:* caption — Optional caption
:* link — Optional link target
:* link — Optional link target
:* width — Container width (default 1200px; use 100% for full width)
:* width — Container width (default 100%)
:* imgwidth — Rendered image width (default 1600px). Must be px, not %.
</noinclude>
</noinclude>
<includeonly>
<includeonly>
<div style="
<div style="
Line 20: Line 16:
   border:1px solid #c8ccd1;
   border:1px solid #c8ccd1;
   background:#f8f9fa;
   background:#f8f9fa;
   width:{{{width|1200px}}};
   width:{{{width|100%}}};
   max-width:100%;
   max-width:100%;
   box-sizing:border-box;
   box-sizing:border-box;
  margin-left:auto;
  margin-right:auto;
">
">
 
<div class="hero-header-image" style="padding:0; margin:0; line-height:0;">
<div class="hero-header-image" style="padding:0; margin:0; line-height:0; text-align:center;">
[[File:{{{image|}}}|frameless|alt={{{alt|}}}|link={{{link|}}}]]
[[File:{{{image|}}}|{{{imgwidth|1600px}}}|center|frameless|alt={{{alt|}}}|link={{{link|}}}]]
</div>
</div>
{{#if:{{{caption|}}}|
{{#if:{{{caption|}}}|
<div style="padding:0.35em 0.6em; font-size:90%; line-height:1.35; color:#202122;">
<div style="padding:0.35em 0.6em; font-size:90%; line-height:1.35; color:#202122;">

Revision as of 04:31, 15 January 2026

Usage
{{HeroHeader|image=|alt=|caption=|link=|width=}}
Parameters
  • image — File name only (e.g. 1918_camel_caravan.jpg)
  • alt — Alternative text
  • caption — Optional caption
  • link — Optional link target
  • width — Container width (default 100%)