Template:Capsule/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
<noinclude>{{doc|0}}</noinclude>
<noinclude>{{Doc|0}}</noinclude>
This template is based on a capsule from the Wiki's [[Main Page]].
This template is designed to add a block with rounded corners with text inside.


== Parameters ==
==Parameters==
{{param|1}} - input content
* {{Param}} – capsule content.
* {{Param|background}} – controls the color of the capsule background. By default #4A6821.
* {{Param|align}} – capsule content alignment: {{Code|style=2|select=1|center}}, {{Code|style=2|select=1|left}}, {{Code|style=2|select=1|right}} or {{Code|style=2|select=1|justify}}).


{{param|align}} - controls the alignment of the contents of the capsule
==Examples==
{{CodeBlock|style=1|&#123;&#123;Capsule&#124;Some text&#125;&#125;}}
{{Capsule|Some text}}


{{param|color}} - controls the color of the plain text


{{param|capbg}} - controls the capsule background
{{CodeBlock|style=1|&#123;&#123;Capsule&#124;background&#61;#294157&#124;align&#61;center&#124;1&#61;&#91;&#91;File:Icon-panorama.png&#124;text-bottom&#124;16px&#124;link&#61;&#93;&#93; &lt;b style&#61;"color:white">Hello, World!&lt;/b>&#125;&#125;}}
 
{{Capsule|background=#294157|align=center|1=[[File:Icon-panorama.png|text-bottom|16px|link=]] <b style="color:white">Hello, World!</b>}}
{{param|contbg}} - controls the background of the capsule content
 
== Examples ==
{{CodeBlock|style=1|margin=.4em 0 .5em 0|<nowiki>{{capsule|capbg=#4a6821|Some text}}</nowiki>}}
{{capsule|capbg=#4a6821|Some text}}
 
{{CodeBlock|style=1|margin=.4em 0 .5em 0|<nowiki>{{capsule|capbg=#253b4e|contbg=#2b4c6a|align=center|<!--
-->[[File:Steamtours workshop.png|link=SteamVR/Environments]] &nbsp; [[SteamVR/Environments|<span style="color:white;">'''Go to the SteamVR Workshop Tools documentation index'''</span>]]
}}</nowiki>
}}
 
{{capsule|capbg=#253b4e|contbg=#2b4c6a|align=center|<!--
-->[[File:Steamtours workshop.png|link=SteamVR/Environments]] &nbsp; [[SteamVR/Environments|<span style="color:white;">'''Go to the SteamVR Workshop Tools documentation index'''</span>]]
}}

Revision as of 16:21, 31 January 2023

English (en)Deutsch (de)Esperanto (eo)Español (es)Français (fr)Suomi (fi)Hrvatski (hr)Magyar (hu)Italiano (it)日本語 (ja)한국어 (ko)Nederlands (nl)Polski (pl)Português (pt)Português do Brasil (pt-br)Русский (ru)Slovenčina (sk)Svenska (sv)Türkçe (tr)Українська (uk)Tiếng Việt (vi)中文 (zh)中文(臺灣) (zh-tw)
Edit-copy.png
This is a documentation subpage for Template:Capsule.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

This template is designed to add a block with rounded corners with text inside.

Parameters

  • {{{1}}} – capsule content.
  • {{{background}}} – controls the color of the capsule background. By default #4A6821.
  • {{{align}}} – capsule content alignment: center, left, right or justify).

Examples

{{Capsule|Some text}}
Some text


{{Capsule|background=#294157|align=center|1=[[File:Icon-panorama.png|text-bottom|16px|link=]] <b style="color:white">Hello, World!</b>}}
Icon-panorama.png Hello, World!