Vorlage:Lead/GalleryItem: Unterschied zwischen den Versionen

Aus Offene Naturführer
Wechseln zu: Navigation, Suche
(Die Seite wurde neu angelegt: „<includeonly><table style="width:{{#Expr:{{{width}}}+4}}px; float:left; border-collapse:collapse; margin:0px;"> <tr><td style="height:{{#Expr:{{{height}}}+4}}px; ...“)
 
K ({{Trim}} => {{#if:trim-always}} (avoid template call); added image alt as caption to have Image viewer display that caption)
 
(12 dazwischenliegende Versionen von 3 Benutzern werden nicht angezeigt)
Zeile 1: Zeile 1:
<includeonly><table style="width:{{#Expr:{{{width}}}+4}}px; float:left; border-collapse:collapse; margin:0px;">
+
<includeonly><table style="width:{{#expr:{{{width}}}+4}}px; float:left; border-collapse:collapse; margin:0px;">
<tr><td style="height:{{#Expr:{{{height}}}+4}}px; border:none; border-width:0px; padding:0px;"><!--
+
<tr><td style="height:{{#expr:{{{height}}}+4}}px; border:none; border-width:0px; padding:0px;"><!--
TOPCELLCONTENT:-->[[{{Trim| {{{image|File:MissingImage.jpg}}} }} |link={{#If:{{{next|}}}|<!--then-->{{FULLPAGENAME}}#L{{#var:SingleAccessKeyID}}{{Trim| {{{next}}} }} |<!--else-->{{Lead/StripFormatting|1={{{result|}}} }} }}| center |{{{width}}}x{{{height}}}px|{{Trim| {{{caption|}}} }}]]</td></tr><!--
+
// TOPCELLCONTENT:-->[[{{#if:trim-always| {{{image|File:MissingImage.jpg}}} }} |center|{{{width}}}x{{{height}}}px|{{{caption}}}|alt={{{caption}}}]]</td></tr><!--
CAPTIONROW:--><tr style="vertical-align:top;"><td style="display:block; font-size:0.85em; height:{{#Expr:0.2+1.2*{{{lines|2}}}}}em; padding:0px;"><!--
+
// CAPTION ROW and DIV:--><tr style="vertical-align:top;"><td style="display:block; height:{{#expr:0.1+1.15*{{{lines|2}}}}}em; padding:0px;"><div style="height:{{#expr:0.1+1.15*{{{lines|2}}}}}em; width:{{#expr:{{{width}}}+7}}px; line-height:1.15em; text-align:center; padding:2px 3px 1px 3px; overflow-y:auto; margin:0px; border:none; border-width:0px;">{{
CAPTIONDIV:--><div style="height:{{#Expr:0.1+1.5*{{{lines|2}}}}}em; width:{{#Expr:{{{width}}}+7}}px; line-height:1.15em; text-align:center; padding-left:3px; padding-right:3px; padding-top:2px; padding-bottom:1px; overflow-y:auto; margin:0px; border:none; border-width:0px;"><!--
+
#if:{{{label}}}|'''{{{label}}}: '''}}{{{caption}}}</div>
CAPTIONCELL:-->[[File:Magnify-clip-tiny.png|right|link={{{image|File:MissingImage.jpg}}} |Metadata, copyright, and - if available - larger version]] {{Trim| {{{caption|}}} }}</div>
+
 
</td></tr></table></includeonly><noinclude>
 
</td></tr></table></includeonly><noinclude>
Note: Called by the Lead template, which guarantees that "width" and "height" parameters are always present.
+
Note: Called by the Lead template, which guarantees that "caption", "label" parameters are always present (although possibly empty), and "width" and "height" are actually filled with values. If called otherwise (not by Lead template), "width" and "height" must be given values, else the html table structure will break.
  
 
[[Category:Single-access key templates]]</noinclude>
 
[[Category:Single-access key templates]]</noinclude>

Aktuelle Version vom 26. Juni 2019, 12:53 Uhr

Note: Called by the Lead template, which guarantees that "caption", "label" parameters are always present (although possibly empty), and "width" and "height" are actually filled with values. If called otherwise (not by Lead template), "width" and "height" must be given values, else the html table structure will break.

Quelle: Offene Naturführer, Das Wiki zu Bestimmungsfragen: Vorlage:Lead/GalleryItem. Abgerufen am 2. Juni 2025, 04:54 von https://offene-naturfuehrer.de/web/Vorlage:Lead/GalleryItem