Template:Software

来自Valve Developer Community
跳转至: 导航搜索
Tip.png提示:This template now supports icons with 32px or larger, this meant that users can upload a large icon (128px for example) directly, without having to downscale the icon to 16px, as the MediaWiki software will do this automatically.
With the higher resolution icon available, these will benefits most 4K and Apple Retina display, and won't look blurry. See File:Icon-HL2.png.
Merge-arrows.png
有人建议将此条目或章节与 [[{{software external}}]] 合并。(去讨论)
Blank image.png待完善: Use backward compatibility in all child templates. The improvement work may not continue soon, but some progress has already been made.
Icon-Bug.png错误:{{{addtext}}} does not work with all {{{1}}} options. Same is probably the case for {{{addtext-front}}}.
Curly brackets white.png模板文档
Icon-translate.png
查看
编辑
页面历史
Icon-translate.png
本模板使用字符串子页面
请遵循该子页面上的格式添加翻译。
Template:Software是基础的图标模板,它有8个主要参数:
  • {{{1}}}——图标的显示方式。
    • 如果你只需要一个图标,请留空。
    • 输入1以获得游戏名称和关于该游戏的文章链接。
    • 输入2以获得游戏图标和游戏名称。
    • 当输入3时,类似于1,并可获得游戏颜色。
    • 当输入4时,类似于2,并可获得游戏颜色。
    • 当输入3.14.1时,可获得游戏颜色并使游戏名保留纯文本格式。
    • 输入col以获得游戏的颜色。这主要是其他模板需要的。
    • 输入inalsoonlysinceremovednot以获得图标和附加文本的显示。
Note.png注意:当创建图标模板时 {{{1}}} 参数是固定的,它在图标模板中应该永远是{{{1}}}
  • {{{ico}}}——这是图标的名称,输入时只写文件的名称本身,没有 “File:”和 方括号。
  • {{{link}}}——链接到文章(无法链接至其他网站)。留空时,链接将使用 {{{name}}} 参数。输入时不要有_
  • {{{name}}}——显示的名称。输入时不要有_
  • {{{name<数字>}}}——这个参数显示的是基于 {{{nt}}} 参数的备用名称。您也可以使用 {{{name<number>:<lang_code>}}} 参数制作一个翻译版本。(现建议使用 Template:Autolang
Note.png注意:建议于 {{{name0}}} 写上游戏名的缩写。
  • {{{col}}}——模板文字的颜色。如果未被指定,请不要输入这个参数,这将使用标准颜色:#ADD8E6
  • {{{addtext}}}——额外的文本,将被写在图标后面。它主要用于添加其他图标。
Note.png注意:图标模板中的addtext = {{{addtext|}}}是固定的!
  • {{{nt}}} – 该参数将调用 {{{name<数字>}}} 中的名称。

结果

最后,你应该得到这样的结果:

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.  
  18.  
  19.  
{{doc|docpage=Template:Hl2/doc}} <includeonly><onlyinclude>{{Software | {{{1|}}} | ico = Bms-16px.png | link = Black Mesa (Source) | name = {{Autolang | Black Mesa | zh = 黑山 }} | name0 = bms | name1 = {{Autolang | Black Mesa: Source | zh = 黑山:起源 }} | suf = {{{suf|}}} | col = #E57126 | addtext = {{{addtext|}}} | nt = {{{nt|}}} }}</onlyinclude></includeonly>

如何使用

这是在文章中使用该模板的情况:

参数 结果
{{bms}} 黑山
{{bms|1}} 黑山
{{bms|2}} 黑山 黑山
{{bms|3}} 黑山
{{bms|3.1}} 黑山
{{bms|4}} 黑山 黑山
{{bms|4.1}} 黑山 黑山
{{bms|4|nt=0}} 黑山 bms
{{bms|4|nt=1}} 黑山 黑山:起源
{{bms|ico}} → Bms icon.png
{{bms|col}} → #E57126
{{bms|name}} → 黑山
{{bms|in}} (存在于 黑山 之中)
{{bms|only}} (存在于 黑山 之中)
{{bms|since}} (存在于自 黑山 以来)
{{bms|not}} (存在于 黑山 之中)
{{bms|removed}} (自从 黑山移除)
{{bms|also|addtext={{csgo}} {{l4d2}}}} (存在于 黑山反恐精英:全球攻势 求生之路2 之中)