This is a documentation for Board Game Arena: play board games online !

Template:GameIcon: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
m (Template:InfoBox update)
m (Pages using)
 
Line 1: Line 1:
<span style="display:inline-flex;align-items:center;justify-content:space-around;position:relative;z-index:{{{z}}};height:calc(1px*{{{height}}});width:calc(1px*{{{width}}});overflow:hidden;color:{{{textColor|#000}}};font-family:Roboto,Arial,sans-serif;font-weight:700;font-size:16px;text-shadow:0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}};"><span style="position:absolute;left:calc(-1px*{{{x|0}}});top:calc(-1px*{{{y|0}}});transform-origin:top left;transform:scale({{{scale|1}}});">[[File:{{{imageFileName}}}|link=|{{{tooltip|&#8203;}}}]]</span><span style="position:relative;white-space:nowrap;">{{{|&ZeroWidthSpace;}}}</span></span><noinclude>
<onlyinclude><span style="display:inline-flex;align-items:center;justify-content:space-around;position:relative;z-index:{{{z}}};height:calc(1px*{{{height}}});width:calc(1px*{{{width}}});overflow:hidden;color:{{{textColor|#000}}};font-family:Roboto,Arial,sans-serif;font-weight:700;font-size:16px;text-shadow:0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}},0 0 2px {{{outlineColor|#fff0}}};"><span style="position:absolute;left:calc(-1px*{{{x|0}}});top:calc(-1px*{{{y|0}}});transform-origin:top left;transform:scale({{{scale|1}}});">[[File:{{{imageFileName}}}|link=|{{{tooltip|&#8203;}}}]]</span><span style="position:relative;white-space:nowrap;">{{{|&ZeroWidthSpace;}}}</span></span></onlyinclude>


{{infoBox |maxWidth= |color=#37c |titleAlign=left
{{infoBox |maxWidth= |color=#37c |titleAlign=left
Line 25: Line 25:
:{{code|c=black|<nowiki>}}<</nowiki>noinclude<nowiki>></nowiki>}}
:{{code|c=black|<nowiki>}}<</nowiki>noinclude<nowiki>></nowiki>}}
:{{code|c=black|<nowiki>[[Category:</nowiki>WikiTemplates<nowiki>]]</nowiki>}}
:{{code|c=black|<nowiki>[[Category:</nowiki>WikiTemplates<nowiki>]]</nowiki>}}
:{{code|c=black|<nowiki><</nowiki>noinclude<nowiki>></nowiki>}}
:{{code|c=black|<nowiki></</nowiki>noinclude<nowiki>></nowiki>}}


{{pill|Minimum:|#800|#620}}
{{pill|Minimum:|#800|#620}}
Line 74: Line 74:
}}<nowiki><</nowiki>noinclude<nowiki>>
}}<nowiki><</nowiki>noinclude<nowiki>>
[[Category:JumpDriveIcons]]
[[Category:JumpDriveIcons]]
<</nowiki>noinclude<nowiki>></nowiki>
</</nowiki>noinclude<nowiki>></nowiki>
</pre>
</pre>
}}
}}
Line 103: Line 103:
}}<nowiki><</nowiki>noinclude<nowiki>>
}}<nowiki><</nowiki>noinclude<nowiki>>
[[Category:SpaceStationPhoenixIcons]]
[[Category:SpaceStationPhoenixIcons]]
<</nowiki>noinclude<nowiki>></nowiki>
</</nowiki>noinclude<nowiki>></nowiki>
</pre>
</pre>
}}
}}
Line 163: Line 163:
   <div>'''''Optional:''''' text outline color as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS color] e.g. <code>green</code>.</div>
   <div>'''''Optional:''''' text outline color as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS color] e.g. <code>green</code>.</div>
</div>
</div>
== Pages using {{FULLPAGENAME}} ==
{{Special:WhatLinksHere/{{FULLPAGENAME}}}}


[[Category:GameIconTemplates]]
[[Category:GameIconTemplates]]
</noinclude>

Latest revision as of 13:55, 28 September 2026

[[File:{{{imageFileName}}}|link=|​]]​

Step 1
Upload YourImage.png
Step 2
Go to https://en.doc.boardgamearena.com/Template:YourIcon
(replace YourIcon🡅)

Copy & paste this into it:

{{gameIcon
|tooltip=
|imageFileName=
|scale=1
|width=
|height=
|x=0
|y=0
|={{{1|&ZeroWidthSpace;}}}
|textColor=black
|outlineColor=white
}}<noinclude>
[[Category:WikiTemplates]]
</noinclude>

Minimum:

|imageFileName= paste the file name here
|width= pixels width of your icon
|height= pixels height of your icon

You can check the file name via the list of uploaded files.

Optional:

|scale= for smaller icons, set it somewhere between 0.1 and 1
|tooltip= one or more words that appear on hover

If you create multiple icons:

|x= set the x(/y) position inside your image
[[Category:you can link them together in your own category]]
e.g. [[Category:GameNameIcons]]
Step 3
Insert {{YourIcon}} into a wiki page!

Examples

Jump Drive

Step 1
Upload JumpDriveIcons.png (450×30 pixels)JumpDriveIcons.png.
Step 2
Create https://en.doc.boardgamearena.com/Template:JumpDriveGenes:
{{gameIcon
|tooltip=Genes
|imageFileName=JumpDriveIcons.png
|width=30
|height=30
|x=60
|y=0
|={{{1|&ZeroWidthSpace;}}}
|textColor=black
|outlineColor=white
}}<noinclude>
[[Category:JumpDriveIcons]]
</noinclude>
Step 3
Insert {{JumpDriveGenes|1}} genes1 in Gamehelpjumpdrive.

Space Station Phoenix

Step 1
Upload SpaceStationPhoenixIcons.png (700×100 pixels).SpaceStationPhoenixIcons.png
Step 2
Create https://en.doc.boardgamearena.com/Template:SSPShipFarm:
{{gameIcon
|tooltip=Farm ship
|imageFileName=SpaceStationPhoenixIcons.png
|width=85
|height=50
|x=500
|y=50
}}<noinclude>
[[Category:SpaceStationPhoenixIcons]]
</noinclude>
Step 3
Insert {{SSPShipFarm}} Farm ship​ in Gamehelpspacestationphoenix.

Parameters

Parameter
Default value
Example
Description
tooltip
&ZeroWidthSpace;
|tooltip=Resource
Optional: tooltip to display on hover.
imageFileName
null
|imageFileName=YourImage.png
Required: uploaded image file name including file format (i.e. .png, .jpg etc.).
scale
1
|scale=0.5
Optional: scale the image with its origin in the top left corner.
width
null
|width=30
Required: icon width in px units.
height
null
|height=30
Required: icon height in px units.
x
0
|x=60
Optional: x-axis (horizontal) position in px units.
y
0
|y=30
Optional: y-axis (vertical) position in px units.
z
null
|z=2
Optional: z-axis (stacking order) position.
null
&ZeroWidthSpace;
|={{{1|&ZeroWidthSpace;}}}
Optional: text value e.g. via another variable using triple curly braces.
textColor
#000
(black)
|textColor=green
Optional: text color as a CSS color e.g. green.
outlineColor
#fff0
(transparent white)
|outlineColor=green
Optional: text outline color as a CSS color e.g. green.

Pages using Template:GameIcon