Module:Iconify/doc

天津风不是天津的风讨论 | 贡献2024年11月6日 (三) 22:00的版本 (创建页面,内容为“<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…”)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

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 0 36px

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