Template:ModlistFlag: Difference between revisions

From Step Mods | Change The Game
No edit summary
No edit summary
Line 1: Line 1:
<includeonly><div style="background-color:{{{tagBG|#40804d}}}; background:-webkit-linear-gradient({{{tagBG|#40804d}}}, {{{tagGrad|#7db388}}}); background:-moz-linear-gradient({{{tagBG|#40804d}}}, {{{tagGrad|#7db388}}}); background:-o-linear-gradient({{{tagBG|#40804d}}}, {{{tagGrad|#7db388}}}); background:linear-gradient({{{tagBG|#40804d}}}, {{{tagGrad|#7db388}}}); border-radius:2px; display:inline-block; margin:0 0.5em 0 0; padding:0 0.5em; text-align:center; vertical-align:middle;"><span style="font-size:1.1em; font-weight:bold; color:{{{tagFont|#dddddd}}};">{{#switch:{{{mlFlag|}}}
<includeonly><div style="background-color:{{{flagBG|#40804d}}}; background:-webkit-linear-gradient({{{flagBG|#40804d}}}, {{{flagGrad|#7db388}}}); background:-moz-linear-gradient({{{flagBG|#40804d}}}, {{{flagGrad|#7db388}}}); background:-o-linear-gradient({{{flagBG|#40804d}}}, {{{flagGrad|#7db388}}}); background:linear-gradient({{{flagBG|#40804d}}}, {{{flagGrad|#7db388}}}); border-radius:2px; display:inline-block; margin:0 0.5em 0 0; padding:0 0.5em; text-align:center; vertical-align:middle;"><span style="font-size:1.1em; font-weight:bold; color:{{{tagFont|#dddddd}}};">{{#switch:{{{mlFlag|}}}
|Dawnguard=DG
|Dawnguard=DG
|Hearthfire=HF
|Hearthfire=HF
Line 10: Line 10:
== Purpose & Usage ==
== Purpose & Usage ==
This is a helper template that is primarily used for the [[:Template:modlisting|modlist template]].
This is a helper template that is primarily used for the [[:Template:modlisting|modlist template]].
=== Required Parameters ===
; mlFlag
: Defines the keyword or text displayed for the flag. Users can enter any text and the flag will display that text. The text can be formatted within this parameter, as well. However, the following keywords are pre-defined and will default to a pre-defined style.
::* '''Dawnguard''' = DG
::* '''Hearthfire''' = HF
::* '''Dragonborn''' = DB
=== Optional Parameters ===
; flagBG
: Defined: <code>flagBG=''value''</code>
: Default: ''#40804d''
: Defines the background color of the flag. Accepts any valid CSS for color.
; flagGrad
: Defined: <code>flagGrad=''value''</code>
: Default: ''#7db388''
: Defines the gradient color the background will fade into (top to bottom). Accepts any valid CSS for color.


== Examples ==
== Examples ==
Simplest call will use the defaults.
: '''Code:''' <code><nowiki>{{modlistFlag|mlFlag=Custom}}</nowiki></code>
: '''Code:''' <code><nowiki>{{modlistFlag|mlFlag=Custom}}</nowiki></code>
: '''Result:'''
: '''Result:'''

Revision as of 00:29, November 3, 2020


Template:ModlistFlag[edit source]

Discussion:

Purpose & Usage[edit source]

This is a helper template that is primarily used for the modlist template.

Required Parameters[edit source]

mlFlag
Defines the keyword or text displayed for the flag. Users can enter any text and the flag will display that text. The text can be formatted within this parameter, as well. However, the following keywords are pre-defined and will default to a pre-defined style.
  • Dawnguard = DG
  • Hearthfire = HF
  • Dragonborn = DB

Optional Parameters[edit source]

flagBG
Defined: flagBG=value
Default: #40804d
Defines the background color of the flag. Accepts any valid CSS for color.
flagGrad
Defined: flagGrad=value
Default: #7db388
Defines the gradient color the background will fade into (top to bottom). Accepts any valid CSS for color.


Examples[edit source]

Simplest call will use the defaults.

Code: {{modlistFlag|mlFlag=Custom}}
Result:
Custom

Related Templates[edit source]

Template:modlisting