Difference between revisions of "Template:Icon"

From Emulation General Wiki
Jump to navigation Jump to search
(Created page with "<onlyinclude>{{#if:{{{tl|}}}|align=left{{!}}|}}{{Icon/File|{{{1}}}}} {{#if: {{{2|}}} | {{Icon/File|{{{2}}} }} | }} {{#if: {{{3|}}} | {{Icon/File|{{{3}}} }} | }} {{#if: {{{4|}}...")
 
 
Line 1: Line 1:
<onlyinclude>{{#if:{{{tl|}}}|align=left{{!}}|}}{{Icon/File|{{{1}}}}} {{#if: {{{2|}}} | {{Icon/File|{{{2}}} }} | }} {{#if: {{{3|}}} | {{Icon/File|{{{3}}} }} | }} {{#if: {{{4|}}} | {{Icon/File|{{{4}}} }} | }} {{#if: {{{5|}}} | {{Icon/File|{{{5}}} }} | }} {{#if: {{{6|}}} | {{Icon/File|{{{6}}} }} | }}</onlyinclude><noinclude><br/>
+
<onlyinclude>{{Icon/File| {{{1}}} }} {{#if: {{{2|}}} | {{Icon/File|{{{2}}} }} | }} {{#if: {{{3|}}} | {{Icon/File|{{{3}}} }} | }} {{#if: {{{4|}}} | {{Icon/File|{{{4}}} }} | }} {{#if: {{{5|}}} | {{Icon/File|{{{5}}} }} | }} {{#if: {{{6|}}} | {{Icon/File|{{{6}}} }} | }}</onlyinclude><noinclude><br/>
 
<center><big>'''Icon'''</big></center>
 
<center><big>'''Icon'''</big></center>
 
A template for shorthand platform listing. To reduce the amount of effort needed to add new images (and thus, platforms), the actual values are passed to [[Template:Icon/File|a subtemplate]] that selects the icons. To add new images, edit the subtemplate, not this one. To scale up the number of platforms that can be listed, edit this article; currently up to six platforms can be listed though more can be added with relative ease.
 
A template for shorthand platform listing. To reduce the amount of effort needed to add new images (and thus, platforms), the actual values are passed to [[Template:Icon/File|a subtemplate]] that selects the icons. To add new images, edit the subtemplate, not this one. To scale up the number of platforms that can be listed, edit this article; currently up to six platforms can be listed though more can be added with relative ease.
 
__NOTOC__
 
__NOTOC__
 
==Example==
 
==Example==
 +
===Basic usage===
 
<pre>
 
<pre>
 
{{Icon|Windows|Linux|macOS|Android|iOS}}
 
{{Icon|Windows|Linux|macOS|Android|iOS}}
Line 9: Line 10:
  
 
Result: {{Icon|Windows|Linux|macOS|Android|iOS}}
 
Result: {{Icon|Windows|Linux|macOS|Android|iOS}}
 +
 +
===In a table===
 +
 +
<pre>{| class="wikitable" style="text-align:center;"
 +
!Name
 +
!Platform(s)
 +
!Recommended
 +
|-
 +
|Example
 +
|align=left|{{Icon|Win|Mac|APK}}
 +
|{{✓}}
 +
|}</pre>
 +
 +
Result:
 +
 +
{| class="wikitable" style="text-align:center;"
 +
!Name
 +
!Platform(s)
 +
!Recommended
 +
|-
 +
|Example
 +
|align=left|{{Icon|Win|Mac|APK}}
 +
|{{✓}}
 +
|}
  
 
==Parameters==
 
==Parameters==
Line 17: Line 42:
 
;<code>2</code>, <code>3</code>, <code>4</code>, <code>5</code>, <code>6</code>
 
;<code>2</code>, <code>3</code>, <code>4</code>, <code>5</code>, <code>6</code>
 
:The rest of the values. Optional because only one platform is required.
 
:The rest of the values. Optional because only one platform is required.
;<code>tl</code>
 
:Formats a table to align the images left for aesthetic reasons.
 
 
</noinclude>
 
</noinclude>

Latest revision as of 00:12, 28 December 2019

    
Icon

A template for shorthand platform listing. To reduce the amount of effort needed to add new images (and thus, platforms), the actual values are passed to a subtemplate that selects the icons. To add new images, edit the subtemplate, not this one. To scale up the number of platforms that can be listed, edit this article; currently up to six platforms can be listed though more can be added with relative ease.

Example[edit]

Basic usage[edit]

{{Icon|Windows|Linux|macOS|Android|iOS}}

Result: Windows Linux macOS Android iOS

In a table[edit]

{| class="wikitable" style="text-align:center;"
!Name
!Platform(s)
!Recommended
|-
|Example
|align=left|{{Icon|Win|Mac|APK}}
|{{✓}}
|}

Result:

Name Platform(s) Recommended
Example Windows macOS Android

Parameters[edit]

The list of platforms is documented at the subtemplate's page.

1
The first value. Required because a platform needs to be specified for this template to be useful.
2, 3, 4, 5, 6
The rest of the values. Optional because only one platform is required.