Template:Software/Doc: Difference between revisions
Jump to navigation
Jump to search
(Created page with "<noinclude>{{doc|0}}</noinclude> <div style="display:flex;"><div style="flex:1;"> {{todo|See Template:Software/doc/draft}} {{todo|Replace the {{code|{{=}}suf}} method translations with /strings and {{code|<nowiki>#switch: {{language}}</nowiki>}} instead.}} {{tl|Software}} is the template that underlies the icon templates. It has 8 main parameters: {| width="100%" class="unsortable" style="overflow: hidden; border-radius:.4em; border:2px solid #adadad" |- bgcolor...") |
No edit summary |
||
| Line 14: | Line 14: | ||
| bgcolor="#e6e6e6" | The way the icon will be displayed. Displays the icon only when not specified. | | bgcolor="#e6e6e6" | The way the icon will be displayed. Displays the icon only when not specified. | ||
| bgcolor="#e6e6e6" | | | bgcolor="#e6e6e6" | | ||
{{param|1}} ► {{ | {{param|1}} ► {{of}} (without specifying numbers)<br> | ||
{{param|1|1}} ► {{ | {{param|1|1}} ► {{of|1}}<br> | ||
{{param|1|1.bold}} ► {{ | {{param|1|1.bold}} ► {{of|1.bold}}<br> | ||
{{param|1|2}} ► {{ | {{param|1|2}} ► {{of|2}}<br> | ||
{{param|1|2.bold}} ► {{ | {{param|1|2.bold}} ► {{of|2.bold}}<br> | ||
{{param|1|3}} ► {{ | {{param|1|3}} ► {{of|3}}<br> | ||
{{param|1|4}} ► {{ | {{param|1|4}} ► {{of|4}}<br> | ||
{{ExpandBox|title=Click "Expand" to see more| | {{ExpandBox|title=Click "Expand" to see more| | ||
{{param|1|3-darker}} ► {{ | {{param|1|3-darker}} ► {{of|3-darker}}<br> | ||
{{param|1|3.1}} ► {{ | {{param|1|3.1}} ► {{of|3.1}}<br> | ||
{{param|1|3.2}} ► {{ | {{param|1|3.2}} ► {{of|3.2}}<br> | ||
{{param|1|4-darker}} ► {{ | {{param|1|4-darker}} ► {{of|4-darker}}<br> | ||
{{param|1|4.1}} ► {{ | {{param|1|4.1}} ► {{of|4.1}}<br> | ||
{{param|1|4.2}} ► {{ | {{param|1|4.2}} ► {{of|4.2}}<br> | ||
}} | }} | ||
Enter "col" (without quotes) to get the text color of the game/software. | Enter "col" (without quotes) to get the text color of the game/software. | ||
Enter "in", "also", "only", "since", "removed" or "not" (without quotes) to get the icon displayed along with additional text, like "{{also|{{ | Enter "in", "also", "only", "since", "removed" or "not" (without quotes) to get the icon displayed along with additional text, like "{{also|{{of}}}}". | ||
{{Note|<nowiki>However, the {{{1}}} parameter cannot be touched, it should always be "{{{1}}}" in the icon templates!</nowiki>}} | {{Note|<nowiki>However, the {{{1}}} parameter cannot be touched, it should always be "{{{1}}}" in the icon templates!</nowiki>}} | ||
{{Note|Colored text should be used when appropriate, otherwise it would clutter the page.}} | {{Note|Colored text should be used when appropriate, otherwise it would clutter the page.}} | ||
| Line 36: | Line 36: | ||
| bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|name}}}} | | bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|name}}}} | ||
| bgcolor="#e6e6e6" | Simply display the name. However this param is also used to add the abbreviation of the game for example (when you create/edit this template).<br>{{Note|it is strongly recommended to write the abbreviation of the game in the parameter {{Param|name0}}, {{Param|name1}}, etc... or {{Param|nameiPadOS}} (if supported, in templates such as {{t|iOS}}.}} | | bgcolor="#e6e6e6" | Simply display the name. However this param is also used to add the abbreviation of the game for example (when you create/edit this template).<br>{{Note|it is strongly recommended to write the abbreviation of the game in the parameter {{Param|name0}}, {{Param|name1}}, etc... or {{Param|nameiPadOS}} (if supported, in templates such as {{t|iOS}}.}} | ||
| bgcolor="#e6e6e6" | {{ | | bgcolor="#e6e6e6" | {{of|name}} | ||
|- | |- | ||
| bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|bold}}}} | | bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|bold}}}} | ||
| bgcolor="#e6e6e6" | Same as above, with bold text. | | bgcolor="#e6e6e6" | Same as above, with bold text. | ||
| bgcolor="#e6e6e6" | {{ | | bgcolor="#e6e6e6" | {{of|bold}} | ||
|- | |- | ||
| bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|ico}}}} | | bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|ico}}}} | ||
| bgcolor="#e6e6e6" | The name of the icon is written here, but only the name itself, without "File:" and square brackets.<br>This same param is also used to display the icon you have specified when you create a new {{T|Software}} template. If the icon doesn't exist, it simply shows red link. | | bgcolor="#e6e6e6" | The name of the icon is written here, but only the name itself, without "File:" and square brackets.<br>This same param is also used to display the icon you have specified when you create a new {{T|Software}} template. If the icon doesn't exist, it simply shows red link. | ||
| bgcolor="#e6e6e6" | {{ | | bgcolor="#e6e6e6" | {{of|ico}} | ||
|- | |- | ||
| bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|ico size}}}} | | bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|ico size}}}} | ||
| bgcolor="#e6e6e6" | Width of the icon. Should be {{mono|16px}} for most icons, unless it's double, like {{hls}}, in which case it should be {{mono|32px}}, or more. Experimentation may be necessary for non-square icons. | | bgcolor="#e6e6e6" | Width of the icon. Should be {{mono|16px}} for most icons, unless it's double, like {{vcd:hls|Half-Life: Source}}, in which case it should be {{mono|32px}}, or more. Experimentation may be necessary for non-square icons. | ||
{{tip|The software icon should be scaled to be in-line with the text size (using {{mono|{{param|ico size}}}}). While this is nominally "16 pixels tall", high-DPI displays (particulary such as Apple Retina display, or 4K+ displays) will benefit from the file being higher resolutions; 32 or 64 pixels tall is generally sufficient, although any resolution can be used (MediaWiki will downscale the image automatically and only deliver the necessary resolution).}} | {{tip|The software icon should be scaled to be in-line with the text size (using {{mono|{{param|ico size}}}}). While this is nominally "16 pixels tall", high-DPI displays (particulary such as Apple Retina display, or 4K+ displays) will benefit from the file being higher resolutions; 32 or 64 pixels tall is generally sufficient, although any resolution can be used (MediaWiki will downscale the image automatically and only deliver the necessary resolution).}} | ||
| bgcolor="#e6e6e6" | N/A | | bgcolor="#e6e6e6" | N/A | ||
| Line 53: | Line 53: | ||
| bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|col}}}} | | bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|col}}}} | ||
| bgcolor="#e6e6e6" | The color of the game. If it is not specified, just do not enter this parameter, the standard color will be used: <span style="color:#ADD8E6;font-weight:bold">#ADD8E6</span>.<br> It's highly recommended that you use brighter color for better readability with dark/black pages, but not too bright or over-saturated. | | bgcolor="#e6e6e6" | The color of the game. If it is not specified, just do not enter this parameter, the standard color will be used: <span style="color:#ADD8E6;font-weight:bold">#ADD8E6</span>.<br> It's highly recommended that you use brighter color for better readability with dark/black pages, but not too bright or over-saturated. | ||
| bgcolor="#e6e6e6" | {{ | | bgcolor="#e6e6e6" | {{of|col}} | ||
|- | |- | ||
| bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|link}}}} | | bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|link}}}} | ||
| Line 62: | Line 62: | ||
| bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|addtext}}}} | | bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|addtext}}}} | ||
| bgcolor="#e6e6e6" | Additional text that will be written immediately after the icon. It is mainly needed to add other icons.<br>{{Note|Make sure to include {{Code|<nowiki>| addtext = {{{addtext|}}}</nowiki> }} in the icon templates!}} | | bgcolor="#e6e6e6" | Additional text that will be written immediately after the icon. It is mainly needed to add other icons.<br>{{Note|Make sure to include {{Code|<nowiki>| addtext = {{{addtext|}}}</nowiki> }} in the icon templates!}} | ||
| bgcolor="#e6e6e6" | {{code|<nowiki>{{hl2|4|addtext=®}}</nowiki>}} ► {{ | | bgcolor="#e6e6e6" | {{code|<nowiki>{{hl2|4|addtext=®}}</nowiki>}} ► {{of|4|addtext=®}} | ||
|- | |- | ||
| bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|nt}}}} | | bgcolor="#e6e6e6" align="center" | {{Code|style=2|{{Param|nt}}}} | ||
| bgcolor="#e6e6e6" | This parameter will be used in the {{Param|name<number>}} parameter, some software templates may also have {{Param|name<text>}}, such as {{t|iOS}} and {{t|Mac}}. | | bgcolor="#e6e6e6" | This parameter will be used in the {{Param|name<number>}} parameter, some software templates may also have {{Param|name<text>}}, such as {{t|iOS}} and {{t|Mac}}. | ||
{{Note|Make sure that the {{Code|<nowiki> | nt = {{{nt|}}}</nowiki>}} part must be included on the icon templates for it to work! This parameters requires text to be displayed using {{Param|1}} to use.}} | {{Note|Make sure that the {{Code|<nowiki> | nt = {{{nt|}}}</nowiki>}} part must be included on the icon templates for it to work! This parameters requires text to be displayed using {{Param|1}} to use.}} | ||
| bgcolor="#e6e6e6" | {{ | | bgcolor="#e6e6e6" | {{of|4|nt=0}} | ||
|- | |- | ||
|} | |} | ||
| Line 74: | Line 74: | ||
In the end, you should get something like this: | In the end, you should get something like this: | ||
{{CodeBlock|src=[[Template: | {{CodeBlock|src=[[Template:Open_Fortress]]|lines=12|<nowiki>{{doc|docpage=Template:Hl2/doc}} | ||
<includeonly><onlyinclude>{{Software | |||
| {{{1}}} | <includeonly> | ||
| ico = | |||
<onlyinclude>{{Software | |||
| ico size = 16px | | {{{1|}}} | ||
| link = | | ico = Icon-OpenFortress.png | ||
| name = {{#switch: {{ | | ico size = 16px | ||
| link = Open Fortress | |||
| name = {{#switch:{{ROOTPAGENAME}} | |||
| #default = Open Fortress | |||
}} | |||
| name0 = OF | |||
| suf = {{{suf|}}} | |||
| name0 = | | col = #574168 | ||
| | | addtext-front ={{{addtext-front|}}} | ||
| addtext ={{{addtext|}}} | |||
| nt ={{{nt|}}} | |||
}}</onlyinclude> | |||
</includeonly></nowiki>}} | |||
| addtext = {{{addtext|}}} | |||
| nt = {{{nt|}}} | |||
}}</onlyinclude></includeonly></nowiki>}} | |||
You can also copy and paste the code above to create a new icon template, or to convert old template ({{T|New icon}}) to {{T|Software}} and update {{T|Software}} templates. | You can also copy and paste the code above to create a new icon template, or to convert old template ({{T|New icon}}) to {{T|Software}} and update {{T|Software}} templates. | ||
| Line 113: | Line 108: | ||
! style="background-color:#b1c1da" | Result | ! style="background-color:#b1c1da" | Result | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}}} | ||
| {{ | | {{ of }} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|1}} | ||
| {{ | | {{of|1}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|2}} | ||
| {{ | | {{of|2}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|3}} | ||
| {{ | | {{of|3}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|3-darker}} | ||
| {{ | | {{of|3-darker}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|3.1}} | ||
| {{ | | {{of|3.1}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|3.2}} | ||
| {{ | | {{of|3.2}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|4}} | ||
| {{ | | {{of|4}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|4-darker}} | ||
| {{ | | {{of|4-darker}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|4.1}} | ||
| {{ | | {{of|4.1}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|4.2}} | ||
| {{ | | {{of|4.2}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|ico}} | ||
| {{ | | {{of|ico}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|col}} | ||
| {{ | | {{of|col}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|name}} | ||
| {{ | | {{of|name}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|bold}} | ||
| {{ | | {{of|bold}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|in}} | ||
| {{ | | {{of|in}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|only}} | ||
| {{ | | {{of|only}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|since}} | ||
| {{ | | {{of|since}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|not}} | ||
| {{ | | {{of|not}} | ||
|- bgcolor="#e6e6e6" | |- bgcolor="#e6e6e6" | ||
| {{tlc|{{lcfirst: | | {{tlc|{{lcfirst:of}}|also|addtext{{=}}&nbsp;{{tlf|csgo}} {{tlf|l4d2}}}} | ||
| {{ | | {{of|also|addtext= {{csgo}} {{l4d2}}}} | ||
|}</div> | |}</div> | ||
Latest revision as of 08:02, 4 January 2025
| Undocumented Template You can help the Open Fortress Wiki by writing it. Until then, you'll have to read the source to figure out how to use it anyway. Which, I mean, while you're over there already... just saying, you may as well... |
Todo: See Template:Software/doc/draft
Todo: Replace the
=suf method translations with /strings and #switch: {{language}} instead.{{Software}} is the template that underlies the icon templates. It has 8 main parameters:
Result & Copy and Paste
In the end, you should get something like this:
You can also copy and paste the code above to create a new icon template, or to convert old template ({{New icon}}) to {{Software}} and update {{Software}} templates.
Translations
Translations are handled by the {{In text}} Template.
How To Use
This is how the use of the template in articles will look like:
Template:Software
Summary
Aids in the creation of icon templates
Type
Metatemplate
Contributors
N/A
Creation date
04/04/2022
(04 April 2022)
(04 April 2022)
Notes
N/A
Subpages
Documentation
N/A
Preload
N/A
Sandbox
N/A
Strings
Testcases
N/A
Other
N/A
Revision information
Latest editor
Kate
Last edited
04/01/2025
20250104080231
20250104080231
Revision size
8396 bytes
8.396 kilobytes
0.008396 megabytes
8.396 kilobytes
0.008396 megabytes
Technical information
Page identifier
405
Contains translations
Yes
Uses parser functions?
Yes
Uses variables?
Yes