Template:Page Header: Difference between revisions
From KB42
No edit summary |
No edit summary Tag: Manual revert |
||
| (10 intermediate revisions by the same user not shown) | |||
| Line 26: | Line 26: | ||
{{#if:{{{header_img|}}}| | {{#if:{{{header_img|}}}| | ||
<div style="width: 100%; line-height: 0; font-size: 0;"> | <div style="width: 100%; line-height: 0; font-size: 0;"> | ||
<div class="header-img-wrap">[[File:{{{header_img|}}}| | <div class="header-img-wrap">[[File:{{{header_img|}}}|1400px|link=]]</div> | ||
</div>}} | </div>}} | ||
<!-- Title overlay — centred over the image --> | <!-- Title overlay — centred over the image --> | ||
<div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: | <div style="position: absolute; top: 0; left: 0; width: 100%; height: 100%; display: flex; align-items: center; justify-content: left; pointer-events: none; box-sizing: border-box;"> | ||
<div style="text-align: center; padding: 0.75em 1em; box-sizing: border-box; max-width: 60%;"> | <div style="text-align: center; padding: 0.75em 1em; box-sizing: border-box; max-width: 60%;"> | ||
<div style="font-size: | <div style="font-size: 2em; font-weight: bold; margin: 0; line-height: 1.2;">{{{title|}}}</div> | ||
{{#if:{{{title2|}}}|<div style="font-size: | {{#if:{{{title2|}}}|<div style="font-size: 1.25em; margin-top: 0.25em;">{{{title2}}}</div>}} | ||
</div> | </div> | ||
</div> | </div> | ||
Latest revision as of 20:00, 10 May 2026
Usage
[edit source]{{Header
|header_img = YourBanner.png
|title = My Wiki Title
|title2 = Optional subtitle line
}}
