Template:Software inline: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
<includeonly><onlyinclude><span {{#ifeq:{{padleft:|1|{{bidi:{{int:edit}}}}}}|‫|dir=rtl}} style="white-space:nowrap">{{#ifeq:{{{1}}}|name||<span style=" | <includeonly><onlyinclude>{{#ifeq:{{{1|}}}|color|{{#tag:nowiki|{{{color|#5081D1}}}}}|<span {{#ifeq:{{padleft:|1|{{bidi:{{int:edit}}}}}}|‫|dir=rtl}} style="white-space:nowrap; {{#ifeq:{{{2}}}|styled|padding:2px 3px; border-radius:3px; background:#00000030; font-weight:bold}}">{{#ifeq:{{{1}}}|name||<span style="{{#ifeq:{{{1}}}|icon||margin-inline-end:.2em;}} font-size:16px; user-select:none">[[File:{{{icon}}}|16px|link={{{link|}}}]]</span>}}{{#ifeq:{{{1}}}|icon||{{#if:{{{link|}}}|{{#if:{{{elink|}}}|[{{{link}}} <span {{#ifeq:{{{2}}}|styled|style="color:{{{color|#5081D1}}}"}}>{{{name|}}}</span>]|[[:{{{link}}}|<span {{#ifeq:{{{2}}}|styled|style="color:{{{color|#5081D1}}}"}}>{{{name|}}}</span>]]}}|<span {{#ifeq:{{{2}}}|styled|style="color:{{{color|#5081D1}}}"}}>{{{name}}}</span>}}}}</span>}}</onlyinclude></includeonly> | ||
This template is an improved and simplified version of template [[Template:Software]]. | This template is an improved and simplified version of template [[Template:Software]]. | ||
Line 15: | Line 15: | ||
| color = #23B1E5 | | color = #23B1E5 | ||
| icon = Portal2-16px.png | | icon = Portal2-16px.png | ||
| link = {{#if:{{{link | | link = {{#if:{{{link}}}| {{Langprefix}}Portal 2 }} | ||
| name = {{#switch:{{Language}}|#default=Portal 2|ru=Портал 2}} | | name = {{#switch:{{Language}}|#default=Portal 2|ru=Портал 2}} | ||
}}</nowiki>}} | }}</nowiki>}} | ||
Line 53: | Line 53: | ||
}} | }} | ||
{{tr| | {{tr| | ||
{{td| {{Code|<nowiki>{{Portal2| | {{td| {{Code|<nowiki>{{Portal2|styled}}</nowiki>}} }} | ||
{{td| This is {{Software inline| | {{td| This is {{Software inline|styled|styled|color=#23B1E5|icon=Portal2-16px.png|link=Portal 2|name=Portal 2}}! }} | ||
{{td| Link with | {{td| Link with styling. }} | ||
}} | }} | ||
{{tr| | {{tr| | ||
{{td| {{Code|<nowiki>{{Portal2|name| | {{td| {{Code|<nowiki>{{Portal2|name|styled}}</nowiki>}} }} | ||
{{td| This is {{Software inline|name| | {{td| This is {{Software inline|name|styled|color=#23B1E5|icon=Portal2-16px.png|link=Portal 2|name=Portal 2}}! }} | ||
{{td| Link without icon and with | {{td| Link without icon and with styling. }} | ||
}} | }} | ||
{{tr| | {{tr| | ||
{{td| {{Code|<nowiki>{{Hammer| | {{td| {{Code|<nowiki>{{Hammer|styled}}</nowiki>}} }} | ||
{{td| This is {{Software inline| | {{td| This is {{Software inline|styled|styled|color=#6165AD|icon=Hammer-16px.png|link=Valve Hammer Editor|name=Hammer}}!}} | ||
{{td| Link with | {{td| Link with styling. }} | ||
}} | }} | ||
{{tr| | {{tr| | ||
Line 76: | Line 76: | ||
{{td| This is {{Software inline|color=#23B1E5|icon=Portal2-16px.png|name|name|link=|name=Portal 2}}! }} | {{td| This is {{Software inline|color=#23B1E5|icon=Portal2-16px.png|name|name|link=|name=Portal 2}}! }} | ||
{{td| No Link without icon. }} | {{td| No Link without icon. }} | ||
}} | |||
{{tr| | |||
{{td| {{Code|<nowiki>{{Portal2|color}}</nowiki>}} }} | |||
{{td| This is {{Software inline|color|color=#23B1E5|icon=Portal2-16px.png|link=Portal 2|name=Portal 2}}! }} | |||
{{td| Template color. }} | |||
}} | }} | ||
}} | }} |
Revision as of 07:37, 11 May 2025
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).
- {{{color}}} – The color that is used for colored style of this template. Supports hex, rgb, hsl, etc.
- {{{icon}}} – An icon that will be displayed next to the game name. You only need to enter the name and format of the image, for example, SomeImage.png.
- {{{link}}} – The link that will be used.
- {{{name}}} – The name that will be displayed.
Example
Child Usage
These examples are written directly using this template, since the {{Portal2}}, {{Cs2d}}, {{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|name}} | This is Portal 2! | Link without icon. |
{{Portal2|icon}} | This is ![]() |
Clickable Icon. |
{{Portal2|styled}} | This is ![]() |
Link with styling. |
{{Portal2|name|styled}} | This is Portal 2! | Link without icon and with styling. |
{{Hammer|styled}} | This is ![]() |
Link with styling. |
{{Portal2|link=}} | This is ![]() |
No Link. |
{{Portal2|name|link=}} | This is Portal 2! | No Link without icon. |
{{Portal2|color}} | This is #23B1E5! | Template color. |