Template:Software inline: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
No edit summary
mNo edit summary
 
Line 1: Line 1:
<includeonly><onlyinclude>{{#ifeq:{{{1|}}}|color|{{#tag:nowiki|{{{color|#5081D1}}}}}|<span {{#ifeq:{{padleft:|1|{{bidi:{{int:edit}}}}}}|&#x202B;|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>
<includeonly><onlyinclude>{{#ifeq:{{{1|}}}|color|{{#tag:nowiki|{{{color|#5081D1}}}}}|<span style="{{#ifeq:{{{2|}}}|styled|{{#if:{{{link|}}}||color:{{{color|#5081D1}}};}} padding:2px 3px; border-radius:3px; background:#00000030; font-weight:bold;}} white-space:nowrap">{{#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:{{{external|}}}|[{{{link}}} {{#ifeq:{{{2|}}}|styled|<span style="color:{{{color|#5081D1}}}">{{{name|}}}</span>|{{{name|}}}}}]|[[:{{{link}}}|{{#ifeq:{{{2|}}}|styled|<span style="color:{{{color|#5081D1}}}">{{{name|}}}</span>|{{{name|}}}}}]]}}|{{{name|}}}}}}}</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 6: Line 6:
* {{Param|color}} – The color that is used for colored style of this template. Supports hex, rgb, hsl, etc.
* {{Param|color}} – The color that is used for colored style of this template. Supports hex, rgb, hsl, etc.
* {{Param|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, {{Code|SomeImage.png}}.
* {{Param|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, {{Code|SomeImage.png}}.
* {{Param|external}} – Whether the link in the link parameter is external.
* {{Param|link}} – The link that will be used.
* {{Param|link}} – The link that will be used.
* {{Param|name}} – The name that will be displayed.
* {{Param|name}} – The name that will be displayed.
Line 39: Line 40:
{{tr|
{{tr|
  {{td| {{Code|<nowiki>{{Cs2d}}</nowiki>}} }}
  {{td| {{Code|<nowiki>{{Cs2d}}</nowiki>}} }}
  {{td| This is {{Software inline|color=#FFD700|icon=CS2D icon.png|elink=1|link=https://store.steampowered.com/app/666220/CS2D|name=CS2D}}! }}
  {{td| This is {{Software inline|color=#FFD700|icon=CS2D icon.png|external=1|link=https://store.steampowered.com/app/666220/CS2D|name=CS2D}}! }}
  {{td| External link. }}
  {{td| External link. }}
}}
}}

Latest revision as of 18:25, 12 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.
  • {{{external}}} – Whether the link in the link parameter is external.
  • {{{link}}} – The link that will be used.
  • {{{name}}} – The name that will be displayed.

Example

Template:Portal2 (not the actual one)
  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
{{Software inline | {{{1|}}} | {{{2|{{{1|}}}}}} | color = #23B1E5 | icon = Portal2-16px.png | link = {{#if:{{{link}}}| {{Langprefix}}Portal 2 }} | name = {{#switch:{{Language}}|#default=Portal 2|ru=Портал 2}} }}

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.