Template:Tag: Difference between revisions

From Step Mods | Change The Game
(uploaded with x-external-editor)
mNo edit summary
 
(107 intermediate revisions by 4 users not shown)
Line 1: Line 1:
{{#if: {{{1|}}} | {{#switch: {{{1|}}}
<includeonly><span class="{{{bg|blue}}}bg {{{bd|yellow}}}bd {{{tx|hl}}}tx px-1" style="cursor:default; border-radius:2px; width:auto; border: 2px solid transparent; text-align:center; font-family: Montserrat,sans-serif!important">'''''{{{text}}}'''''</span></includeonly><noinclude>__NOTOC__ [[Category:Formatting Templates]]
|doc={{#vardefine:docimage|Doctag.png}}
 
|content=Contenttag.png
== Purpose & Usage ==
|step=Steptag.png
Create tags to use as indicators where appropriate (DO NOT overuse this!). This template makes use of custom CSS classes to display theme-friendly colors. Reference the [[Project:SiteColorPallet|Site Color Pallet]] for CSS classes.
}}
 
{{#var:docimage}}
<pre>{{Tag|bg|bd|tx|text}}</pre>
}}<noinclude>
 
<div title="This is the tooltip" style="background-color:{{{3}}};border:1px solid {{{4}}};height:18px;width:{{{2}}}px;margin:0;padding:0;{{#ifeq: {{{8|}}} | - | opacity:0.5;}}">
== Examples ==
<div style="float:left;width:20px;height:18px;border-right:1px solid {{{4}}};text-align:center;background-color:{{{5}}};margin:0;padding:0;">
===Default Call===
[[File:Doctag.png|frameless|link=]]</div><div style="float:left;margin:0;padding:0 2px;">
'''Code:'''
<span style="color:{{{7}}};font-weight:bold;">{{{6}}}</span>
<pre>some text {{Tag|text=TAG}} some text</pre>
</div>
'''Result:'''
</div>
some text {{Tag|text=TAG}} some text
<pre>
<br>
{{Tag|tag|width|bgcolor|border color|left bgcolor|text|text color}}
<hr>
{{Tag|tag|text|enable}}
<br>
tag = doc, content, step
'''Code:'''
text = Text in right portion
<pre>some text {{Tag|bg=mpurple|bd=magent|tx=hl|text=TAG}} some text</pre>
enable = blank for enable, - for disable
'''Result:'''
</pre>
some text {{Tag|bg=mpurple|bd=magent|tx=hl|text=TAG}} some text
<br>
<hr>
<br>'''Code:'''
<pre>some text {{Tag|bg=yellow|bd=purple|tx=dim|text=Long Tag}} some text</pre>
'''Result:'''
some text {{Tag|bg=yellow|bd=purple|tx=dim|text=Long Tag}} some text
 
== See Also ==
<!--
[[:RELATED TEMPLATE NAME AND ARGUMENTS]]
-->
None
 
</noinclude>
</noinclude>
{{#css:
.tag {
margin: 0;
padding: 0;
height: 18px;
}
.tag.disable {
opacity: 0.5;
}
.icon {
float: left;
width: 20px;
height: 18px;
text-align: center;
}
.tag span {
font-weight: bold;
}
}}

Latest revision as of 18:25, September 20, 2021


Purpose & Usage

Create tags to use as indicators where appropriate (DO NOT overuse this!). This template makes use of custom CSS classes to display theme-friendly colors. Reference the Site Color Pallet for CSS classes.

{{Tag|bg|bd|tx|text}}

Examples

Default Call

Code:

some text {{Tag|text=TAG}} some text

Result: some text TAG some text



Code:

some text {{Tag|bg=mpurple|bd=magent|tx=hl|text=TAG}} some text

Result: some text TAG some text



Code:

some text {{Tag|bg=yellow|bd=purple|tx=dim|text=Long Tag}} some text

Result: some text Long Tag some text

See Also

None