Difference between revisions of "Template:AFC button"

From blackwiki
Jump to navigation Jump to search
blackwiki>TheQ Editor
(Add optional parameter to view old submissions only. tested in /sandbox already)
blackwiki>Enterprisey
(added another style option)
Line 1: Line 1:
<div style="{{#ifeq:{{lc:{{{float|left}}}}}|none||float: {{{float|left}}}; clear: {{{float|left}}};}}margin: 1em{{#ifeq:{{{size|200px}}}|200px| 1em -100px}}; width: 20%; padding: 0.5em; text-align: center;">[[File:Button Icon GreenForest.svg|{{{size|200px}}}|center|link=Special:RandomInCategory/{{#ifeq:{{{old}}}|yes|AfC submissions_by_age/Very_old|Pending_AfC_submissions}}]]<br />[[Special:RandomInCategory/{{#ifeq:{{{old}}}|yes|AfC submissions_by_age/Very_old|Pending_AfC_submissions}}|<b style="color: #000; font-size: larger;{{#ifeq:{{{size|200px}}}|200px| top: -175px; position: relative;}}">Click this button<br />to review<br />an AFC submission.</b>]]
+
{{#switch: {{{style|image}}}
</div><noinclude>
+
| image = <div style="{{#ifeq: {{lc:{{{float|left}}}}} | none | <!-- blank --> | float: {{{float|left}}}; clear: {{{float|left}}};}} margin: 1em{{#ifeq:{{{size|200px}}}|200px| 1em -100px}}; width: 20%; padding: 0.5em; text-align: center;">[[File:Button Icon GreenForest.svg|{{{size|200px}}}|center|link=Special:RandomInCategory/{{#ifeq:{{{old}}}|yes|AfC submissions_by_age/Very_old|Pending_AfC_submissions}}]]<br />[[Special:RandomInCategory/{{#ifeq:{{{old}}}|yes|AfC submissions_by_age/Very_old|Pending_AfC_submissions}}|<b style="color: #000; font-size: larger;{{#ifeq:{{{size|200px}}}|200px| top: -175px; position: relative;}}">Click this button<br />to review<br />an AFC submission.</b>]]
 +
</div>
 +
| button = {{Clickable button 2|Special:RandomInCategory/Pending AfC submissions|Find a random AfC submission|class=mw-ui-progressive}}
 +
}}<noinclude>
  
 
{{Documentation}}
 
{{Documentation}}
 
<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES TO THE /doc SUBPAGE, THANKS -->
 
<!-- PLEASE ADD THIS TEMPLATE'S CATEGORIES TO THE /doc SUBPAGE, THANKS -->
 
</noinclude>
 
</noinclude>

Revision as of 13:17, 18 March 2015

Button Icon GreenForest.svg

Click this button
to review
an AFC submission.
Template documentation[view] [edit] [history] [purge]

Usage

This template has three optional parameters:

  • size, which gives the size of the image in pixels. The default value is 200px. To show the image at a different size, invoke the template with a different size parameter. For example, {{AFC button|size=50px}} (quarter size) would produce:
However, the font size of the text under the image is not changed.
  • float, which specifies the float attribute of the <div> containing the template.
  • style, which, when set to button, makes the template use {{Clickable button 2}} instead of the image. For instance, {{AFC button|style=button}} produces:

Find a random AfC submission