Template:Icon
| Base = Base | Calc = Calc | Draw = Draw | Impress = Impress | Math = Math | Writer = Writer | Book | Livre | Wiki = Book | Edit
}}.png|{{{3}}}px]]This template use the #switch function of the ParserFunctions extension.
General syntax is : <div style="{{{Position}}}">[[Image:{{{1}}}.png|{{{3}}}px]]</div>
For parameter 2 (position) only values 1 & 3 actually works. Valid expressions Left Right Unvalid expressions Center Middle Top Bottom
I see no reason for that I couldn't work. So you can :
- Help me.
- Be patient.
- Explain briefly why I could never be valid. or make me discover another existing simple syntax for this possibility.
Help
This template use three (numbered=default) parameters :
- 1. Module
- Seven values available
- Displayed below. To permit another icon it need to be registered in this template.
- 2. Position
Nine values from 1 to 9
|
|
- 3. Size in pixels
- Optional, thus in third position. Max size if ignored.
- Examples in table cells
2nd Parameter: Position. Mapping : | An example of call with Calc : | No template called here : | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
{{Icon|Calc|3|40}} |
The result is now a 40 pixels floating Calc icon, at the top right of the cell... The result is now a 40 pixels floating Calc icon, at the top right... | ||||||||||||||||||||||||||||||
Nine real examples ordered by position (Template calls) | ||||||||||||||||||||||||||||||||
[[Image: {{ #switch:Impress
|
Base = Base | Calc = Calc | Draw = Draw | Impress = Impress | Math = Math | Writer = Writer | Book | Livre | Wiki = Book | Edit
}}.png|120px]]
Impress icon is called with |
[[Image: {{ #switch:Math
|
Base = Base | Calc = Calc | Draw = Draw | Impress = Impress | Math = Math | Writer = Writer | Book | Livre | Wiki = Book | Edit
}}.png|60px]]
The icon for Math, 60 pixels top-centered. Call |
[[Image: {{ #switch:Base
|
Base = Base | Calc = Calc | Draw = Draw | Impress = Impress | Math = Math | Writer = Writer | Book | Livre | Wiki = Book | Edit
}}.png|80px]]
|
[[Image: {{ #switch:Edit
|
Base = Base | Calc = Calc | Draw = Draw | Impress = Impress | Math = Math | Writer = Writer | Book | Livre | Wiki = Book | Edit
}}.png|60px]]
|
[[Image: {{ #switch:Draw
|
Base = Base | Calc = Calc | Draw = Draw | Impress = Impress | Math = Math | Writer = Writer | Book | Livre | Wiki = Book | Edit
}}.png|75px]]
|
[[Image: {{ #switch:Writer
|
Base = Base | Calc = Calc | Draw = Draw | Impress = Impress | Math = Math | Writer = Writer | Book | Livre | Wiki = Book | Edit
}}.png|90px]]
|
[[Image: {{ #switch:Calc
|
Base = Base | Calc = Calc | Draw = Draw | Impress = Impress | Math = Math | Writer = Writer | Book | Livre | Wiki = Book | Edit
}}.png|90px]]
|
[[Image: {{ #switch:Setup
|
Base = Base | Calc = Calc | Draw = Draw | Impress = Impress | Math = Math | Writer = Writer | Book | Livre | Wiki = Book | Edit
}}.png|35px]]
|
[[Image: {{ #switch:Wiki
|
Base = Base | Calc = Calc | Draw = Draw | Impress = Impress | Math = Math | Writer = Writer | Book | Livre | Wiki = Book | Edit
}}.png|50px]]
|