Template:Background/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
Line 2: Line 2:
This template allows you to add a background for an article.
This template allows you to add a background for an article.


==Parameters and Examples==
== Parameters and Examples ==
{| class=standard-table width=100%
{| class="standard-table" width="100%"
! style=width:15% | Name
! width="15%" | Name
! style=width:30% | Description
! width="30%" | Description
! Example
! Example
! style=width:13% | Preview
! width="13%" | Preview
|-
|-
| align=center | {{Code|{{param|tag=kbd|1}}}}
| align="center" | {{Code|{{Param|b1}}}}
| The path to the image.
| The path to the image.
| {{CodeBlock|<nowiki>{{background|[[File:Hlalyx1.jpg]]}}</nowiki>}} {{CodeBlock|<nowiki>{{background
| {{CodeBlock|<nowiki>{{Background
|https://cdn.akamai.steamstatic.com/half-life.com/images/alyx/screens/halflife_alyx_2.jpg
| [[File:Hlalyx1.jpg]]
}}</nowiki>}} {{CodeBlock|<nowiki>{{Background
| https://cdn.akamai.steamstatic.com/half-life.com/images/alyx/screens/halflife_alyx_2.jpg
}}</nowiki>}}
}}</nowiki>}}
| align=center | Preview is not possible
| align="center" | Preview is not possible
|-
|-
| align=center | {{Code|{{param|tag=kbd|opacity}}}}
| align="center" | {{Code|{{Param|bopacity}}}}
| Allows you to change the opacity of the entire block.
| Allows you to change the opacity of the entire block.
({{Code|style=1|select=1|0.05}} by default)
({{Code|style=1|select=1|0.05}} by default)
| {{CodeBlock|<nowiki>{{Background|opacity=0.5}}</nowiki>}}
| {{CodeBlock|<nowiki>{{Background|opacity=0.5}}</nowiki>}}
| align=center | Preview is not possible
| align="center" | Preview is not possible
|-
|-
| align=center | {{Code|{{param|tag=kbd|bgcolor}}}}
| align="center" | {{Code|{{Param|bbgcolor}}}}
| Controls the background color of the block.
| Controls the background color of the block.
({{Code|style=1|select=1|transparent}} by default)
({{Code|style=1|select=1|transparent}} by default)
| {{CodeBlock|<nowiki>{{Background|bgcolor=rgb(255,255,255)}}</nowiki>}}
| {{CodeBlock|<nowiki>{{Background|bgcolor=rgb(255,255,255)}}</nowiki>}}
| align=center | Preview is not possible
| align="center" | Preview is not possible
|-
|-
| align=center | {{Code|{{param|tag=kbd|gradient-color}}}}
| align="center" | {{Code|{{Param|bgradient-color}}}}
| Controls the color of the bottom gradient.
| Controls the color of the bottom gradient.
({{Code|style=1|select=1|38,38,38}} by default)
({{Code|style=1|select=1|38,38,38}} by default)
| {{CodeBlock|<nowiki>{{Background|gradient-color=50,50,50}}</nowiki>}}
| {{CodeBlock|<nowiki>{{Background|gradient-color=50,50,50}}</nowiki>}}
| align=center | Preview is not possible
| align="center" | Preview is not possible
|-
|-
| align=center | {{Code|{{param|tag=kbd|gradient-height}}}}
| align="center" | {{Code|{{Param|bgradient-height}}}}
| Controls the height of the gradient.
| Controls the height of the gradient.
({{Code|style=1|select=1|150px}} by default)
({{Code|style=1|select=1|150px}} by default)
| {{CodeBlock|<nowiki>{{Background|gradient-height=600px}}</nowiki>}}
| {{CodeBlock|<nowiki>{{Background|gradient-height=600px}}</nowiki>}}
| align=center | Preview is not possible
| align="center" | Preview is not possible
|-
|-
|}
|}

Revision as of 00:49, 1 April 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:Background.
Don't forget to purge the contents of the base page upon creating or editing this subpage.

This template allows you to add a background for an article.

Parameters and Examples

Name Description Example Preview
{{{b1}}} The path to the image.
{{Background | [[File:Hlalyx1.jpg]] }}
{{Background | https://cdn.akamai.steamstatic.com/half-life.com/images/alyx/screens/halflife_alyx_2.jpg }}
Preview is not possible
{{{bopacity}}} Allows you to change the opacity of the entire block.

(0.05 by default)

{{Background|opacity=0.5}}
Preview is not possible
{{{bbgcolor}}} Controls the background color of the block.

(transparent by default)

{{Background|bgcolor=rgb(255,255,255)}}
Preview is not possible
{{{bgradient-color}}} Controls the color of the bottom gradient.

(38,38,38 by default)

{{Background|gradient-color=50,50,50}}
Preview is not possible
{{{bgradient-height}}} Controls the height of the gradient.

(150px by default)

{{Background|gradient-height=600px}}
Preview is not possible