Template:Image Banner
Template documentation
|
---|
View or edit this documentation. (About template documentation)
Portions of the template sample may not be visible without values provided. |
Usage
Basic - with offset
Level 2 header; width of 1919
pixels; -709px
of vertical image offset.
{{Image Banner|Loadscreen.webp|1919|h2=Header text|x=0px|y=-709px}}
↓
Custom image height
Height of 50px
with level 4 header.
Vertical offset is set to -733px
.
{{Image Banner|Random moving interior.webp|1919|h4=Header text|height=50px|x=0px|y=-733px}}
↓
Custom banner width
Forced the banner to be of certain width (600px
in this example), but no more than the page width or the image width.
px
for pixels).{{Image Banner|Battle chaos1.webp|1919|600px|h2=Basics|x=-460px|y=-385px|h=120px}}
↓
Custom header block styles
Uses custom styles for the header, and also has a custom width.
{{Image Banner|Battle chaos1.webp|1919|h2=Basics|x=-460px|y=-385px|h=120px|header styles=background: linear-gradient(40deg, var(--color-cosmoBorderTop), var(--action-color--slightly-lighter));
box-shadow:
1px 0 3px var(--action-color),
2px 0 4px var(--color-cosmoBorderBottom),
1px 0 2px var(--synt-high--color-comment),
inset 0 0 3px var(--action-color);}}
↓
{{Image Banner|Battle chaos1.webp|1919|h2=Basics|x=-460px|y=-385px|h=120px|header styles=background: linear-gradient(40deg, var(--color-cosmoBorderTop), var(--action-color--slightly-lighter)); box-shadow:
1px 0 3px var(--action-color), 2px 0 4px var(--color-cosmoBorderBottom), 1px 0 2px var(--synt-high--color-comment), inset 0 0 3px var(--action-color);}
Creates a image banner with a header at the start.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Image | 1 | Image file. | File | required |
Image width | 2 | The width of the image in pixels. By default, the image will be as large as possible. You can a use non-negative value, up to the actual width of the image. Any overflow will be hidden. | Number | required |
Banner width | 3 | The preferred width of the banner. The underlying image will not shrink, but get cropped instead. By default, the width is calculated to fit the image (if possible). The resulting width will be restricted to the width of the screen AND the image. Use {{Force Image Banner Width}} to define a width for all banners on a page. | String | suggested |
H2 Header | h2 | Header text. You must fill one of these (and only one). | String | suggested |
Or H3 Header | h3 | Header text. You must fill one of these (and only one). | String | suggested |
Or H4 Header | h4 | Header text. You must fill one of these (and only one). | String | suggested |
Or H5 Header | h5 | Header text. You must fill one of these (and only one). | String | suggested |
Or H6 Header | h6 | Header text. You must fill one of these (and only one). | String | suggested |
Horizontal image offset | x | Horizontal offset of the image. Goes negative. The closer to zero the better - lower values will shrink the banner more.
| String | suggested |
Vertical image offset | y | Vertical offset of the image. Goes negative.
| String | suggested |
Image height | h | The height of the image.
| String | suggested |
Header Wrapper Styles | header styles | Styles for the header block.
| Content | suggested |
- Templates with styles defined as template styles
- Templates with styles defined in the Common CSS
- Templates that have supplementary templates
- Template documentation
- Image templates
- Markup templates