Template:Fc: Difference between revisions

From Step Mods | Change The Game
mNo edit summary
 
(12 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly><span class="{{#switch:{{lc:{{{1|}}}}}
<includeonly><span class="{{#switch:{{lc:{{{1|}}}}}
| red | warning | warn = redtx
| red | warn | warning = redtx
| salmon | instruction | heading = salmontx
| salmon | instruction | heading | note | notice = salmontx
| orange = orangetx
| orange = orangetx
| yellow | issue = yellowtx
| yellow | issue = yellowtx
| chartr | bug = chartrtx
| chartr | bug = chartrtx
| green = greentx
| green = greentx
| blue | notice = bluetx
| blue = bluetx
| purple | dev = purpletx
| purple | dev = purpletx
| magenta = magenttx
| magenta = magenttx
| important | highlight | brighter = hltx
| important | highlight | bright | brighter = hltx
| dimmer | dim = dimtx
| dim | dimmer = dimtx
| #default = }}">{{{text|{{{2|}}}}}}</span></includeonly><noinclude>__NOTOC__ [[Category:Formatting Templates]][https://stepmodifications.org/forum/topic/9769-font-color/ '''Forum Topic''']
| #default = }}">{{{text|{{{2|}}}}}}</span></includeonly><noinclude>__NOTOC__ [[Category:Formatting Templates]][https://stepmodifications.org/forum/topic/9769-font-color/ '''Forum Topic''']


==Purpose & Usage==
==Purpose & Usage==
This template is used to change text color in accordance with the [[Project:SiteColorPallet|site color pallet]]. Deviation from this template using inline styling or other means is not recommended.
This template is used to change text color in accordance with the [[Project:SiteColorPallet|site color pallet]]. Deviation from this template using inline styling or other means is not recommended.
{{Alert|text=Always use a 'named' second parameter (text) when using this template to color text that includes an equal ('=') symbol to avoid parser errors.}}


=== Required Parameters ===
=== Required Parameters ===
<span class="salmontx">'''title'''</span> - Sets the title
This template uses 'anonymous' and optionally 'named' parameters, and all are required and must appear in a particular order.
: '''Values'''
:: Default: n/a, <code>title=''TitleHere''</code>


=== Optional Parameters ===
<span class="salmontx">'''First Prameter - color'''</span> - Sets the color of text
<span class="salmontx">'''logo'''</span> - Displays a logo to the left of the content
: '''Values'''
: '''Values'''
:: Default: <code>logo=delta</code>
:: See Color Table
:* ''delta''
:* fo3
:* fo4
:* fnv
:* mo, mo2
:* morrowind
:* nomanssky
:* oblivion
:* nomanssky, nms
:* skyrim, skyrimle
:* skyrimse


<span class="salmontx">'''subtitle'''</span> - Sets a subtitle
<span class="salmontx">'''Second Prameter - text'''</span> - Sets the text to be colored
: '''Values'''
: '''Values'''
:: Default: n/a, <code>subtitle=''SubtitleHere''</code>
:: Free text (this parameter can also be 'named' if the text to be colored includes an equal ('=') symbol)


<span class="salmontx">'''author'''</span> - Sets a subtitle
=== Optional Parameters ===
: '''Values'''
Not applicable.
:: Default: n/a, <code>author=''Author(s)Here''</code>
 
<span class="salmontx">'''forumtid'''</span> - Sets a forum link if a support forum exists for the page. The <uniqueForumID> is found in the forum topic's URL:<br>{{Fc|dim|<nowiki>https://stepmodifications.org/forum/topic/</nowiki>{{Fc|yellow|'''14917'''}}<nowiki>-system-setup-guide/</nowiki>}}
: '''Values'''
:: Default: n/a, <code>forumtid=''14917''</code>


==Examples==
== Color Table ==
===Default Call===
The following is a table of the colors supported by the Step Wiki to maintain compatibility with site themes and colors. See the [[Project:SiteColorPallet|Site Color Usage]] for more in-depth information regarding the use of colors, including their Hex and CSS values, which will be useful for any custom development on user pages, theming, etc.
The simplest call returns defaults for the template.
: '''Code:''' <code><nowiki>{{PageTitle|title=Title Here}}</nowiki></code>
: '''Result:'''
:: {{PageTitle|title=Title Here}}
<hr>
<hr>
===Parameters:===
: '''Template:''' <code><nowiki>{{Fc|keyword|displayedText}}</nowiki></code>
 
; {{Fc|red|''<nowiki>1 (color keyword)</nowiki>''}}
: This this the first ( {{{1}}} ) anonymous parameter. It accepts color keywords, which control the color of the text. The available keywords are in the table below.
: '''Default:''' ''blank'', which results in the inherited color displaying
: '''How to use:'''  <code><nowiki>{{Fc|notice|displayedText}}</nowiki></code>
 
; {{Fc|red|''<nowiki>2 / text</nowiki>''}}
: This is the second ( {{{2}}} ) anonymous parameter. It is the text that displays.
: '''Default:''' ''blank'', which results in no text being displayed.
: '''How to use:''' <code><nowiki>{{Fc|notice|BlahBlahBlah}}</nowiki></code>
:
:: By default, there is no need to name this parameter, however, there is a bug that exists when parsing the template that include "=" characters within this parameter. Essentially, the first instance of this character will break the template. To fix this, the second anonymous parameter is nested within a named parameter. Therefore, any time a "=" character has to be included within the displayed text, users will have to call the named parameter, {{Fc|red|'''''<nowiki>text</nowiki>'''''}}.
:: '''How to use:''' <code><nowiki>{{Fc|notice|text=BlahBlahBlah=3}}</nowiki></code>
 
=== Color Table ===
Only the colors listed below are available for use. The reason the colors are restricted is that the Wiki supports themes; thus, the available colors have been carefully selected to work with all available themes.
 
The following is a table of the colors supported by the Step Wiki. See the [[Project:SiteColorPallet|Site Color Usage]] for more in-depth information regarding the use of colors, including their Hex and CSS values, which will be useful for any custom development on user pages, theming, etc. The keywords are required for the template and will produce their respective colors, thus, have been included below with some usage information to guide users. Bad keywords will result in no effect, thus, the ''inherited'' text color from the ''parent'' will display.


{| class="wikitable mb-5"
{| class="wikitable mb-5"
|-
|-
! class="text-left" | Keywords
! class="text-left" | Key Words (first parameter)
! class="text-left" | Usage
! class="text-left" | Usage
|-
|-
| {{Template:Fc|red|red, warning}}   
| {{Template:Fc|red|red, warn, warning}}   
| Warning text without an "Alert" template, dropped mods, required elements, etc.
| Warning text without an "Alert" template, dropped mods, required elements, etc.
|-
|-
| {{Template:Fc|salmon|salmon, instruction, heading}}
| {{Template:Fc|salmon|salmon, instruction, heading, note, notice}}
| Emphasis within instruction sets, alterative color for headings, etc.
| Should be the most prevalent "callout" text color for notes and special instructions. Preferred over [[:Template:AlertSmall]]
|-
|-
| {{Template:Fc|orange|orange}}
| {{Template:Fc|orange|orange}}
Line 96: Line 52:
|-
|-
| {{Template:Fc|chartr|chartr, bug}}
| {{Template:Fc|chartr|chartr, bug}}
| Call out bugs, etc.
| Chartreuse text; can represent 'bug' notes, etc.
|-
|-
| {{Template:Fc|green|green}}
| {{Template:Fc|green|green}}
| Call attention to additions, etc.
| Green text
|-
|-
| {{Template:Fc|blue|blue, notice}}
| {{Template:Fc|blue|blue}}
| Notice text without an "Alert" template, etc.<br>{{fc|warning|''Try not to use this color for {{fc|notice|short phases}} as it can resemble {{fc|notice|links}}.''}}
| Use sparingly. {{fc|warning|''Do not use for {{fc|blue|short phases}} as it can resemble {{fc|blue|links}}.''}}
|-
|-
| {{Template:Fc|purple|purple, dev}}
| {{Template:Fc|purple|purple, dev, development}}
| Call out development, etc.
| Call out development, etc.
|-
|-
| {{Template:Fc|magenta|magenta}}
| {{Template:Fc|magenta|magenta}}
| Unknown, but it was requested by users.
| Magenta text.
|-
|-
| {{Template:Fc|highlight|highlight, important, brighter}}
| {{Template:Fc|highlight|highlight, important, bright, brighter}}
| Emphasis within normal text or additional emphasis within instruction sets, etc.
| Secondary emphasis within normal text (salmon preferred), instructions, and notes
|-
|-
| {{Template:Fc|dimmer|dimmer, dim}}
| {{Template:Fc|dim|dim, dimmer}}
| Sub/Sup text, etc.
| Subtle text used for de-emphasis
|}
|}


== Examples ==
==Examples==
===Default Call===
No applicable (all parameters must be specified)
 
===Fully Specified===
'''Code:'''
'''Code:'''
<pre>{{fc|instruction|The {{Fc|highlight|important part}} of an instruction is highlighted.}}</pre>
<pre>{{Fc|instruction|The {{Fc|highlight|important part}} of an instruction is highlighted.}}</pre>
'''Result:''' {{fc|instruction|The {{Fc|highlight|important part}} of an instruction is highlighted.}}
'''Result:''' {{Fc|instruction|The {{Fc|highlight|important part}} of an instruction is highlighted.}}


<hr class="my-5">
<hr class="my-5">


'''Code:'''
'''Code:'''
<pre>{{fc|highlight|text=Use the ''text'' parameter when "=" characters are used.}}</pre>
<pre>{{Fc|green|text=Use the ''text'' parameter when "=" characters are used.}}</pre>
'''Result:''' {{fc|highlight|text=Use the ''text'' parameter when "=" characters are used.}}
'''Result:''' {{Fc|green|text=Use the ''text'' parameter when "=" characters are used.}}


<hr class="my-5">
<hr class="my-5">


'''Code:'''
'''Code:'''
<pre>{{fc|nonsense|Bad key words}} don't affect text color.</pre>
<pre>{{Fc|nonsense|Undefined parameter key words}} don't affect text color.</pre>
'''Result:''' {{fc|nonsense|Bad key words}} don't affect text color.
'''Result:''' {{Fc|nonsense|Undefined parameter key words}} don't affect text color.


== See Also ==
== See Also ==
[[:Template:Fs]]<br>
[[:Template:Fs]]<br>
[[Project:SiteColorPallet|Site Color Pallet]]
[[Project:SiteColorPallet|Site Color Usage]]
</noinclude>
</noinclude>

Latest revision as of 19:57, September 22, 2021

Forum Topic

Purpose & Usage[edit source]

This template is used to change text color in accordance with the site color pallet. Deviation from this template using inline styling or other means is not recommended.

Info-Logo.png

NOTE

Always use a 'named' second parameter (text) when using this template to color text that includes an equal ('=') symbol to avoid parser errors.

Required Parameters[edit source]

This template uses 'anonymous' and optionally 'named' parameters, and all are required and must appear in a particular order.

First Prameter - color - Sets the color of text

Values
See Color Table

Second Prameter - text - Sets the text to be colored

Values
Free text (this parameter can also be 'named' if the text to be colored includes an equal ('=') symbol)

Optional Parameters[edit source]

Not applicable.

Color Table[edit source]

The following is a table of the colors supported by the Step Wiki to maintain compatibility with site themes and colors. See the Site Color Usage for more in-depth information regarding the use of colors, including their Hex and CSS values, which will be useful for any custom development on user pages, theming, etc.

Key Words (first parameter) Usage
red, warn, warning Warning text without an "Alert" template, dropped mods, required elements, etc.
salmon, instruction, heading, note, notice Should be the most prevalent "callout" text color for notes and special instructions. Preferred over Template:AlertSmall
orange Call attention to changes such as updates or file moves, etc.
yellow, issue Call attention to issues, etc.
chartr, bug Chartreuse text; can represent 'bug' notes, etc.
green Green text
blue Use sparingly. Do not use for short phases as it can resemble links.
purple, dev, development Call out development, etc.
magenta Magenta text.
highlight, important, bright, brighter Secondary emphasis within normal text (salmon preferred), instructions, and notes
dim, dimmer Subtle text used for de-emphasis

Examples[edit source]

Default Call[edit source]

No applicable (all parameters must be specified)

Fully Specified[edit source]

Code:

{{Fc|instruction|The {{Fc|highlight|important part}} of an instruction is highlighted.}}

Result: The important part of an instruction is highlighted.


Code:

{{Fc|green|text=Use the ''text'' parameter when "=" characters are used.}}

Result: Use the text parameter when "=" characters are used.


Code:

{{Fc|nonsense|Undefined parameter key words}} don't affect text color.

Result: Undefined parameter key words don't affect text color.

See Also[edit source]

Template:Fs
Site Color Usage