Template:Software/doc: Difference between revisions
Jump to navigation
Jump to search
Note:however, the {{{1}}} parameter cannot be touched, it should always be "{{{1}}}" in the icon templates!
Tip:The software icon should be scaled to be in-line with the text size (using {{{ico size}}}). While this is nominally "16 pixels tall", high-DPI displays (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:For Wikipedia links, prepend "Wikipedia:" to the page name (ex: Wikipedia:Gabe Newell)
Note:it is strongly recommended to write the abbreviation of the game in the parameter {{{name0}}}, {{{name1}}}, etc... or {{{nameiPadOS}}} (if supported, in templates such as {{iOS}}.
Note:Make sure to include | addtext = {{{addtext|}}} in the icon templates!
Note:Make sure that the | nt = {{{nt|}}} part must be included on the icon templates for it to work!
(username removed) No edit summary |
(Undo revision 392009 by HaammerEditoor (talk)) Tag: Undo |
||
Line 7: | Line 7: | ||
*{{Param}} – the way the icon will be displayed. | *{{Param}} – the way the icon will be displayed. | ||
** Do not enter this value if you need a regular icon. | ** Do not enter this value if you need a regular icon. | ||
** Enter 1 to get the name of the game with a link to an article about the game. | |||
*** {{param|1|1}} ► {{hl2|1}} | |||
** Enter 2 to get the icon and the name of the game after it. | |||
*** {{param|1|2}} ► {{hl2|2}} | |||
** Enter 3 to get the same as in the case of the number 1, but with an additional design with colored text.Add {{code|-darker}} after the number to make the background darker to make the text and icon more visible on light background). | ** Enter 3 to get the same as in the case of the number 1, but with an additional design with colored text.Add {{code|-darker}} after the number to make the background darker to make the text and icon more visible on light background). | ||
*** {{param|1|3}} ► {{hl2|3}} | *** {{param|1|3}} ► {{hl2|3}} | ||
Line 43: | Line 46: | ||
| {{{1}}} | | {{{1}}} | ||
| ico = portal2 icon.png <!-- Icons with higher-resolution (256px or more for example) are now supported. | | ico = portal2 icon.png <!-- Icons with higher-resolution (256px or more for example) are now supported. | ||
User | User with low DPI monitor will see 16px, but users with 4K/Apple Retina will see 32px or higher, providing better quality. --> | ||
| ico size = 16px <!-- Note: This should always be kept at or near 16px, even with higher-res icon, unless the image is wider. For example, a 1:2 aspect ratio would be 32px. --> | |||
| link = Portal 2 | |||
| name = {{Autolang|Portal 2|ko=포탈 2|zh=传送门 2|zh-tw=傳送門 2}} | |||
<!-- Autolang is now used for translation, which is done automatically by selecting the languages in the language toolbar. Suf-based translation are now deprecated. --> | <!-- Autolang is now used for translation, which is done automatically by selecting the languages in the language toolbar. Suf-based translation are now deprecated. --> | ||
| | | name0 = portal2 | ||
| namePortal 2 = {{Autolang|Portal 2|ko=포탈 2|zh=传送门 2|zh-tw=傳送門 2}} | |||
| namemoddir = portal2 | |||
| col = #23B1E5 | |||
| addtext = {{{addtext|}}} | |||
| nt = {{{nt|}}} | | nt = {{{nt|}}} | ||
}}</onlyinclude></includeonly></nowiki>}} | }}</onlyinclude></includeonly></nowiki>}} | ||
Line 57: | Line 67: | ||
This is how the use of the template in articles will look like: | This is how the use of the template in articles will look like: | ||
{| class="sortable" style="overflow: hidden; border-radius:.4em; border:2px solid #525252" | {| class="sortable" style="overflow: hidden; border-radius:.4em; border:2px solid #525252" | ||
|- bgcolor="#3A3A3A" | |- bgcolor="#3A3A3A" style="white-space:nowrap" | ||
! style="background-color:#4E3E25" | Code | |||
! style="background-color:#4E3E25" | Result | |||
|- bgcolor="#3A3A3A" | |- bgcolor="#3A3A3A" | ||
| {{tlc|{{lcfirst:portal2}}}} | | {{tlc|{{lcfirst:portal2}}}} | ||
| {{ | | {{ portal2 }} | ||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|1}} | |||
| {{portal2|1}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|2}} | |||
| {{portal2|2}} | |||
|- bgcolor="#3A3A3A" | |||
| {{tlc|{{lcfirst:portal2}}|3}} | |||
| {{portal2|3}} | | {{portal2|3}} | ||
|- bgcolor="#3A3A3A" | |- bgcolor="#3A3A3A" | ||
Line 109: | Line 129: | ||
|}</div> | |}</div> | ||
<div>{{infobox template | |||
| summary = Aids in the creation of icon templates | |||
| type = Metatemplate | |||
| creationdate = 04/04/2022<br><small>(04 April 2022)</small> | |||
| translation = Yes | |||
| parser = Yes | |||
| var = Yes | |||
}}</div></div> | }}</div></div> |
Revision as of 12:59, 24 March 2024

