Difference between revisions of "Template:Lead/Inner"

From Species-ID
Jump to: navigation, search
m (1 revision)
m (from https://offene-naturfuehrer.de/w/index.php?title=Vorlage:Lead/Inner&oldid=66991)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<noinclude>Version 2.9: NEW: Nested subkey. See programming notes in Lead. Resultqualifier no longer in ()
+
<noinclude>'''See [[Template:Key Start/doc| Key Start-Doc]] for the main documentation, [[Template:Lead/doc| Lead-Doc]] for recent technical changes of the Lead-templates.'''
 
+
'''See [[Template:Key Start/doc| Key Start]] for the main documentation.'''
+
  
 
[[Category:Single-access key templates]]
 
[[Category:Single-access key templates]]
 +
</noinclude><includeonly><!--
 +
// PART 0. Semantic properties and hidden category for SMW forms
 +
-->{{#switch: {{CONTENTLANGUAGE}}<!--
 +
 +
// German: Deutschsprachige Attribute
 +
-->|de|de-formal=[[Category:Schlüssel mit Lead-Vorlage]]<!-- Hidden cat for SMW form!
 +
  -->{{
 +
  #if: {{{commonnames}}}|{{#arraymap: {{{commonnames}}}<!-- values
 +
    -->|,<!-- split on ,
 +
    -->|§<!-- assign temporary variable
 +
    -->|[[dwc:vernacularName::§| ]]<!-- output
 +
    -->|<!-- new output separator
 +
    -->}} }}{{ 
 +
  #if: {{{synonyms}}}|[[Synonymliste::{{StripFormatting |{{{synonyms}}}}}| ]]}}{{ 
 +
  #if: {{{scientificname}}}|[[dwc:scientificName::{{StripFormatting | {{{scientificname}}}}}| ]]}}<!--
 +
 +
// English properties
 +
-->| #default =[[Category:Keys based on lead template]]<!-- Hidden cat for SWM form!
 +
 +
// ! ENGLISH SEMANTIC PROPERTIES NOT YET DEFINED
  
</noinclude><includeonly><!--  
+
-->}}<!--  
// Creating additional space before starting a new couplet (but not between leads of the same couplet). Both this and truly unique id attributes on leads depend on "Extension:Variables" for saving the current couplet number to compare with previous to determine the position where a new couplet starts.-->{{
+
// PART 1. Spacer rows and subheadings above a lead row
#ifeq:{{{leadID}}}|{{#var:decisiontreePreviousCouplet}}<!--
+
-->{{#ifeq: {{{coupletID}}}|{{#var: decisiontreePreviousCouplet}}<!--
THEN 2nd lead or later:-->|{{#vardefine:decisiontreeAlternative|{{
+
// THEN 2nd/3rd/etc lead in a couplet, normal start
    #expr:{{#var:decisiontreeAlternative}}+1}}
+
-->|{{#vardefine: decisiontreeAlternative|{{#expr: {{#var: decisiontreeAlternative}}+1}}}}<!--
    }}<tr id="L{{{keyID}}}_{{{leadID}}}_{{#var:decisiontreeAlternative}}_row" class="dt-row">{{
+
  --><tr id="{{{IDprefix}}}{{{coupletID}}}_{{#var:decisiontreeAlternative}}_row" class="dt-row">{{
#if:{{{parentlead}}}|<!--then insert two columns--><td></td><td></td>
+
      #if:{{{parentlead}}}<!-- THEN: indent 2 columns -->|<td></td><td></td>}}
}}<td class="dt-nodeid">{{{displayID}}}</td><!--
+
      <td <!-- (td is filled and closed at end!)
ELSE first lead:-->|{{#vardefine:decisiontreePreviousCouplet|{{{leadID}}} }}{{#vardefine:decisiontreeAlternative|1}}{{
+
// ELSE first lead; suppress spacer row for first couplet of key or nested subkeys
#if:{{{parentlead}}}||<!--else: insert spacer row except for nested subkey rows-->
+
-->|{{#if: {{#ifeq: 0|{{#var: decisiontreePreviousCouplet}}|FIRSTCOUPLET|{{{parentlead}}}}}<!--
<tr class="dt-hspacer"><td colspan="6"></td></tr>}}{{
+
    -->|<!-- THEN nothing
#if: {{{subheading}}}|
+
    // ELSE: insert spacer row
<tr class="dt-subheading"><td colspan="6" style="font-weight:bold;padding:0.5em 0.75em 0.3em 0.75em; {{
+
    -->|<tr class="dt-hspacer"><td colspan="6"></td></tr><!--
#switch: {{lc:{{{subheadingstyle}}}}}
+
    -->}}{{
|<!-- empty style parameter = next swwitch option = orange:-->
+
  #vardefine: decisiontreePreviousCouplet|{{{coupletID}}}}}{{
| orange    = background-color:#FCFFEC; border:1px solid #ffc51a;
+
  #vardefine: decisiontreeAlternative|1}}{{
| green    = background-color:#e5febe; border:1px solid #c5de9e;
+
  #if: {{{subheading}}}<!--
<!-- | pink = background-color:#FCECFF; border:1px solid #c51aff; -->
+
    -->|<tr class="dt-subheading"><!--
| bigorange = background-color:#FCFFEC; border:2px solid #ffc51a; font-size:120%;
+
    -->{{#if:{{{parentlead}}}<!--
| biggreen  = background-color:#e5febe; border:2px solid #c5de9e; font-size:120%;
+
      then: indent 2 columns -->|<td></td><td></td><td colspan="4" <!--
| simple    =
+
      else: full six columns -->|<td colspan="6" }} style="font-weight:bold;padding:0.5em 0.75em 0.3em 0.75em; {{
| #default  = {{{subheadingstyle}}}
+
    #switch: {{lc:{{{subheadingstyle}}}}}
}}">{{{subheading}}}</td></tr>
+
      |<!-- empty style parameter next option=orange:-->
<tr class="dt-hspacer"><td></td></tr><!--  
+
      | orange    = background-color:#FCFFEC; border:1px solid #ffc51a;
// END if subheading.
+
      | green    = background-color:#e5febe; border:1px solid #c5de9e;
// Next column is lead id. However, if parentlead is filled, it is indented 2 columns (and the normal colspan=3 in 3rd col. is removed)
+
      | bigorange = background-color:#FCFFEC; border:2px solid #ffc51a; font-size:120%;
-->}}<tr id="L{{{keyID}}}_{{{leadID}}}_row" class="dt-row">{{
+
      | biggreen  = background-color:#e5febe; border:2px solid #c5de9e; font-size:120%;
#if:{{{parentlead}}}|<!--then insert two columns--><td></td><td></td>
+
      | simple    =
}}<td id="L{{{keyID}}}_{{{leadID}}}" class="dt-nodeid">{{{displayID}}}</td>
+
      | #default  = {{{subheadingstyle}}}
}}<!--  
+
      }}">{{{subheading}}}</td><!--
 +
  --></tr><!--
 +
  --><tr class="dt-hspacer"><td colspan="6"></td></tr><!--
 +
  // END subheading:
 +
  -->}}<!--
 +
  // Next column is lead id for first alternative.
 +
  --><tr id="{{{IDprefix}}}{{{coupletID}}}_row" class="dt-row">{{
 +
    #if:{{{parentlead}}}<!-- THEN: indent 2 columns -->|<td></td><td></td>}}
 +
    <td id="{{{IDprefix}}}{{{coupletID}}}" <!-- (td is filled and closed at end!)
 +
// END PART 1, Spacer rows and subheadings above a lead row
 +
-->}} class="dt-nodeid">{{#ifeq:{{{withinCoupletID}}}|–|–|{{{coupletID}}}}}</td><!--
  
// Second column contains either backlink or lead-differentiators (*, ', -, etc.); if neither is present: output empty column:
+
// PART 2. Prepare lead core.
--><td class="leadalt">{{{leadpart2}}}</td><!--
+
// 2nd column contains either withinCoupletID = lead-differentiators (*, ', -, etc.) or backlink previous couplet. Both may be empty!
 +
--><td class="leadalt">{{
 +
#ifeq:{{{withinCoupletID}}}|–||{{{withinCoupletID}}}}}{{
 +
#if:{{{leadIDbacklink}}}|&nbsp;[[#{{{IDprefix}}}{{{leadIDbacklink}}}|({{{leadIDbacklink}}})]]}}</td><!--
  
// Next column is the main statement text plus the result. To make distribution of columns variable row-by-row, this uses a nested inner table:
+
// 3rd column is main statement text. Uses a nested table to allow for row-by-row variable col. width
--><td class="lead-row1" {{#if:{{{parentlead}}}||<!--else-->colspan="3"}}><table class="nested {{#if: {{{detailtext}}}{{{image m}}}<!--make table collapsible if EXTRA txt/imgs exist:-->|<nowiki> </nowiki>collapsible collapsed}}" width="100%" cellspacing="0" cellpadding="0"><tr>
+
--><td class="lead-row1" {{#if: {{{parentlead}}}|style="width:95%;"<!-- needed on table-layout: fixed -->|colspan="3"}}><!--
<th class="leadtxt" {{#ifexpr:{{#len:{{{next}}}{{{resultlink}}} }} < 5 |width="95%"}}><span class="leadspan">{{Trim|1={{{statement}}}}}&nbsp;</span></th><!--
+
  --><table class="nested" style="width:100%;" cellspacing="0" cellpadding="0"><tr><!--
 +
    --><td class="leadtxt {{#if:{{{next}}}|leadon}}" style="width:95%;" ><!--
 +
    --><span class="leadspan">{{Trim|1={{{statement}}}}}&nbsp;</span><!--
 +
    // Add mw-collapsible span (the "more…")
 +
    -->{{#if: {{{detailspresent|}}}|<span class="leadspan noprint {{#replace:{{ANCHORENCODE:mw-customtoggle-{{{IDprefix}}}{{{coupletID}}}_{{#var:decisiontreeAlternative}}}}|.|dot}}row"></span>}}<!--
 +
    --></td><!--
 +
    // Second column in nested table = number of further leads. NEW: both with and without result in same row (it used to be below result)!
 +
    // Single triangle for normal next, double triangle if also result occurs (result and continue), e.g. where a genus is result, but species in same key.
 +
    -->{{#if:{{{next|}}}<!-- fixed width 5%
 +
then -->|<td class="leadresult leadon" style="width:5%;"><span class="leadon">&nbsp;[[#{{{IDprefix}}}{{{next}}}|&nbsp;►<!--
 +
      -->{{#if:{{{resulttext}}}|►}}&nbsp;{{{next}}}]]</span><!--
 +
      --></td><!--
 +
else -->|<td style="width:5%;"></td>}}{{
 +
    #if:{{{resulttext}}}{{{nested}}}<!--
 +
    // THEN New-Row-For-Results. Leaderdots for next, but not if also result is present!
 +
    -->|</tr><tr><td class="leadresult {{#if: {{{next}}} |{{#if: {{{resulttext}}}{{{commonnames}}} | |leadon}}}}" style="width:100%;" colspan="2"><!--
 +
    // FIRST NESTED (= pointer to indented subkey with parentlead) in addition to result, all result-layout variants
 +
    -->{{#if:{{{nested}}}<!--
 +
      -->|<span class="leadon">&nbsp;[[#{{{IDprefix}}}{{{coupletID}}}{{{withinCoupletID}}}{{{nested}}}|&nbsp;▼▼&nbsp;{{{nested}}}]]&nbsp;&nbsp;&ndash;&nbsp;&nbsp;</span><!--
 +
    // END if nested:
 +
    -->}}<!--
  
// Next column is a pointer to further leads and/or to a taxon/subkey result; both will be autolinked.
+
    // BACKGROUND OLD/NEW RESULTSTYLE:
// "commonnames" is handled here as separate parameter to increase re-formatting options later on.
+
    // The original ("old") style interprets result as either free of scientific name
-->{{#if:{{{resulttext}}}<!-- RESULT is present; format as page link (to wiki taxon page or a dedicated subkey page):
+
    //  (and it does not know which is which), and adds the common name in front.
  THEN-->|<td class="leadresult">{{
+
    // The new format should be able to either show free-form result text (common/scientific
    #if: {{{commonnames}}}<!--(Note: no-wrap does not works because commonnames can be multiple and long; replace function makes blank to nbsp but reverts at commas; <nowiki> </nowiki> and &#32; are ways to create a blank that is not trimmed; nowiki works better in find, &#32; may word better in replace. ATTENTION: this is sensitive code, it still behaves slightly strange but alternatives did not work at all. Also: replacing with spans to have no-wrap and wrappable spans does not work in mw 1.16, spans are "sanitized"!)
+
    //  name may be present, but are not shown) or directly common and scientific name.
    THEN-->|<span class="commonnames">&nbsp;&nbsp;&nbsp;{{#replace:{{#replace:{{#replace:{{{commonnames}}}|,<nowiki> </nowiki>|,§§}}|<nowiki> </nowiki>|&nbsp;}}|§§|&#32;}}{{#if:{{{image a}}}<!-- use br if side-bar images present, else blank:-->|<br />|<nowiki> </nowiki>}}</span><!--
+
    // See also schema at bottom of Template:Lead/doc
     END if commonnames -->}}<span class="leadout{{#ifexpr:{{#len:{{{resultlink}}} }} < 32|<nowiki> </nowiki>nowrap}}">&nbsp;&nbsp;&nbsp;[[{{{resultlink}}}|{{{resulttext}}}]]{{#if: {{{resultqualifier}}}<!--then-->|{{#if:{{{image a}}}<!-- use br if side-bar images present, else blank:-->|<br />|<nowiki> </nowiki>}}<span class="resultqualifier">{{{resultqualifier}}}</span><!--end res.qual.-->}}</span>{{
+
    // TODO: introduce resultformat parameter later (= list of format options, allowing common name or scientific name to be first)
    #if:{{{next}}}<!-- NEXT-LEAD-POINTER in addition to "resultlink":
+
    // Now using {{#var: OtherNames}} = the gray name, presently the common name, optionally later a different one.
     // (result+next-lead co-occur, e.g., for species-result where key continues with subspecies. Always new line, double arrow:)
+
    -->{{#if: {{{resulttextoverride}}}<!--  
    THEN-->|<br /><span class="leadon">&nbsp;[[#L{{{keyID}}}_{{{parentlead}}}{{{next}}}|&nbsp;►►&nbsp;{{{next}}}]]</span><!--
+
      // If scientificname exists then NEW STYLE → ignore commonnames+scientificname if resulttextoverride, ELSE OLD STYLE:-> output common names even for resulttextoverride
     ELSE IF nested-->|{{#if:{{{nested}}}<!--
+
      -->|{{#if: {{{scientificname}}}|{{#vardefine: OtherNames|}}|{{#vardefine: OtherNames|{{{commonnames}}}<!---->}}<!---->}}<!-- // END if scientificname
    THEN-->|<br /><span class="leadon">&nbsp;[[#L{{{keyID}}}_{{{leadID}}}{{{nested}}}|&nbsp;▼▼&nbsp;{{{nested}}}]]</span><!--
+
    // ELSE: no resulttextoverride, output commonnames for both OLD and NEW LAYOUT
     END of both next / nested lead inside result -->}}}}</td><!--
+
      -->|{{#vardefine: OtherNames|{{{commonnames}}}<!---->}}<!--
  // Normal NEXT-LEAD-POINTER (without result); format as internal link:
+
     // END resulttextoverride:
  ELSE-->|<td class="leadresult"><span class="leadon">&nbsp;[[#L{{{keyID}}}_{{{parentlead|}}}{{{next}}}|&nbsp;►&nbsp;{{{next}}}]]</span></td><!--
+
    -->}}<!-- // END NEW/OLD: rest is identical
  End if result or next-lead -->}}</tr>
+
    // Output the OtherNames variable if filled. No additional space after ndash!
<!--  
+
    //  ##DEBUG## ABOVE WAS: {{#if: {{{resulttext}}} |&nbsp;&ndash;|&#32;}}</span> // OK WITHOUT?
 +
    -->{{#if: {{#var: OtherNames}}<!--
 +
        -->|<span class="commonnames">&nbsp;{{Lead/MakeCommaBreakingList | listtext={{#var:OtherNames}} }}&nbsp;&nbsp;&ndash;</span><!--  
 +
      -->}}<!--
 +
     // Now resulttext = one of resulttextoverride, scientificname, or resultlink itself.
 +
    // resulttext and qualifier need white background and (if together <40 char) a common nowrap:
 +
  --><span class="leadresults {{#ifexpr:{{#len:{{{resulttext}}}{{{resultqualifier}}} }} < 40|nowrap}}"><!--
 +
     --><span class="leadout {{#ifexpr:{{#len:{{{resulttext}}} }} < 40|nowrap}}">&nbsp;&nbsp;{{
 +
    #ifeq: {{#sub: {{{resultlink}}}|0|5}}|http:<!--
 +
    // THEN http-link:
 +
    -->|[{{{resultlink}}} {{{resulttext}}}]<!--
 +
     // ELSE wiki link or result-text-only (non-link).
 +
    -->|{{#if: {{{resultlink}}}<!--
 +
      // THEN
 +
        -->|[[{{{resultlink}}}|{{{resulttext}}}]]<!--
 +
      // ELSE unlinked
 +
        -->|{{{resulttext}}}<!--
 +
      // END resultlink
 +
      -->}}<!--
 +
    // END (if http-link)
 +
    -->}}</span><!-- close span.leadout. Span.leadresults will be closed after result qualifier!
  
// ADDITIONAL info below the statement/result line:
+
    // resultqualifier in all result-layout variants
// ERROR REPORTING: Any content in 4th and later unnamed parameters is an error.-->{{  
+
    -->{{#if: {{{resultqualifier}}}<!--
#if: {{{errors}}}|<tr><th colspan="2" class="leaderror">{{{errors}}}</th></tr><!--
+
      // THEN (start with wrappable blank, NOT a br-if-image-sidebar present: res.qual. may just be "L.")
end:-->}}<!--
+
      -->|<nowiki></nowiki> <span class="resultqualifier {{#ifexpr:{{#len:{{{resultqualifier}}} }} < 40|nowrap}}"> {{{resultqualifier}}}</span><!--
 +
    // END (res.qual.), + closing span.leadresults (= nowrap-span around result+qualif.)
 +
    -->}}</span><!--  
 +
    --></td><!--
 +
 
 +
  // END New-Row-For-Results
 +
  -->}}</tr><!--
  
// START EXTRA INFO and IMAGES:  
+
// PART 4. ADDITIONAL = error, detailtext, image gallery m-r
// Extra text and images from the optional parameters: "synonyms", "description", "occurrence", "remarks" are already combined to detailtext here. "image m/caption m" to "image r/caption r" are tested. For wrappable gallery images are below detailtext -->{{
+
// 4 a) ERROR REPORTING: Any content in 4th and later unnamed parameters is an error.
#if: {{{detailtext}}}{{{image m}}}<!--
+
-->{{#if: {{{errors}}}<!--
THEN-->|<tr><td class="leadextras" colspan="2"><div class="leadextras">{{{detailtext}}}{{
+
-->|<tr><td class="leaderror" colspan="2">{{{errors}}}</td></tr><!--
  #if: {{{image m}}}<!--  
+
-->}}<!--
  // at least 1 extra image present, after extra text or alone: START Secondary-IMAGE CONTENT
+
// 4 b) START EXTRA INFO and IMAGES:
   // The wrapping table around float-left tables is necessary, with nothing or a div the outer div will not be around, and the lines not displayed
+
// Extra text and images from the optional parameters: detailtext = synonyms + description +
   THEN-->|<table><tr><td><!--
+
// occurrence + remarks; already combined in outer Lead template!
-->{{#if: {{{image m}}}|{{Lead/GalleryItem|image={{{image m}}}|caption={{{caption m}}}|label={{{label m}}}|width={{{image m width}}}|height={{{image m height}}}|lines={{{captionlines}}}}}}}<!--
+
// Wrappable gallery image m/caption m" to "image r/caption r" output below detailtext
-->{{#if: {{{image n}}}|{{Lead/GalleryItem|image={{{image n}}}|caption={{{caption n}}}|label={{{label n}}}|width={{{image n width}}}|height={{{image n height}}}|lines={{{captionlines}}}}}}}<!--
+
-->{{#if: {{{detailspresent|}}}<!--
-->{{#if: {{{image o}}}|{{Lead/GalleryItem|image={{{image o}}}|caption={{{caption o}}}|label={{{label o}}}|width={{{image o width}}}|height={{{image o height}}}|lines={{{captionlines}}}}}}}<!--
+
// THEN  
-->{{#if: {{{image p}}}|{{Lead/GalleryItem|image={{{image p}}}|caption={{{caption p}}}|label={{{label p}}}|width={{{image p width}}}|height={{{image p height}}}|lines={{{captionlines}}}}}}}<!--
+
-->|<tr><td class="leadextras" colspan="2"><!--
-->{{#if: {{{image q}}}|{{Lead/GalleryItem|image={{{image q}}}|caption={{{caption q}}}|label={{{label q}}}|width={{{image q width}}}|height={{{image q height}}}|lines={{{captionlines}}}}}}}<!--
+
--><div class="mw-collapsible mw-collapsed mw-collapsible-content leadextras" id="{{#replace:{{ANCHORENCODE:mw-customcollapsible-{{{IDprefix}}}{{{coupletID}}}_{{#var:decisiontreeAlternative}}}}|.|dot}}row"><!--
-->{{#if: {{{image r}}}|{{Lead/GalleryItem|image={{{image r}}}|caption={{{caption r}}}|label={{{label r}}}|width={{{image r width}}}|height={{{image r height}}}|lines={{{captionlines}}}}}}}<!--
+
-->{{{detailtext}}}<!--
--></td></tr>{{#if:{{{imagesfooter}}}|<tr><td colspan="10" style="text-align:right; font-size:80%; line-height:1em;">{{{imagesfooter}}}</td></tr>}}</table><!--
+
-->{{#if: {{{image m}}}<!--
  // END if any images-->}}</div></td></tr><!--
+
// THEN at least 1 extra image present, after detailtext or alone:
// END if any extra text or image info in a second row: -->}}<!--  
+
  // 4 c: START Secondary-IMAGE-Gallery
// END of "nested" inner table-->
+
   // The nested wrapping table around left-floating tables is necessary, without or with a div
</table>{{
+
  // the images will not be contained in the outer div and the lines not displayed
#if:{{{image j}}}{{{image k}}}<!--  
+
   -->|<table><tr><td>{{
 +
  #if: {{{image m}}}|{{Lead/GalleryItem|image={{{image m}}}|caption={{{caption m}}}|label={{{label m}}}|width={{Pixel2Number|{{{image m width}}}}}|height={{Pixel2Number|{{{image m height}}}}}|lines={{{captionlines}}}}}}}{{
 +
  #if: {{{image n}}}|{{Lead/GalleryItem|image={{{image n}}}|caption={{{caption n}}}|label={{{label n}}}|width={{Pixel2Number|{{{image n width}}}}}|height={{Pixel2Number|{{{image n height}}}}}|lines={{{captionlines}}}}}}}{{
 +
  #if: {{{image o}}}|{{Lead/GalleryItem|image={{{image o}}}|caption={{{caption o}}}|label={{{label o}}}|width={{Pixel2Number|{{{image o width}}}}}|height={{Pixel2Number|{{{image o height}}}}}|lines={{{captionlines}}}}}}}{{
 +
  #if: {{{image p}}}|{{Lead/GalleryItem|image={{{image p}}}|caption={{{caption p}}}|label={{{label p}}}|width={{Pixel2Number|{{{image p width}}}}}|height={{Pixel2Number|{{{image p height}}}}}|lines={{{captionlines}}}}}}}{{
 +
  #if: {{{image q}}}|{{Lead/GalleryItem|image={{{image q}}}|caption={{{caption q}}}|label={{{label q}}}|width={{Pixel2Number|{{{image q width}}}}}|height={{Pixel2Number|{{{image q height}}}}}|lines={{{captionlines}}}}}}}{{
 +
  #if: {{{image r}}}|{{Lead/GalleryItem|image={{{image r}}}|caption={{{caption r}}}|label={{{label r}}}|width={{Pixel2Number|{{{image r width}}}}}|height={{Pixel2Number|{{{image r height}}}}}|lines={{{captionlines}}}}}}}<!--
 +
  --></td></tr><!--
 +
  -->{{#if:{{{imagesfooter}}}<!--
 +
    -->|<tr><td colspan="10" style="text-align:right; font-size:80%; line-height:1em;">{{{imagesfooter}}}</td></tr><!--
 +
  -->}}<!--
 +
  --></table><!--
 +
// END 4 c: END Secondary-IMAGE-Gallery
 +
-->}}</div></td></tr><!-- div = end mw-collapsible
 +
// END 4. ADDITIONAL error, detailtext or image gallery (m-r)
 +
-->}}<!--
 +
// END of "nested" inner table
 +
--></table><!--
  
// At least one larger, non-hide-able image below (image j/k):
+
// PART 5: Large, always-visibly image j/k (not collapsed) below lead statement and result:
  THEN-->|<table class="nested"><tr style="vertical-align:top;">{{
+
-->{{#if:{{{image j}}}{{{image k}}}<!--
#if:{{{image j}}}|<td style="padding:1em 1em 1em 0">[[{{Trim| {{{image j|File:MissingImage.jpg}}} }} |center|{{{image j width}}}x{{{image j height}}}px]]<br />{{#if:{{{label j}}}|'''{{{label j}}}: '''}}{{{caption j}}}</td>}}{{
+
-->|<table class="nested"><tr style="vertical-align:top;"><td><!--
#if:{{{image k}}}|<td style="padding:1em 1em 0 1em">[[{{Trim| {{{image k|File:MissingImage.jpg}}} }} |center|{{{image k width}}}x{{{image k height}}}px]]<br />{{#if:{{{label k}}}|'''{{{label k}}}: '''}}{{{caption k}}}</td>}}
+
-->{{#if: {{{image j}}}<!--
</tr></table><!-- end always-on image below:
+
  -->|<div style="padding:0em 0.5em 1em 0;float:left;width:{{#expr: {{Pixel2Number|{{{image j width}}}}}+15}}px;">[[{{Trim| {{{image j}}} }} |none|{{Pixel2Number|{{{image j width}}}}}x{{Pixel2Number|{{{image j height}}}}}px]]<!--
-->}}</td><td>{{
+
    -->{{#if: {{{label j}}}|'''{{{label j}}}: '''}}{{{caption j}}}<!--
#if: {{{image a}}}<!-- At least 1 sidebar image present (else empty td created):
+
    --></div><!--
 +
-->}}<!--
 +
-->{{#if: {{{image k}}}<!--
 +
  -->|<div style="padding:0em 0.5em 1em 0;float:left;width:{{#expr: {{Pixel2Number|{{{image j width}}}}}+15}}px;">[[{{Trim| {{{image k}}} }} |none|{{Pixel2Number|{{{image k width}}}}}x{{Pixel2Number|{{{image k height}}}}}px]]<!--
 +
    -->{{#if: {{{label k}}}|'''{{{label k}}}: '''}}{{{caption k}}}<!--
 +
    --></div><!--
 +
-->}}<!--
 +
  --></td></tr><!--
 +
--></table><!--
 +
// END PART 5: Always-on images (image j/k)
 +
-->}}<!--
 +
--></td><td><!--
  
// START RIGHT SIDEBAR IMAGE CONTENT,
+
// PART 6: Right Sidebar Images
// up to 5 images, non-wrapping, Lead/GalleryItemNoCaption creates td!
+
-->{{#if: {{{image a}}}<!-- at least 1st present (else empty td created):
// image a - e,  caption a - e
+
// Up to 5 images, non-wrapping, always visible but smaller than image m-r
// image a - e width, primary images width (for all)
+
// image a-e,  caption a-e, image a-e width, primary images width and image
// image a - e height, primary images height (for all)
+
// a-e height, primary images height (both for all images)
THEN-->|<table style="border:none; margin-top:0.1em;margin-left:1em;"><tr><!--
+
// Lead/GalleryItemNoCaption creates td!
-->{{#if: {{{image a}}}|{{Lead/GalleryItemNoCaption|image={{{image a}}}|caption={{{caption a}}}|label={{{label a}}}|width={{{image a width}}}|height={{{image a height}}}}}}}<!--
+
THEN-->|<table style="border:none; margin-top:0.1em;margin-left:1em;"><tr>{{
-->{{#if: {{{image b}}}|{{Lead/GalleryItemNoCaption|image={{{image b}}}|caption={{{caption b}}}|label={{{label b}}}|width={{{image b width}}}|height={{{image b height}}}}}}}<!--
+
#if: {{{image a}}}|{{Lead/GalleryItemNoCaption|image={{{image a}}}|caption={{{caption a}}}|label={{{label a}}}|width={{Pixel2Number|{{{image a width}}}}}|height={{Pixel2Number|{{{image a height}}}}}}}}}{{
-->{{#if: {{{image c}}}|{{Lead/GalleryItemNoCaption|image={{{image c}}}|caption={{{caption c}}}|label={{{label c}}}|width={{{image c width}}}|height={{{image c height}}}}}}}<!--
+
#if: {{{image b}}}|{{Lead/GalleryItemNoCaption|image={{{image b}}}|caption={{{caption b}}}|label={{{label b}}}|width={{Pixel2Number|{{{image b width}}}}}|height={{Pixel2Number|{{{image b height}}}}}}}}}{{
-->{{#if: {{{image d}}}|{{Lead/GalleryItemNoCaption|image={{{image d}}}|caption={{{caption d}}}|label={{{label d}}}|width={{{image d width}}}|height={{{image d height}}}}}}}<!--
+
#if: {{{image c}}}|{{Lead/GalleryItemNoCaption|image={{{image c}}}|caption={{{caption c}}}|label={{{label c}}}|width={{Pixel2Number|{{{image c width}}}}}|height={{Pixel2Number|{{{image c height}}}}}}}}}{{
-->{{#if: {{{image e}}}|{{Lead/GalleryItemNoCaption|image={{{image e}}}|caption={{{caption e}}}|label={{{label e}}}|width={{{image e width}}}|height={{{image e height}}}}}}}<!--
+
#if: {{{image d}}}|{{Lead/GalleryItemNoCaption|image={{{image d}}}|caption={{{caption d}}}|label={{{label d}}}|width={{Pixel2Number|{{{image d width}}}}}|height={{Pixel2Number|{{{image d height}}}}}}}}}{{
--></tr></table>
+
#if: {{{image e}}}|{{Lead/GalleryItemNoCaption|image={{{image e}}}|caption={{{caption e}}}|label={{{label e}}}|width={{Pixel2Number|{{{image e width}}}}}|height={{Pixel2Number|{{{image e height}}}}}}}}}<!--
}}</td></tr></includeonly>
+
--></tr></table><!--
 +
// END PART 6: Right Sidebar Images
 +
-->}}</td></tr></includeonly>

Latest revision as of 10:17, 14 August 2017

See Key Start-Doc for the main documentation, Lead-Doc for recent technical changes of the Lead-templates.