Template:Background/doc: Difference between revisions

From Valve Developer Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 9: Line 9:
! width="13%" | Preview
! width="13%" | Preview
|-
|-
| align="center" | {{Code|{{Param|1}}}}
| align="center" | {{Code|{{Param|file}}}} or {{Code|{{Param|url}}}}
| The path to the image.
| The path to the image.
| {{CodeBlock|<nowiki>{{Background
| {{CodeBlock|<nowiki>{{Background
| [[File:Hlalyx1.jpg]]
| file = Hlalyx1.jpg
}}</nowiki>}} {{CodeBlock|<nowiki>{{Background
}}</nowiki>}} {{CodeBlock|<nowiki>{{Background
| https://cdn.akamai.steamstatic.com/half-life.com/images/alyx/screens/halflife_alyx_2.jpg
| url = 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

Revision as of 03:29, 13 January 2024

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
{{{file}}} or {{{url}}} The path to the image.
{{Background | file = Hlalyx1.jpg }}
{{Background | url = https://cdn.akamai.steamstatic.com/half-life.com/images/alyx/screens/halflife_alyx_2.jpg }}
Preview is not possible
{{{opacity}}} Allows you to change the opacity of the entire block.

(0.05 by default)

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

(transparent by default)

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

(38,38,38 by default)

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

(150px by default)

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