Template:Simpleicon: Difference between revisions

From questden
Jump to navigationJump to search
No edit summary
m (default BG is transparent)
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
<noinclude>I'm so so so so sorry if this isn't allowed... -Leaf</noinclude>
<noinclude>This uses the code from icon, so it's very similar, but it has a few removals and additions!
<includeonly><table style="display: inline-table; background-color: #eee; color: black; text-align: center; width: 100px; margin-top: 2px; margin-bottom: 2px;"><!--
 
First, there is no caption or link, hence the name "simpleicon". Second, you can have up to four icons together! They stack in a 2x2 grid.
 
'''Visual Example:'''
 
{{simpleicon|123|725|320|1}} (Random images)
 
'''Usage Examples'''
 
Using Simpleicon to get 4 images:
 
<nowiki>{{simpleicon|1|2|3|4}}</nowiki>
 
 
Using Simpleicon to get less than 4 images -- note that you must leave unused pipes, else it'll fail:
 
1 icon:<nowiki>{{simpleicon|1|||}}</nowiki>
 
2 icons:<nowiki>{{simpleicon|1|2||}}</nowiki>
 
3 icons:<nowiki>{{simpleicon|1|2|3|}}</nowiki>
</noinclude>
<includeonly><table style="display: inline-table; background-color: {{{bg|transparent}}}; text-align: center; width: 100px; margin-top: 2px; margin-bottom: 2px;"><!--


The upper row of the table is the image. The maximum thumbnail size will be 200px or 250px depending if it's the OP, plus 2x2px padding. Hence the max value.
The upper row of the table is the image. The maximum thumbnail size will be 200px or 250px depending if it's the OP, plus 2x2px padding. Hence the max value.


--><td style="padding: 2px;" colspan="2"><span class="plainlinks">[http://tgchan.org/kusaba/image-for/icons/{{{1}}} http://tgchan.org/kusaba/thumb-for/icons/{{{1}}}.png]</span></td>
-->
<tr><td style="padding: 2px;" colspan="2"><span class="plainlinks">[http://tgchan.org/kusaba/image-for/icons/{{{1}}} http://tgchan.org/kusaba/thumb-for/icons/{{{1}}}.png]</span></td>


{{#if:{{{2}}}|<td style="padding: 2px;" colspan="2"><span class="plainlinks">[http://tgchan.org/kusaba/image-for/icons/{{{2}}} http://tgchan.org/kusaba/thumb-for/icons/{{{2}}}.png]</span></td>|}}
{{#if:{{{2}}}|<td style="padding: 2px;" colspan="2"><span class="plainlinks">[http://tgchan.org/kusaba/image-for/icons/{{{2}}} http://tgchan.org/kusaba/thumb-for/icons/{{{2}}}.png]</span></td>|}}
</tr>
{{#if:{{{3}}}|
<tr><td style="padding: 2px;" colspan="2"><span class="plainlinks">[http://tgchan.org/kusaba/image-for/icons/{{{3}}} http://tgchan.org/kusaba/thumb-for/icons/{{{3}}}.png]</span></td>
{{#if:{{{4}}}|
<td style="padding: 2px;" colspan="2"><span class="plainlinks">[http://tgchan.org/kusaba/image-for/icons/{{{4}}} http://tgchan.org/kusaba/thumb-for/icons/{{{4}}}.png]</span></td>|
}}
</tr>|
}}


</table></includeonly><!-- Don't leave a trailing newline after this! Very whitespace-sensitive. -->
</table></includeonly><!-- Don't leave a trailing newline after this! Very whitespace-sensitive. -->

Latest revision as of 20:02, 20 July 2014

This uses the code from icon, so it's very similar, but it has a few removals and additions!

First, there is no caption or link, hence the name "simpleicon". Second, you can have up to four icons together! They stack in a 2x2 grid.

Visual Example:


123.png 725.png
320.png 1.png

(Random images)

Usage Examples

Using Simpleicon to get 4 images:

{{simpleicon|1|2|3|4}}


Using Simpleicon to get less than 4 images -- note that you must leave unused pipes, else it'll fail:

1 icon:{{simpleicon|1|||}}

2 icons:{{simpleicon|1|2||}}

3 icons:{{simpleicon|1|2|3|}}