Template:Icon/sandbox: Difference between revisions

From Blue Archive Wiki
Jump to navigation Jump to search
Content added Content deleted
(Expanded functionality to allow arbitrary files)
 
(Documented new functionality)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>{{#tag:span|{{#switch: {{lc: {{{1|}}}}}
<includeonly>{{#tag:span|{{#switch: {{lc: {{{1|}}}}}
| indoor|indoors = [[File:Icon location indoors.png|frameless|{{{size|16}}}px|link=|alt=Indoor]]
| indoor|indoors = [[File:Icon location indoors.png|frameless|{{{size|16}}}px|link={{{link|}}}|alt=Indoor]]
| outdoor|outdoors = [[File:Icon location outdoors.png|frameless|{{{size|16}}}px|link=|alt=Outdoor]]
| outdoor|outdoors = [[File:Icon location outdoors.png|frameless|{{{size|16}}}px|link={{{link|}}}|alt=Outdoor]]
| urban|city|town|street = [[File:Icon location city.png|frameless|{{{size|16}}}px|link=|alt=Urban]]
| urban|city|town|street = [[File:Icon location city.png|frameless|{{{size|16}}}px|link={{{link|}}}|alt=Urban]]
| {{#ifexist: Image:Icon_{{{1|}}}.png
|
| [[File:Icon_{{{1|}}}.png|frameless|{{{size|16}}}px|link={{{link|}}}|{{#if: {{{title|}}} | {{{title|}}} | {{{1|}}} }}|alt={{#if: {{{title|}}} | {{{title|}}} | {{{1|}}} }}]]
}}
{{#ifexist: Image:Icon_{{{1|}}}.png
| {{#ifexist: Image:{{{1|}}}.png
| [[File:Icon_{{{1|}}}.png|frameless|{{{size|16}}}px|link=|alt={{#if: {{{text|}}} | {{{text|}}} | {{{1|}}} }}]
| [[File:{{{1|}}}.png|frameless|{{{size|16}}}px|link={{{link|}}}|{{#if: {{{title|}}} | {{{title|}}} | {{{1|}}} }}|alt={{#if: {{{title|}}} | {{{title|}}} | {{{1|}}} }}]]
|
| {{#ifexist: Image:{{{1|}}}.png
}}
| [[File:{{{1|}}}.png|frameless|{{{size|16}}}px|link=|alt={{#if: {{{text|}}} | {{{text|}}} | {{{1|}}} }}]
|
}}
}}
}}{{#if: {{{text|}}} | &nbsp;{{{text|}}} | }}|title="{{#if: {{{text|}}} | {{{text|}}} | {{{1|}}} }}"}}</includeonly><noinclude>
}}
{{#if: {{{text|}}} | &nbsp;{{{text|}}} | }}|title="{{#if: {{{text|}}} | {{{text|}}} | {{{1|}}} }}"}}</includeonly><noinclude>


Outputs an inline icon.
Outputs an inline icon.
Line 18: Line 16:
== Function ==
== Function ==


<nowiki>{{Icon|code[|text=][|size=16]}}</nowiki>
<nowiki>{{Icon|code[|text=][|title=][|link=][|size=16]}}</nowiki>


=== Text ===
=== Text ===
Line 44: Line 42:


{{Icon|Urban}} Urban
{{Icon|Urban}} Urban

=== Other icons ===
Files beginning with `Icon_` can be referenced by their name following that
<nowiki>{{Icon/sandbox|Cover|title=Uses cover|text=Uses Icon_Cover.png|size=24}}
{{Icon/sandbox|Nocover|title=Uses cover|text=Uses Icon_Nocover.png|size=24}}</nowiki>
{{Icon/sandbox|Cover|title=Uses cover|text=Uses Icon_Cover.png|size=24}}
{{Icon/sandbox|Nocover|title=Uses cover|text=Uses Icon_Nocover.png|size=24}}
Complete filename can also be provided to render any image
<nowiki>{{Icon/sandbox|Equipment_Icon_Bag_Tier1|title=Bag|link=Equipment#Bag|size=62}}</nowiki>
{{Icon/sandbox|Equipment_Icon_Bag_Tier1|title=Bag|link=Equipment#Bag|size=62}}
</noinclude>
</noinclude>

Latest revision as of 08:51, 3 July 2021


Outputs an inline icon.

Function[edit]

{{Icon|code[|text=][|title=][|link=][|size=16]}}

Text[edit]

Where it makes sense for attached text to be wrapped into the same span tag as the icon:

This icon wraps additional {{Icon|Indoor|text=arbitrary text}} into its own span

This icon wraps additional Indoor arbitrary text into its own span

Icon size[edit]

Use optional size parameter to specify icon size in pixels if needed:

{{Icon|Indoor|size=32}}

Indoor


Icon names reference[edit]

Location types[edit]

Indoor Indoor

Outdoor Outdoor

Urban Urban

Other icons[edit]

Files beginning with `Icon_` can be referenced by their name following that

{{Icon/sandbox|Cover|title=Uses cover|text=Uses Icon_Cover.png|size=24}}
{{Icon/sandbox|Nocover|title=Uses cover|text=Uses Icon_Nocover.png|size=24}}

Uses cover Uses Icon_Cover.png

Uses cover Uses Icon_Nocover.png


Complete filename can also be provided to render any image

{{Icon/sandbox|Equipment_Icon_Bag_Tier1|title=Bag|link=Equipment#Bag|size=62}}

Bag