Template:Navbox/Icon: Difference between revisions
Jump to navigation
Jump to search
m (Changed text area height because letters are being cut off.) |
m (Changed default width and height to original image sizes.) |
||
Line 1: | Line 1: | ||
<includeonly><span style="text-align:center; float:left; overflow:hidden; margin-left:1px; margin-right:1px;"><div>[[File:{{{image|}}} | {{{width|{{#var:iconwidth}}}}}x{{{height|{{#var:iconheight}}}}}px | {{{text|}}} | link={{{link|}}} ]]</div>{{#if: {{{text|}}} | <div style="line-height:1; text-align:center; font-size:{{{textsize|{{#var:textsize}}}}}em; width:{{{textwidth|{{#var:textwidth}}}}}px; height:28px">[[{{{link|}}} | {{{text|}}}]]</div>}}</span></includeonly><noinclude>__NOTOC__==Usage== | <includeonly><span style="text-align:center; float:left; overflow:hidden; margin-left:1px; margin-right:1px;"><div>[[File:{{{image|}}} | {{{width|{{#var:iconwidth}}}}}x{{{height|{{#var:iconheight}}}}}px | {{{text|}}} | link={{{link|}}} ]]</div>{{#if: {{{text|}}} | <div style="line-height:1; text-align:center; font-size:{{{textsize|{{#var:textsize}}}}}em; width:{{{textwidth|{{#var:textwidth}}}}}px; height:28px; margin=auto">[[{{{link|}}} | {{{text|}}}]]</div>}}</span></includeonly><noinclude>__NOTOC__==Usage== | ||
Creates a icon to use | Creates a icon to use exclusively with [[Template:Navbox-Row]]. Text can be added below the icon.<br> | ||
Icon width, height, and text should be defined when using [[Template:Navbox-Row]], but individual icons properties can still defined | Icon width, height, and text should be defined when using [[Template:Navbox-Row]], but individual icons properties can still be defined as well. | ||
Text area height is fixed at two lines. | Text area height is fixed at two lines. It should automatically wrap, but you can use <nowiki><br></nowiki> to enter a second line. | ||
===Template Parameters=== | ===Template Parameters=== | ||
*'''image''': Image icon. | *'''image''': Image icon. | ||
*'''link''': Website link on image and text click. | *'''link''': Website link on image and text click. | ||
===Optional Parameters=== | ===Optional Parameters=== | ||
*'''width''': Max image width in pixels. (Default defined by [[Template:Navbox-Row]]: | *'''width''': Max image width in pixels. 0 will use try to use the original width of the image. (Default defined by [[Template:Navbox-Row]]:0) | ||
*'''height''': Max image height in pixels. (Default defined by [[Template:Navbox-Row]]: | *'''height''': Max image height in pixels. 0 will use try to use the original height of the image. (Default defined by [[Template:Navbox-Row]]:0) | ||
*'''text''': Text to display below icon. (Default: No text) | *'''text''': Text to display below icon. (Default:No text) | ||
*'''textsize''': Text size below icon. (Default defined by [[Template:Navbox-Row]]: 1.0) | *'''textsize''': Text size below icon. (Default defined by [[Template:Navbox-Row]]:1.0) | ||
*'''textwidth''': Text area width to be used if image width is too small for desired text. (Default defined by [[Template:Navbox-Row]]: Matches width) | *'''textwidth''': Text area width to be used if image width is too small for desired text. (Default defined by [[Template:Navbox-Row]]:Matches width) | ||
==Example== | ==Example== | ||
===Example:=== | ===Example:=== | ||
<nowiki>{{Navbox| title=UNDER NIGHT IN-BIRTH Exe:Late[st] | link=Under Night In-Birth/UNIST | <nowiki>{{Navbox| title=UNDER NIGHT IN-BIRTH Exe:Late[st] | link=Under Night In-Birth/UNIST | ||
| rows= | | rows= | ||
{{Navbox-Row| text=General | {{Navbox-Row| text=General | textwidth=53 | ||
| data= | | data= | ||
{{Navbox-Icon| image=icon controls.png | text=Controls | link=Under Night In-Birth/Controls}} | {{Navbox-Icon| image=icon controls.png | text=Controls | link=Under Night In-Birth/Controls}} | ||
Line 26: | Line 26: | ||
{{Navbox-Icon| image=icon system.png | text=System | link=Under Night In-Birth/System}} | {{Navbox-Icon| image=icon system.png | text=System | link=Under Night In-Birth/System}} | ||
}} | }} | ||
{{Navbox-Row| text=Characters | {{Navbox-Row| text=Characters | iconwidth=60 | ||
| data= | | data= | ||
{{Navbox-Icon| image=Uni hyde icon.png | text=Hyde | link=Under Night In-Birth/UNIST/Hyde}} | {{Navbox-Icon| image=Uni hyde icon.png | text=Hyde | link=Under Night In-Birth/UNIST/Hyde}} | ||
Line 53: | Line 53: | ||
{{Navbox| title=UNDER NIGHT IN-BIRTH Exe:Late[st] | link=Under Night In-Birth/UNIST | {{Navbox| title=UNDER NIGHT IN-BIRTH Exe:Late[st] | link=Under Night In-Birth/UNIST | ||
| rows= | | rows= | ||
{{Navbox-Row| text=General | {{Navbox-Row| text=General | textwidth=53 | ||
| data= | | data= | ||
{{Navbox-Icon| image=icon controls.png | text=Controls | link=Under Night In-Birth/Controls}} | {{Navbox-Icon| image=icon controls.png | text=Controls | link=Under Night In-Birth/Controls}} | ||
Line 63: | Line 63: | ||
{{Navbox-Icon| image=icon system.png | text=System | link=Under Night In-Birth/System}} | {{Navbox-Icon| image=icon system.png | text=System | link=Under Night In-Birth/System}} | ||
}} | }} | ||
{{Navbox-Row| text=Characters | {{Navbox-Row| text=Characters | iconwidth=60 | ||
| data= | | data= | ||
{{Navbox-Icon| image=Uni hyde icon.png | text=Hyde | link=Under Night In-Birth/UNIST/Hyde}} | {{Navbox-Icon| image=Uni hyde icon.png | text=Hyde | link=Under Night In-Birth/UNIST/Hyde}} |
Revision as of 09:21, 22 December 2019
Usage
Creates a icon to use exclusively with Template:Navbox-Row. Text can be added below the icon.
Icon width, height, and text should be defined when using Template:Navbox-Row, but individual icons properties can still be defined as well.
Text area height is fixed at two lines. It should automatically wrap, but you can use <br> to enter a second line.
Template Parameters
- image: Image icon.
- link: Website link on image and text click.
Optional Parameters
- width: Max image width in pixels. 0 will use try to use the original width of the image. (Default defined by Template:Navbox-Row:0)
- height: Max image height in pixels. 0 will use try to use the original height of the image. (Default defined by Template:Navbox-Row:0)
- text: Text to display below icon. (Default:No text)
- textsize: Text size below icon. (Default defined by Template:Navbox-Row:1.0)
- textwidth: Text area width to be used if image width is too small for desired text. (Default defined by Template:Navbox-Row:Matches width)
Example
Example:
{{Navbox| title=UNDER NIGHT IN-BIRTH Exe:Late[st] | link=Under Night In-Birth/UNIST | rows= {{Navbox-Row| text=General | textwidth=53 | data= {{Navbox-Icon| image=icon controls.png | text=Controls | link=Under Night In-Birth/Controls}} {{Navbox-Icon| image=icon faq.png | text=FAQ | link=Under Night In-Birth/FAQ}} {{Navbox-Icon| image=icon glossary.png | text=Glossary | link=Under Night In-Birth/Glossary}} {{Navbox-Icon| image=icon hud.png | text=HUD | link=Under Night In-Birth/HUD}} {{Navbox-Icon| image=icon offense defense.png | text=Offense<br>Defense | link=Under Night In-Birth/Offense_and_Defense}} {{Navbox-Icon| image=icon patch notes.png | text=Patch<br>Notes | link=Under Night In-Birth/Patch Notes}} {{Navbox-Icon| image=icon system.png | text=System | link=Under Night In-Birth/System}} }} {{Navbox-Row| text=Characters | iconwidth=60 | data= {{Navbox-Icon| image=Uni hyde icon.png | text=Hyde | link=Under Night In-Birth/UNIST/Hyde}} {{Navbox-Icon| image=Uni linne icon.png | text=Linne | link=Under Night In-Birth/UNIST/Linne}} {{Navbox-Icon| image=Uni waldstein icon.png | text=Waldstein | link=Under Night In-Birth/UNIST/Waldstein}} {{Navbox-Icon| image=Uni carmine icon.png | text=Carmine | link=Under Night In-Birth/UNIST/Carmine}} {{Navbox-Icon| image=Uni orie icon.png | text=Orie | link=Under Night In-Birth/UNIST/Orie}} {{Navbox-Icon| image=Uni gordeau icon.png | text=Gordeau | link=Under Night In-Birth/UNIST/Gordeau}} {{Navbox-Icon| image=Uni merkava icon.png | text=Merkava | link=Under Night In-Birth/UNIST/Merkava}} {{Navbox-Icon| image=Uni vatista icon.png | text=Vatista | link=Under Night In-Birth/UNIST/Vatista}} {{Navbox-Icon| image=Uni seth icon.png | text=Seth | link=Under Night In-Birth/UNIST/Seth}} {{Navbox-Icon| image=Uni yuzuriha icon.png | text=Yuzuriha | link=Under Night In-Birth/UNIST/Yuzuriha}} {{Navbox-Icon| image=Uni hilda icon.png | text=Hilda | link=Under Night In-Birth/UNIST/Hilda}} {{Navbox-Icon| image=Uni eltnum icon.png | text=Eltnum | link=Under Night In-Birth/UNIST/Eltnum}} {{Navbox-Icon| image=Uni chaos icon.png | text=Chaos | link=Under Night In-Birth/UNIST/Chaos}} {{Navbox-Icon| image=Uni akatsuki icon.png | text=Akatsuki | link=Under Night In-Birth/UNIST/Akatsuki}} {{Navbox-Icon| image=Uni nanase icon.png | text=Nanase | link=Under Night In-Birth/UNIST/Nanase}} {{Navbox-Icon| image=Uni byakuya icon.png | text=Byakuya | link=Under Night In-Birth/UNIST/Byakuya}} {{Navbox-Icon| image=Uni phonon icon.png | text=Phonon | link=Under Night In-Birth/UNIST/Phonon}} {{Navbox-Icon| image=Uni mika icon.png | text=Mika | link=Under Night In-Birth/UNIST/Mika}} {{Navbox-Icon| image=Uni wagner icon.png | text=Wagner | link=Under Night In-Birth/UNIST/Wagner}} {{Navbox-Icon| image=Uni enkidu icon.png | text=Enkidu | link=Under Night In-Birth/UNIST/Enkidu}} }} }}