Template:AfC button: Difference between revisions
Jump to navigation
Jump to search
en>Ahecht & → ? |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{#switch: {{{style|image}}} | {{#switch: {{{style|image}}} | ||
| image = <div style="{{#ifeq: {{lc:{{{float|left}}}}} | none | <!-- blank --> | float: {{{float|{{{align|left}}}}}}; clear: {{{float|{{{align|left}}}}}};}} margin: 1em; width: {{{size|200px}}}; height: {{{size|200px}}}; padding: 0.5em; position: relative; display: inline-block;">[[File:Button Icon GreenForest.svg|{{{size|200px}}}|center|link=]]<div class="plainlinks" style="position: relative; top: -50%; transform: translateY(-50%); color: #000; font-size: {{{font-size|{{#invoke:if elseif||yesno=true|{{#expr:{{digits|{{{size|200}}}}}>265}}|xx-large|{{#expr:{{digits|{{{size|200}}}}}>200}}|x-large|{{#expr:{{digits|{{{size|200}}}}}>150}}|large|{{#expr:{{digits|{{{size|200}}}}}>135}}|medium|{{#expr:{{digits|{{{size|200}}}}}>110}}|small|{{#expr:{{digits|{{{size|200}}}}}>85}}|x-small|xx-small}}}}}; text-align: center; padding: 10%;">[//randomincategory.toolforge.org/{{#ifeq:{{{old}}}|yes|AfC submissions_by_age/Very_old|Pending_AfC_submissions}}?server= | | image = <div style="{{#ifeq: {{lc:{{{float|left}}}}} | none | <!-- blank --> | float: {{{float|{{{align|left}}}}}}; clear: {{{float|{{{align|left}}}}}};}} margin: 1em; width: {{{size|200px}}}; height: {{{size|200px}}}; padding: 0.5em; position: relative; display: inline-block;">[[File:Button Icon GreenForest.svg|{{{size|200px}}}|center|link=]]<div class="plainlinks" style="position: relative; top: -50%; transform: translateY(-50%); color: #000; font-size: {{{font-size|{{#invoke:if elseif||yesno=true|{{#expr:{{digits|{{{size|200}}}}}>265}}|xx-large|{{#expr:{{digits|{{{size|200}}}}}>200}}|x-large|{{#expr:{{digits|{{{size|200}}}}}>150}}|large|{{#expr:{{digits|{{{size|200}}}}}>135}}|medium|{{#expr:{{digits|{{{size|200}}}}}>110}}|small|{{#expr:{{digits|{{{size|200}}}}}>85}}|x-small|xx-small}}}}}; text-align: center; padding: 10%;">[//randomincategory.toolforge.org/{{#ifeq:{{{old}}}|yes|AfC submissions_by_age/Very_old|Pending_AfC_submissions}}?server=eurovision.jobogamer.xyz&namespace=2!118&type=page <b style="color:#000; text-decoration:none;">Click this<br />button to<br />review an AfC<br />submission</b>]</div> | ||
</div> | </div> | ||
| button = <div style="margin:1em; {{#ifeq: {{{align|left}}} | left | <!-- blank --> | text-align: {{{align|left}}};}}">{{Clickable button|url=//randomincategory.toolforge.org/{{#ifeq:{{{old}}}|yes|AfC submissions_by_age/Very_old|Pending_AfC_submissions}}?server= | | button = <div style="margin:1em; {{#ifeq: {{{align|left}}} | left | <!-- blank --> | text-align: {{{align|left}}};}}">{{Clickable button|url=//randomincategory.toolforge.org/{{#ifeq:{{{old}}}|yes|AfC submissions_by_age/Very_old|Pending_AfC_submissions}}?server=eurovision.jobogamer.xyz&namespace=2!118&type=page|2=Find a random AfC submission|class=mw-ui-progressive}}</div> | ||
}}<noinclude> | }}<noinclude> | ||
Latest revision as of 05:59, 20 March 2026
Usage
[edit source]This template has three optional parameters:
size, which gives the size of the image in pixels. The default value is200px. To show the image at a different size, invoke the template with a different size parameter. For example,{{AFC button|size=100px}}would produce:
- The template will attempt to adjust the font size, however for very large or small versions you may need to specify
|font-size=.{{AFC button|size=50px}}would produce:
- The template will attempt to adjust the font size, however for very large or small versions you may need to specify
- Which you can fix with
{{AFC button|size=50px|font-size=6px}}
- Which you can fix with
float, which specifies thefloatattribute of the<div>containing the template.style, which, when set tobutton, makes the template use {{Clickable button}} instead of the image. For instance,{{AFC button|style=button}}produces:


