mNo edit summary |
mNo edit summary |
||
| Line 1: | Line 1: | ||
{{#if:{{{headertext|}}}|== {{{headertext|Default Header}}} ==<div | {{#if:{{{headertext|}}}|== {{{headertext|Default Header}}} ==|== Default Header ==}} | ||
<div class="custom-header-anchor" style="display:none;" id="custom-header-text"></div> | |||
<div class="custom-header" | <div class="custom-header" | ||
data-image="{{{image|}}}" | data-image="{{{image|}}}" | ||
| Line 15: | Line 16: | ||
<noinclude> | <noinclude> | ||
This template overrides the default header image and text, wrapping headertext in an <h1> tag with custom styling and ensuring TOC inclusion. | This template overrides the default header image and text, wrapping headertext in an <h1> tag with custom styling and ensuring TOC inclusion. | ||
Usage | |||
== Usage == | |||
{{CustomHeader | |||
|image=http://localhost/laussywiki/images/1/1d/Roof-of-Faro.jpg | |image=http://localhost/laussywiki/images/1/1d/Roof-of-Faro.jpg | ||
|headertext=Trip to Algarve (May 2017) | |headertext=Trip to Algarve (May 2017) | ||
| Line 26: | Line 29: | ||
|blurbposition=bottom:20px;right:20px;font-size:large;width:70%;text-align:right | |blurbposition=bottom:20px;right:20px;font-size:large;width:70%;text-align:right | ||
}} | }} | ||
== Notes == | |||
* Use the full image URL from the File: namespace. | |||
* Use headerposition and blurbposition as 'top:XXpx;left:YYpx;font-size:VALUE;width:VALUE;text-align:VALUE' or 'bottom:XXpx;right:YYpx;font-size:VALUE;width:VALUE;text-align:VALUE'. | |||
* The headertext is included in the TOC and styled as an <h1>. | |||
* Add the following CSS to MediaWiki:Common.css to hide the default TOC heading: | |||
```css | |||
h1#section_0 { display: none; } | |||
``` | |||
</noinclude> | </noinclude> | ||
This template overrides the default header image and text, wrapping headertext in an
```css h1#section_0 { display: none; } ```