Module:Iconify/doc:修订间差异

(创建页面,内容为“<includeonly>{{lua|Module:Arguments}}Documentation Module:Iconify/doc</includeonly> This module is similar to {{template|Iconify}} but for modules. == Parameters == {| class="wikitable" ! Parameter !! Description !! Required !! Default |- | icon || Text/main file name || '''required''' || ''none'' |- | group || image/file "group"/prefix || optional || ''none'' |- | width || Width of the icon * If preceded by an 'x', sets height instead of width | optional…”)
 
无编辑摘要
 
第39行: 第39行:


<code>iconify(icon="University",group="Building",width="36px",text="0")</code> gives
<code>iconify(icon="University",group="Building",width="36px",text="0")</code> gives
{{iconify|University|Building|36px|0}}
{{iconify|University|Building||36px|0}}


<code>iconify(icon="Morale",group="Military",mod="{{green|+10%}}")</code> gives
<code>iconify(icon="Morale",group="Military",mod="{{green|+10%}}")</code> gives

2024年11月6日 (三) 22:10的最新版本

This module is similar to {{Iconify}} but for modules.

Parameters

Parameter Description Required Default
icon Text/main file name required none
group image/file "group"/prefix optional none
width Width of the icon
  • If preceded by an 'x', sets height instead of width
optional 24px
text modifies text output if used:
  • link: adds hyperlink to text
  • nosp: removes space between icon and text
  • any other: removes text, i.e. icon only
optional none
mod modifier text between icon and output text
  • Do not combine with nosp in text
optional none
image alternate image file definition optional group icon.png
link alternate link optional icon

Notes icon is made lowercase, changes dashes - to underscores _, and removes any single quotes/apostrophes ' for the file name, however those changes are not made for the text or link usage. group is used exactly as typed, however the first character counts as capitalized even if lowercase, as with all wiki files and pages, e.g. Method and method are considered the same.

Usage

iconify(icon="Poor Laws",group="Law") gives Law poor laws.png Poor Laws

iconify(icon="University",group="Building",width="36px",text="0") gives Building university.png

iconify(icon="Morale",group="Military",mod="+10%") gives Military morale.png +10% Morale