This is a documentation subpage for Template:Software.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Don't forget to purge the contents of the base page upon creating or editing this subpage.
Todo: See Template:Software/doc/draft
Todo: Replace the complicated =suf method translations with /strings and
{{autolang}}
+ {{uselangflags}}
one instead.{{Software}}
is the template that underlies the icon templates. It has 8 main parameters:
- {{{1}}} – the way the icon will be displayed.
- Do not enter this value if you need a regular icon.
- Enter 1 to get the name of the game with a link to an article about the game.
- {{{1|1}}} ► Half-Life 2
- Enter 2 to get the icon and the name of the game after it.
- {{{1|2}}} ►
Half-Life 2
- {{{1|2}}} ►
- Enter 3 to get the same as in the case of the number 1, but with an additional design with colored text.Add -darker after the number to make the background darker to make the text and icon more visible on light background).
- {{{1|3}}} ► Half-Life 2
- {{{1|3-darker}}} ► Half-Life 2
- Enter 4 to get the same as in the case of the number 2, but with an additional design with colored text. Add -darker after the number to make the background darker to make the text and icon more visible on light background).
- {{{1|4}}} ►
Half-Life 2
- {{{1|4-darker}}} ►
Half-Life 2
- {{{1|4}}} ►
- Enter 3.1 or 4.1 will get the same effect as above, but without the shadow behind the text and icon.
- {{{1|3.1}}} ► Half-Life 2
- {{{1|4.1}}} ►
Half-Life 2
- Enter 3.2 or 4.2 will get the same effect as above, but with different drop shadow effect.
- {{{1|3.2}}} ► Half-Life 2
- {{{1|4.2}}} ►
Half-Life 2
- Enter "col" (without quotes) to get the color of the game. This is mainly needed for other templates.
- Enter "in", "also", "only", "since", "removed" or "not" (without quotes) to get the icon displayed along with additional text, like "(also in <game icon>)".

- {{{ico}}} – the name of the icon is written here, but only the name itself, without "File:" and square brackets. Recommended name (not required): file:hl2 icon.png for {{hl2}}
- {{{ico size}}} - width of the icon. Should be 16px for most icons, unless it's double, like
, in which case it should be 32px, or more. Experimentation may be necessary for non-square icons.

- {{{link}}} – link to the article, External links do not work. If not used, the link will use the {{{name}}} parameter.
Write without the brackets. Underscores and spaces are interchangeable.

- {{{name}}} – display name.
- {{{name}}} – this parameter displays an alternate name based on the {{{nt}}} parameter.

- {{{col}}} – the color of the game. If it is not specified, just do not enter this parameter, the standard color will be used: #ADD8E6.
It's highly recommended that you use brighter color for better readability with dark/black pages. - {{{addtext}}} – additional text that will be written immediately after the icon. It is mainly needed to add other icons.

- {{{nt}}} – this parameter will be used in the {{{name<number>}}} parameter, some may also have {{{name<text>}}}, such as {{iOS}} and {{Mac}}.

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.
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
Preload
N/A
Sandbox
Strings
Testcases
N/A
Other
N/A
Revision information
Latest editor
Mr. SystemError
Last edited
24/03/2024
20240324125955
20240324125955
Revision size
7715 bytes
7.715 kilobytes
0.007715 megabytes
7.715 kilobytes
0.007715 megabytes
Technical information
Page identifier
46333
Contains translations
Yes
Uses parser functions?
Yes
Uses variables?
Yes