Jump to content

Template:Category Icons: Difference between revisions

From WikiPETia.info
Add break
Removed spaces, re-added comment
 
(33 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{ #tag: gallery
<!-- We want only 3 icons per line, therefore we need two loops -->{{ #vardefine: i | 1 }}{{ #vardefine: j | 1 }}{{ #while:
   | {{ #vardefine: i | 1 }}
  | {{{ {{ #var: i }} | }}}
     {{ #while:
   | {{ #vardefine: j | {{ #expr: {{ #var: j }} + 3 }} }}
       | {{{ {{ #var: i }} | }}}
     {{ #tag: gallery
      | File:Icon {{ #switch: {{{ {{ #var: i }} | }}}
       | {{ #while:
        | Bottle making = bottle.png{{!}}[[Bottle making]]
        | {{ #ifexpr: {{ #var: i }} < {{ #var: j }} | true }}
        | Filling = filling.png{{!}}[[Filling]]
        | <span style="display:none;">.</span>
        | Labelling = labeling.png{{!}}[[Labelling]]
          {{ #switch: {{{ {{ #var: i }} | }}}
            | Companies = File:Icon company.png{{!}}[[Companies]]
            | Events = File:Icon event.png{{!}}[[Events]]
            | People = File:Icon people.png{{!}}[[People]]
            | Material = File:Icon material.png{{!}}[[Material]]
            | Recycling = File:Icon recycling.png{{!}}[[PET recycling]]
            | Preforms = File:Icon preform.png{{!}}[[Preform production]]
            | Bottle making = File:Icon bottle.png{{!}}[[Bottle making]]
            | Filling = File:Icon filling.png{{!}}[[Filling]]
            | Capping = File:Icon capping.png{{!}}[[Capping]]
            | Labelling = File:Icon labeling.png{{!}}[[Labelling]]
          }}
          {{ #vardefine: i | {{ #expr: {{ #var: i }} + 1 }} }}
         }}
         }}
       {{ #vardefine: i | {{ #expr: {{ #var: i }} + 1 }} }}
       | mode = "packed-hover"
      <br>
     }}
     }}
  | mode = "packed-hover"
}}
}}

Latest revision as of 13:31, 30 March 2017