Cookies help us deliver our services. By using our services, you agree to our use of cookies.

Difference between revisions of "Template:Box Note"

(Tag: 2017 source edit)
(Tag: 2017 source edit)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
<span class="p"><</span><span class="nt">div</span> <span class="na">class</span><span class="o">=</span><span class="s">"infobox notification-<nowiki>{{{boxtype}}}</nowiki>"</span><span class="p">></span>
+
<templatestyles src="Template:Box_Note/styles.css" />
<span class="p"><</span><span class="nt">span</span> <span class="na">class</span><span class="o">=</span><span class="s">"boxlabel"</span><span class="p">></span>
+
<div class="infobox notification-{{{boxtype}}}"  
<nowiki>{{#switch: {{{boxtype}}}
+
{{#if:{{{bgcolor|}}}|style="background:{{{bgcolor}}}"|}}>
  | note = Hinweis:
+
<span class="boxlabel">
  | tip = Tipp:
+
{{#switch: {{{boxtype}}}
  | warning = Achtung:
+
| note = Hinweis:
  | example = Beispiel:
+
| tip = Tipp:
  | important = Wichtig!
+
| warning = Achtung:
  | backgroundbox =  
+
| example = Beispiel:
  | #default = Hinweis:
+
| important = Wichtig!
}}</nowiki>
+
| backgroundbox =  
<span class="p"></</span><span class="nt">span</span><span class="p">></span><nowiki>{{{Note text}}}</nowiki>
+
| #default = Hinweis:
<span class="p"></</span><span class="nt">div</span><span class="p">></span>
+
}}
 +
</span>{{{Note text}}}
 +
</div>
 +
<noinclude>
 +
Kopiervorlage:
 +
<pre>
 +
{{Box_Note|Note text =|bgcolor =}}
 +
</pre>
 +
<templatedata>
 +
{
 +
  "params": {
 +
    "Note text": {},
 +
    "boxtype": {
 +
      "description": "Mögliche Werte: note, tip, warning, important, example, backgroundbox",
 +
      "example": "note",
 +
      "type": "string",
 +
      "default": "note",
 +
      "required": true
 +
    },
 +
    "bgcolor": {
 +
      "label": "bgcolor",
 +
      "description": "Hintergrundfarbe der Box im Hex-format (z.B. #ececec)",
 +
      "type": "string"
 +
    }
 +
  },
 +
  "description": "Erstellt eine Infobox für Hinweise, Warnungen, Tipps, etc.",
 +
  "paramOrder": [
 +
    "boxtype",
 +
    "Note text",
 +
    "bgcolor"
 +
  ]
 +
}
 +
</templatedata>
 +
</noinclude>

Latest revision as of 14:24, 9 September 2020

Hinweis: {{{Note text}}}

Kopiervorlage:

{{Box_Note|Note text =|bgcolor =}}

<templatedata> {

 "params": {
   "Note text": {},
   "boxtype": {
     "description": "Mögliche Werte: note, tip, warning, important, example, backgroundbox",
     "example": "note",
     "type": "string",
     "default": "note",
     "required": true
   },
   "bgcolor": {
     "label": "bgcolor",
     "description": "Hintergrundfarbe der Box im Hex-format (z.B. #ececec)",
     "type": "string"
   }
 },
 "description": "Erstellt eine Infobox für Hinweise, Warnungen, Tipps, etc.",
 "paramOrder": [
   "boxtype",
   "Note text",
   "bgcolor"
 ]

} </templatedata>