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
Riegler (talk | contribs)
No edit summary
Tag: 2017 source edit
default parameters as strings
Tags: Reverted 2017 source edit
Line 1: Line 1:
<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}}};">
{{#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>
<templatedata>
{
{
Line 8: Line 4:
"boxbgcolor": {
"boxbgcolor": {
"label": {
"label": {
"en": "Background color (optional)",
"en": "Background color",
"de": "Hintergrundfarbe der Box (optional)"
"de": "Hintergrundfarbe"
},
"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)"
},
},
"description": "Hex-Wert (z.B. #ffffe6)",
"type": "string",
"type": "string",
"suggested": true,
"suggested": true,
"default": {
"default": "#efefef"
"en": "#efefef",
"de": "#efefef"
}
},
},
"boxpadding": {
"boxpadding": {
"label": {
"label": "Abstand Box",
"en": "Padding of the container box (optional)",
"type": "string",
"de": "Abstand des Inhalts zur Box"
},
"description": {
"en": "Sets the padding for the box. Default is 0.",
"de": "Setzt den Abstand in Pixeln, Standard ist 0"
},
"example": {
"en": "10px (default is 0)",
"de": "10px (Standard ist 0)"
},
"suggested": true,
"suggested": true,
"autovalue": ""
"default": "0px"
},
},
"contentpadding": {
"contentpadding": {
"label": {
"label": "Textabstand",
"en": "Content padding (optional)",
"type": "string",
"de": "Textabstand"
"default": "10px",
},
"description": {
"en": "Padding around text. Default is 10px.",
"de": "Abstand um den Text. Standard ist 10px."
},
"type": "number",
"example": {
"en": "20px",
"de": "20px"
},
"suggested": true
"suggested": true
},
},
"banner-image": {
"banner-image": {
"description": {
"label": "Bannergrafik",
"en": "Image name, without the File: prefix, but with namespace prefix (if it exists)",
"description": "Bildname ohne Datei-Präfix",
"de": "Bildname, ohne das Datei-Präfix, aber mit Namensraum-Präfix (falls es existiert)"
"type": "wiki-file-name",
},
"label": {
"en": "Banner image (optional)",
"de": "Bannergrafik (optional)"
},
"example": {
"en": "myimage.png",
"de": "meinbild.png"
},
"suggested": true
"suggested": true
},
},
"image-width": {
"image-width": {
"label": {
"label": "Bildbreite",
"en": "Image width",
"type": "number",
"de": "Bildbreite"
"default": "200",
},
"suggested": true
"description": {
"en": "Width in pixels. Default setting is 200",
"de": "Breite in Pixel. Standard ist 200"
},
"suggested": true,
"default": {
"de-formal": "200"
},
"example": {
"de": "z.B. 300 (Standard ist 200)",
"en": "e.g., 300 (default is 200)"
}
},
},
"imagealign": {
"imagealign": {
"label": {
"label": "Bildposition",
"en": "Image alignment",
"type": "string",
"de": "Bildposition"
"default": "left",
},
"suggested": true
"example": {
"en": "left, right",
"de": "left, right"
},
"default": {
"en": "left",
"de": "left"
},
"suggested": true,
"description": "Links oder rechts in der Box"
},
},
"banner-title": {
"banner-title": {
"label": "Überschrift",
"type": "string",
"type": "string",
"suggested": true,
"suggested": true
"label": {
"en": "Heading",
"de": "Überschrift"
},
"description": "Box heading"
},
},
"titlesize": {
"titlesize": {
"label": {
"label": "Größe Überschrift",
"en": "Heading size",
"default": "1.6em",
"de": "Größe der Überschrift"
},
"example": {
"en": "2em, 15px",
"de": "2em,  15px"
},
"default": {
"en": "1.6em",
"de": "1.6em"
},
"suggested": true
"suggested": true
},
},
"titlecolor": {
"titlecolor": {
"label": {
"label": "Farbe Überschrift",
"en": "Heading color",
"type": "string",
"de": "Farbe der Überschrift"
},
"description": "Color of the heading. ",
"example": {
"en": "#ffffff",
"de": "#ffffff"
},
"suggested": true
"suggested": true
},
},
"banner-text": {
"banner-text": {
"label": {
"label": "Text",
"en": "Text",
"de": "Text"
},
"description": {
"en": "1-3 lines of text",
"de": "1-3 Zeilen Text"
},
"type": "content",
"type": "content",
"suggested": true
"suggested": true
},
},
"textcolor": {
"textcolor": {
"label": {
"label": "Textfarbe",
"en": "Text color",
"type": "string",
"de": "Textfarbe"
},
"example": {
"en": "#000000",
"de": "#000000"
},
"suggested": true
"suggested": true
},
},
"textsize": {
"textsize": {
"label": {
"label": "Textgröße",
"en": "Text size",
"default": "1.3em",
"de": "Textgröße"
},
"example": {
"en": "12px, 1em",
"de": "12px, 1em"
},
"default": {
"en": "1.3em",
"de": "1.3em"
},
"suggested": true
"suggested": true
}
}
},
},
"description": "Erstellt ein Intro-Banner mit Bild, Titel und Text.",
"paramOrder": [
"paramOrder": [
"banner-image",
"banner-image",
Line 194: Line 90:
}
}
</templatedata>
</templatedata>
</noinclude>

Revision as of 09:58, 12 February 2026

<templatedata> { "params": { "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>