Vorlage:Flexbox: Unterschied zwischen den Versionen
Aus KoelnWiki
(Erweitert um textalign, damit dieser auch zentriert werden kann; Kat angepaßt: Kategorie:Vorlage exitiert bereits) |
|||
| Zeile 1: | Zeile 1: | ||
<includeonly><div style="margin:5px; margin-left:0px;{{#if:{{{style|}}}|{{{style}}}}}"><div style="background-color:{{{color|#136381}}}; | <includeonly><div style="margin:5px; margin-left:0px;{{#if:{{{style|}}}|{{{style}}}}}"><div style="background-color:{{{color|#136381}}}; | ||
| − | text-align:left; | + | text-align:{{{textalign_title|left}}}; |
color: {{{titlecolor|{{{bgcolor|white}}}}}}; | color: {{{titlecolor|{{{bgcolor|white}}}}}}; | ||
font-weight:bold; font-size:125%; | font-weight:bold; font-size:125%; | ||
| Zeile 6: | Zeile 6: | ||
<div style="padding: 5px; | <div style="padding: 5px; | ||
border: 1px solid {{{color|#136381}}}; border-top-width:0px; | border: 1px solid {{{color|#136381}}}; border-top-width:0px; | ||
| − | color: {{{textcolor|black}}}; background-color:{{{bgcolor|#f6fcfe}}}; | + | color: {{{textcolor|black}}}; background-color:{{{bgcolor|#f6fcfe}}}; |
| + | text-align:{{{textalign_text|left}}}; | ||
-moz-border-radius:0px 0px 3px 3px; | -moz-border-radius:0px 0px 3px 3px; | ||
{{#if:{{{textstyle|}}}|{{{textstyle}}}}}"> | {{#if:{{{textstyle|}}}|{{{textstyle}}}}}"> | ||
| Zeile 27: | Zeile 28: | ||
|- | |- | ||
| text || Boxinhalt | | text || Boxinhalt | ||
| + | |- | ||
| + | | textalign_title || Textausrichtung Überschrift (optional right, left oder center, default: left) | ||
| + | |- | ||
| + | | textalign_text|| Textausrichtung Text (optional right, left oder center, default: left) | ||
|- | |- | ||
| textcolor || Textfarbe Boxinhalt (optional, default: black) | | textcolor || Textfarbe Boxinhalt (optional, default: black) | ||
| Zeile 51: | Zeile 56: | ||
}} | }} | ||
| − | [[Kategorie: | + | [[Kategorie:Vorlage]] |
</noinclude> | </noinclude> | ||
Aktuelle Version vom 25. Oktober 2011, 20:23 Uhr
Vorlage zum leichten und einheitlichen Erstellen von flexibel parametrisierbaren Boxen.
[Bearbeiten] Einschränkungen
- Keiner der Parameter darf einen Senkrechten Strich (Pipe-Symbol) enthalten, da dies als besonderes Zeichen zur Separierung der einzelnen Parameter voneinander fungiert. Diese Einschränkung bewirkt insbesondere, dass das Wiki-Markup zum Erstellen von Tabellen nicht funktioniert. Mit | (oder etwas leserfreundlicher: <nowiki>|<nowiki>) kann dieses Problem umgangen werden.
[Bearbeiten] Vorlagenparameter
| Parameter | Beschreibung |
|---|---|
| style | CSS-Fragment für das Gesamtobjekt (optional, z.B. float:right;width:200px;)
|
| bgcolor | Hintergrundfarbe (optional, default: #f6fcfe) |
| color | Rahmenfarbe und Titelzeile (optional, default: #136381) |
| text | Boxinhalt |
| textalign_title | Textausrichtung Überschrift (optional right, left oder center, default: left) |
| textalign_text | Textausrichtung Text (optional right, left oder center, default: left) |
| textcolor | Textfarbe Boxinhalt (optional, default: black) |
| textstyle | CSS-Fragment für den Boxinhalt (optional) |
| title | Boxüberschrift |
| titlecolor | Textfarbe der Titelzeile (optional, default: {{{bgcolor}}} wenn gesetzt, sonst white)
|
| titlestyle | CSS-Fragment für Titelzeile (optional) |
[Bearbeiten] Beispiel
{{Flexbox|bgcolor=#fffbf5|color=#136381|title=Testbox 123|text=
Lorem ipsum dolor sit amet, ...
}}
Dies ergibt die folgende Box:
Testbox 123
Lorem ipsum dolor sit amet, ...