We are doing major maintenance work during the last week of October. Expect the wiki be unavailable for some time.

Template:Banner: Difference between revisions

From Decoding the Disciplines
Jump to navigation Jump to search
default parameters as strings
Tags: Reverted 2017 source edit
No edit summary
Tag: 2017 source edit
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
<templatedata>
<includeonly><templatestyles src="Banner/styles.css" />
{
<div class="bannerbox" style="align-items:start;{{#ifeq:{{{imagealign|}}}|right|flex-direction:row-reverse;|flex-dirction:row;}}{{#if:{{{boxbgcolor|}}}|background:{{{boxbgcolor}}};|}}padding:{{{boxpadding|0px}}};">
"params": {
{{#if:{{{banner-image|}}}|<div class="banner-image">[[File:{{{banner-image}}}{{!}}{{#if:{{{image-width|}}}|{{{image-width}}}x{{{image-width}}}px|200x200px}}{{!}}link=]]</div>|}}<div class="banner-content" style="padding:{{#if:{{{contentpadding|}}}|{{{contentpadding}}}"|10px}}>{{#if:{{{banner-title|}}}|<div class="banner-title"><div class="bannerhd" style="margin-top:0; {{#if:{{{titlesize|}}}|font-size:{{{titlesize}}};|font-size:1.6em;}}{{#if:{{{titlecolor|}}}|color:{{{titlecolor}}};|}}">{{{banner-title}}}</div></div>|}}{{#if:{{{banner-text|}}}|<div class="banner-text" style="{{#if:{{{textcolor|}}}|color:{{{textcolor}}};|}}{{#if:{{{textsize|}}}|font-size:{{{textsize}}};|}}">{{{banner-text}}}</div>|}}</div></div></includeonly><noinclude> This template creates an intro banner on a page. The banner should contain an image (optional), a title and 2-3 lines of text. <templatedata> { "params": { "boxbgcolor": { "label": { "en": "Background color (optional)", "de": "Hintergrundfarbe der Box (optional)" }, "description": { "en": "Default is grey (#f1f3f9). Replace with any hex value, (e.g. #ffffe6)", "de": "Standard ist grau (#f1f3f9). Kann mit beliebigem Hex-Wert ersetzt werden (z.B. #ffffe6)" }, "type": "string", "suggested": true, "default": "#efefef" }, "boxpadding": { "label": { "en": "Padding of the container box (optional)", "de": "Abstand des Inhalts zur Box" }, "description": "Sets the padding for the box. Default is 0.", "suggested": true, "autovalue": "0px" }, "contentpadding": { "label": "Textabstand", "description": "Padding around text. Default is 10px.", "type": "string", "suggested": true, "default": "10px" }, "banner-image": { "description": "Image name, without the File: prefix", "label": "Bannergrafik", "type": "wiki-file-name", "suggested": true }, "image-width": { "label": "Bildbreite", "description": "Width in pixels. Default is 200", "type": "number", "suggested": true, "default": "200" }, "imagealign": { "label": "Bildposition", "type": "string", "default": "left", "suggested": true }, "banner-title": { "label": "Überschrift", "type": "string", "suggested": true }, "titlesize": { "label": "Größe der Überschrift", "type": "string", "default": "1.6em", "suggested": true }, "titlecolor": { "label": "Farbe der Überschrift", "type": "string", "suggested": true }, "banner-text": { "label": "Text", "type": "content", "suggested": true }, "textcolor": { "label": "Textfarbe", "type": "string", "suggested": true }, "textsize": { "label": "Textgröße", "type": "string", "default": "1.3em", "suggested": true } }, "paramOrder": [ "banner-image", "image-width", "imagealign", "banner-title", "titlesize", "titlecolor", "banner-text", "textsize", "textcolor", "contentpadding", "boxpadding", "boxbgcolor" ] } </templatedata> </noinclude>
"boxbgcolor": {
"label": {
"en": "Background color",
"de": "Hintergrundfarbe"
},
"description": "Hex-Wert (z.B. #ffffe6)",
"type": "string",
"suggested": true,
"default": "#efefef"
},
"boxpadding": {
"label": "Abstand Box",
"type": "string",
"suggested": true,
"default": "0px"
},
"contentpadding": {
"label": "Textabstand",
"type": "string",
"default": "10px",
"suggested": true
},
"banner-image": {
"label": "Bannergrafik",
"description": "Bildname ohne Datei-Präfix",
"type": "wiki-file-name",
"suggested": true
},
"image-width": {
"label": "Bildbreite",
"type": "number",
"default": "200",
"suggested": true
},
"imagealign": {
"label": "Bildposition",
"type": "string",
"default": "left",
"suggested": true
},
"banner-title": {
"label": "Überschrift",
"type": "string",
"suggested": true
},
"titlesize": {
"label": "Größe Überschrift",
"default": "1.6em",
"suggested": true
},
"titlecolor": {
"label": "Farbe Überschrift",
"type": "string",
"suggested": true
},
"banner-text": {
"label": "Text",
"type": "content",
"suggested": true
},
"textcolor": {
"label": "Textfarbe",
"type": "string",
"suggested": true
},
"textsize": {
"label": "Textgröße",
"default": "1.3em",
"suggested": true
}
},
"description": "Erstellt ein Intro-Banner mit Bild, Titel und Text.",
"paramOrder": [
"banner-image",
"image-width",
"imagealign",
"banner-title",
"titlesize",
"titlecolor",
"banner-text",
"textsize",
"textcolor",
"contentpadding",
"boxpadding",
"boxbgcolor"
]
}
</templatedata>

Latest revision as of 10:41, 12 February 2026

This template creates an intro banner on a page. The banner should contain an image (optional), a title and 2-3 lines of text. <templatedata> {	"params": {		"boxbgcolor": {			"label": {				"en": "Background color (optional)",				"de": "Hintergrundfarbe der Box (optional)"			},			"description": {				"en": "Default is grey (#f1f3f9). Replace with any hex value, (e.g. #ffffe6)",				"de": "Standard ist grau (#f1f3f9). Kann mit beliebigem Hex-Wert ersetzt werden (z.B. #ffffe6)"			},			"type": "string",			"suggested": true,			"default": "#efefef"		},		"boxpadding": {			"label": {				"en": "Padding of the container box (optional)",				"de": "Abstand des Inhalts zur Box"			},			"description": "Sets the padding for the box. Default is 0.",			"suggested": true,			"autovalue": "0px"		},		"contentpadding": {			"label": "Textabstand",			"description": "Padding around text. Default is 10px.",			"type": "string",			"suggested": true,			"default": "10px"		},		"banner-image": {			"description": "Image name, without the File: prefix",			"label": "Bannergrafik",			"type": "wiki-file-name",			"suggested": true		},		"image-width": {			"label": "Bildbreite",			"description": "Width in pixels. Default is 200",			"type": "number",			"suggested": true,			"default": "200"		},		"imagealign": {			"label": "Bildposition",			"type": "string",			"default": "left",			"suggested": true		},		"banner-title": {			"label": "Überschrift",			"type": "string",			"suggested": true		},		"titlesize": {			"label": "Größe der Überschrift",			"type": "string",			"default": "1.6em",			"suggested": true		},		"titlecolor": {			"label": "Farbe der Überschrift",			"type": "string",			"suggested": true		},		"banner-text": {			"label": "Text",			"type": "content",			"suggested": true		},		"textcolor": {			"label": "Textfarbe",			"type": "string",			"suggested": true		},		"textsize": {			"label": "Textgröße",			"type": "string",			"default": "1.3em",			"suggested": true		}	},	"paramOrder": [		"banner-image",		"image-width",		"imagealign",		"banner-title",		"titlesize",		"titlecolor",		"banner-text",		"textsize",		"textcolor",		"contentpadding",		"boxpadding",		"boxbgcolor"	] } </templatedata>