Template:Software inline: Difference between revisions
Jump to navigation
Jump to search
Note:Two template styling options (colored text) were left as something that could be used in some situations, but not everywhere.
Note:All links are colored in the color of the visited link, since external links and links to Wikipedia become more difficult to read after visiting. If you have a better color for this situation, simply replace all occurrences of the color #5081D1 in the template code.
(Created page with "<includeonly><onlyinclude><span style="{{#ifeq:{{{2|}}}|2|background:#00000059; padding:2px; border-radius:4px;}} white-space:nowrap; display:inline-flex; gap:.35ch; align-ite...") |
mNo edit summary |
||
Line 21: | Line 21: | ||
| icon = Portal2-16px.png | | icon = Portal2-16px.png | ||
| icon size = {{{icon size|}}} | | icon size = {{{icon size|}}} | ||
| link = Portal 2 | | link = {{{link|Portal 2}}} | ||
| name = Portal 2 | | name = {{{String|en=Portal 2|ru=Портал 2}} | ||
}}</nowiki>}} | }}</nowiki>}} | ||
Revision as of 10:13, 18 June 2024
This template is an improved and simplified version of template Template:Software.


Parameters
- {{{1}}}, {{{2}}} – specially prepared code is written into these parameters for the convenient ability to select styles and display type in child templates (see example below).
- {{{name}}} – The name that will be displayed. It is recommended to use the String template in this parameter to add a name translation.
- {{{link}}} – The link that will be used. It is recommended to combine this parameter with #switch: if you want to add the ability to specify more than one link. For example, links to categories related to this game.
- {{{icon}}} – An icon that will be displayed next to the game name. Also clickable. You only need to enter the name and format of the image, for example, SomeImage.png
- {{{icon size}}} – icon size (default is 16px). Only accepts px. In this parameter the same parameter is specified for the ability to specify the size of the icon in child templates.
- {{{color}}} – The color that is used for certain styles of this template. Supports hex, rgb, hsl, etc.
Example
Child Usage
These examples are written directly using this template, since the {{Portal2}}, {{Hl2}}, {{Hammer}} and other templates do not currently use this template as their base.
Code | Result | Description |
---|---|---|
{{Portal2}} | This is ![]() |
Regular internal link. |
{{Idtech3}} | This is ![]() |
Link to Wikipedia article. |
{{Cs2d}} | This is ![]() |
External link. |
{{Portal2|icon}} | This is ![]() |
Clickable Icon. |
{{Portal2|name}} | This is Portal 2 |
Link without icon. |
{{Portal2|1}} | This is ![]() |
Link with style № 1. |
{{Portal2|2}} | This is ![]() |
Link with style № 2. |
{{Portal2|icon|2}} | This is ![]() |
Clickable Icon with style № 2. |
{{Portal2|name|1}} | This is Portal 2 |
Link without icon and with style № 1. |
{{Hl2|1|mode=short}} | This is ![]() |
Link with style № 1 and custom display mode “short”. |
{{Hl2|2|mode=short}} | This is ![]() |
Link with style № 2 and custom display mode “short”. |
{{Hammer|1}} | This is ![]() |
Link with style № 1. |
{{Hammer|mode=full}} | This is ![]() |
Link with custom display mode “full”. |
{{Hammer|2|mode=full}} | This is ![]() |
Link with style № 2 and custom display mode “full”. |
{{Hammer|mode=old}} | This is ![]() |
Link with custom display mode “old”. |
{{Hammer|mode=3x}} | This is ![]() |
Link with custom display mode “3x”. |
{{Portal2|link=category}} | This is ![]() |
Custom link leading to a place defined by the word “category” (In this case, this is a link to “Category:Portal 2”). |
{{Portal2|1|link=games}} | This is ![]() |
Custom link leading to a place defined by the word “games” (In this case, this is a link to “Category:Portal 2 engine branch games”). |
{{Portal2|link=}} | This is ![]() |
No Link and without style. |
{{Portal2|icon size=32}} | This is ![]() |
Link with custom icon size. |
{{Portal2|1|icon size=32}} | This is ![]() |
Link with style № 1 and custom icon size. |
{{Portal2|icon|icon size=24}} | This is ![]() |
Icon with custom size. |