Template:Sandbox/Aurelain/Link/render: Difference between revisions
From Heroes of Might and Magic: Olden Era Official Wiki
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<noinclude> | <includeonly><!-- | ||
--><span style="white-space:nowrap;"><!-- | |||
-->{{#if:{{{filename|}}} | |||
|[[File:{{{filename}}} | {{{size|x32px}}} | link=<!-- | |||
-->{{#if: {{{link|}}} | |||
|{{#switch: {{{lang|en}}} | |||
|en= | |||
|#default=/{{{lang}}} | |||
}} | |||
}}<!-- | |||
-->]] | |||
}}<!-- | |||
--></span><!-- | |||
#################################################################### | |||
--></includeonly><noinclude> | |||
This template is used by [[Template:Link]] as the base for rendering a link with an icon in front of it. | This template is used by [[Template:Link]] as the base for rendering a link with an icon in front of it. | ||
===Usage=== | |||
1. Normal: | |||
{{Sandbox/Aurelain/Link/render|filename= | {{Color|yellow|Input:}} | ||
<pre><nowiki> | |||
{{Sandbox/Aurelain/Link/render | |||
| filename=Ister.png | |||
| link=Ister | |||
| text=Ister | |||
}}</nowiki></pre> | |||
{{Color|lime|Output:}} | |||
{{Sandbox/Aurelain/Link/render | |||
| filename=Ister.png | |||
| link=Ister | |||
| text=Ister | |||
}} | |||
---- | |||
2. With {{b|lang}}, to override the default (<code>en</code>) and thus change the link: | |||
<pre><nowiki>{{Link/render|filename= | {{Color|yellow|Input:}} | ||
<pre><nowiki> | |||
{{Sandbox/Aurelain/Link/render | |||
| filename=Ister.png | |||
| link=Ister | |||
| text=イスター | |||
| lang=ja | |||
}}</nowiki></pre> | |||
{{Sandbox/Aurelain/Link/render|filename= | {{Color|lime|Output:}} | ||
{{Sandbox/Aurelain/Link/render | |||
| filename=Ister.png | |||
| link=Ister | |||
| text=イスター | |||
| lang=ja | |||
}} | |||
---- | |||
3. With {{b|size}}, to override the default (<code>32px</code>): | |||
{{Sandbox/Aurelain/Link/render|link= | {{Color|yellow|Input:}} | ||
<pre><nowiki> | |||
{{Sandbox/Aurelain/Link/render | |||
| filename=Ister.png | |||
| link=Ister | |||
| text=Ister | |||
| size=128px | |||
}}</nowiki></pre> | |||
{{Color|lime|Output:}} | |||
{{Sandbox/Aurelain/Link/render | |||
| filename=Ister.png | |||
| link=Ister | |||
| text=Ister | |||
| size=128px | |||
}} | |||
---- | |||
{{ | 4. With {{b|color}}, to override the default: | ||
{{Color|yellow|Input:}} | |||
<pre><nowiki> | |||
{{Sandbox/Aurelain/Link/render | |||
| filename=Ister.png | |||
| link=Ister | |||
| text=Ister | |||
| color=lime | |||
}}</nowiki></pre> | |||
{{Color|lime|Output:}} | |||
{{Sandbox/Aurelain/Link/render | |||
| filename=Ister.png | |||
| link=Ister | |||
| text=Ister | |||
| color=lime | |||
}} | |||
</noinclude> | |||
</noinclude | |||
Revision as of 09:26, 26 June 2026
This template is used by Template:Link as the base for rendering a link with an icon in front of it.
Usage
1. Normal:
Input:
{{Sandbox/Aurelain/Link/render
| filename=Ister.png
| link=Ister
| text=Ister
}}
Output:
2. With lang, to override the default (en) and thus change the link:
Input:
{{Sandbox/Aurelain/Link/render
| filename=Ister.png
| link=Ister
| text=イスター
| lang=ja
}}
3. With size, to override the default (32px):
Input:
{{Sandbox/Aurelain/Link/render
| filename=Ister.png
| link=Ister
| text=Ister
| size=128px
}}
Output:
4. With color, to override the default:
Input:
{{Sandbox/Aurelain/Link/render
| filename=Ister.png
| link=Ister
| text=Ister
| color=lime
}}
Output:


