Template:MinimapIcon: Difference between revisions
From Cassette Beasts
Mezzodrinker (talk | contribs) m I am very smart. |
Mezzodrinker (talk | contribs) Refactor parameters list; Change default vertical alignment to middle |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
<includeonly>[[File:{{MinimapIconFile|{{{1}}}}}{{!}}{{#switch: {{{border|}}} | <includeonly>[[File:{{MinimapIconFile|{{{1}}}}} {{!}} {{#switch: {{{border|}}} | ||
| y | | y | ||
| 1 | | 1 | ||
| Line 5: | Line 5: | ||
| true = border | | true = border | ||
| | | | ||
}}{{!}}{{#switch: {{{frame|false}}} | }} {{!}} {{#switch: {{{frame|false}}} | ||
| y | | y | ||
| 1 | | 1 | ||
| Line 15: | Line 15: | ||
| false = frameless | | false = frameless | ||
| {{{frame}}} | | {{{frame}}} | ||
}}{{!}}{{{size|{{{2|16px}}}}}}{{!}}{{{halign|}}}{{!}}{{{valign| | }} {{!}} {{{size|{{{2|16px}}}}}} {{!}} {{{halign|}}} {{!}} {{{valign|}}} {{!}} link={{{link|}}} {{!}} alt={{{alt|{{{1}}}}}} {{!}} {{{title|{{{1}}}}}}]]</includeonly><noinclude>'''Note:''' A list of all available minimap icons can be found under [[:Category:Minimap Icons]] | ||
== | == Parameters == | ||
== | ; 1<span class="anchor" id="1"></span> | ||
: The minimap icon to show. Will be passed on to [[Template:MinimapIconFile]] as-is. | : The minimap icon to show. Will be passed on to [[Template:MinimapIconFile]] as-is. | ||
; 2<span class="anchor" id="2"></span> | |||
: ''(optional, defaults to 16px)''<br>The resizing option. Will only be used if the [[#size|<code>size</code> parameter]] is not used. | |||
: ''(optional)'' The | : See [https://www.mediawiki.org/wiki/Help:Images#Syntax the MediaWiki help page] for details. | ||
; border | |||
: ''(optional, defaults to false)''<br>Whether to add a small grey border to the image. Use <code>y</code>, <code>1</code>, <code>yes</code>, or <code>true</code> to enable; for all other values, the border is disabled. | |||
; frame | |||
: ''(optional)'' Whether to add a small grey border to the image. Use <code>y</code>, <code>1</code>, <code>yes</code>, or <code>true</code> to enable; for all other values, the border is disabled | : ''(optional, defaults to false)''<br>How to display the image. Use <code>y</code>, <code>1</code>, <code>yes</code>, or <code>true</code> to use a frame; <code>n</code>, <code>0</code>, <code>no</code>, or <code>false</code> to ''not'' use a frame; or <code>thumb</code>, or <code>thumbnail</code> for a thumbnail frame. | ||
: See [https://www.mediawiki.org/wiki/Help:Images#Format the MediaWiki help page] for details. | |||
; size<span class="anchor" id="size"></span> | |||
: ''(optional)'' How to display the image. Use <code>y</code>, <code>1</code>, <code>yes</code>, or <code>true</code> to use a frame; <code>n</code>, <code>0</code>, <code>no</code>, or <code>false</code> to ''not'' use a frame | : ''(optional)''<br>The resizing option. Takes priority over [[#2|the positional parameter #2]]. | ||
: See [https://www.mediawiki.org/wiki/Help:Images#Syntax the MediaWiki help page] for details. | |||
; halign | |||
: ''(optional)'' The resizing option. | : ''(optional, defaults to showing the image inline)''<br>The horizontal alignment. Use <code>none</code> to prevent text from flowing around the image; <code>center</code> to prevent text flowing around and centre the image; <code>left</code> to align the image left; <code>right</code> to align the image right; or leave empty to show the image inline with text. | ||
: See [https://www.mediawiki.org/wiki/Help:Images#Horizontal_alignment the MediaWiki help page] for details. | |||
; valign | |||
: ''(optional)'' The horizontal alignment. Use <code>none</code> to prevent text from flowing around the image; <code>center</code> to prevent text flowing around and centre the image; <code>left</code> to align the image left; <code>right</code> to align the image right; or leave empty to show the image inline with text | : ''(optional, defaults to middle)''<br>The vertical alignment. | ||
: See [https://www.mediawiki.org/wiki/Help:Images#Vertical_alignment the MediaWiki help page] for details. | |||
; link | |||
: ''(optional)'' The vertical alignment. See [https://www.mediawiki.org/wiki/Help:Images#Vertical_alignment the MediaWiki help page] for details | : ''(optional)''<br>The page or external link the image should link to. Leave empty to prevent adding a link. | ||
; alt | |||
: ''(optional, defaults to [[#1|the positional parameter #1]])''<br>The alternative text for screen readers or if the image can't be displayed. | |||
: ''(optional)'' The page or external link the image should link to. Leave empty to prevent adding a link | ; title | ||
: ''(optional, defaults to [[#1|the positional parameter #1]])'' The text that should be displayed when hovering the mouse over the image. | |||
: ''(optional)'' The alternative text for screen readers or if the image can't be displayed. | |||
== Examples == | == Examples == | ||
Latest revision as of 18:02, 30 November 2024
Note: A list of all available minimap icons can be found under Category:Minimap Icons
Parameters
- 1
- The minimap icon to show. Will be passed on to Template:MinimapIconFile as-is.
- 2
- (optional, defaults to 16px)
The resizing option. Will only be used if thesizeparameter is not used. - See the MediaWiki help page for details.
- border
- (optional, defaults to false)
Whether to add a small grey border to the image. Usey,1,yes, ortrueto enable; for all other values, the border is disabled. - frame
- (optional, defaults to false)
How to display the image. Usey,1,yes, ortrueto use a frame;n,0,no, orfalseto not use a frame; orthumb, orthumbnailfor a thumbnail frame. - See the MediaWiki help page for details.
- size
- (optional)
The resizing option. Takes priority over the positional parameter #2. - See the MediaWiki help page for details.
- halign
- (optional, defaults to showing the image inline)
The horizontal alignment. Usenoneto prevent text from flowing around the image;centerto prevent text flowing around and centre the image;leftto align the image left;rightto align the image right; or leave empty to show the image inline with text. - See the MediaWiki help page for details.
- valign
- (optional, defaults to middle)
The vertical alignment. - See the MediaWiki help page for details.
- link
- (optional)
The page or external link the image should link to. Leave empty to prevent adding a link. - alt
- (optional, defaults to the positional parameter #1)
The alternative text for screen readers or if the image can't be displayed. - title
- (optional, defaults to the positional parameter #1) The text that should be displayed when hovering the mouse over the image.

