Difference between revisions of "Template:Icon"

From Project: Gorgon Wiki
Jump to: navigation, search
m (Documentation.)
m
Line 1: Line 1:
 
[[File:{{#switch:{{lc:{{{1|}}}}}
 
[[File:{{#switch:{{lc:{{{1|}}}}}
 
<!-- icons with a custom wiki page destination -->
 
<!-- icons with a custom wiki page destination -->
  | firedust = item-icon-firedust.png{{!}}link=Fire Dust
+
  | firedust = item-icon-firedust.png{{!}}link=Fire Dust
 
  | saltpeter = item-icon-saltpeter.png{{!}}link=Saltpeter
 
  | saltpeter = item-icon-saltpeter.png{{!}}link=Saltpeter
  | sulfur = item-icon-sulfur.png{{!}}link=Sulfur
+
  | sulfur   = item-icon-sulfur.png{{!}}link=Sulfur
 +
<!-- foods which have similar looking icons, using mouseover title -->
 +
| butter    = item-icon-butter.png{{!}}title=Butter
 
<!-- look-alike items for which we use the same icons (in alpha) -->
 
<!-- look-alike items for which we use the same icons (in alpha) -->
  | lemon = item-icon-banana.png
+
  | lemon     = item-icon-banana.png
  | potato = item-icon-banana.png
+
  | potato   = item-icon-banana.png
 
<!-- default uses the shop item naming convention -->
 
<!-- default uses the shop item naming convention -->
  | #default = item-icon-{{{1|none}}}.png
+
  | #default = item-icon-{{{1|none}}}.png
 
}}|{{{size|32px}}}]]<noinclude>
 
}}|{{{size|32px}}}]]<noinclude>
 
__NOTOC__
 
__NOTOC__

Revision as of 17:13, 17 October 2014

Item-icon-none.png

Syntax

{{icon|<name>|size=16px}}

Description

This template has several purposes:

  • Always used instead of direct links, it can save many edits in the future.
  • Reduces custom mediawiki code in the articles.
  • Makes icons link to relevant article pages, instead of the default "File history" page.

Parameters

parameter 1
Name of the icon. See Item Icons Guide for available icons (eg. "firstaid"). If not provided, an empty box is shown.
size
OPTIONAL. Changes the size of the icon (default is 32px).

Examples

{{icon|saltpeter}}