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)
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-{{{boxtype}}}"</span><span class="p">></span>
+
<div class="infobox notification-{{{boxtype}}}"  
<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>
+
{{#if:{{{bgcolor|}}}|style="background:{{{bgcolor}}}"|}}>
{{#switch: {{{boxtype}}}
 
  | note = Hinweis:
 
  | tip = Tipp:
 
  | warning = Achtung:
 
  | example = Beispiel:
 
  | important = Wichtig!
 
  | backgroundbox =
 
  | #default = Hinweis:
 
}}
 
<span class="p"></</span><span class="nt">span</span><span class="p">></span>{{{Note text}}}
 
<span class="p"></</span><span class="nt">div</span><span class="p">></span>
 
 
 
 
 
<div class="infobox notification-{{{boxtype}}}"
 
{{#if:{{{bgcolor}}}|style="background:{{{bgcolor}}}"|}}>
 
 
<span class="boxlabel">
 
<span class="boxlabel">
 
{{#switch: {{{boxtype}}}
 
{{#switch: {{{boxtype}}}
  | note = Hinweis:
+
| note = Hinweis:
  | tip = Tipp:
+
| tip = Tipp:
  | warning = Achtung:
+
| warning = Achtung:
  | example = Beispiel:
+
| example = Beispiel:
  | important = Wichtig!
+
| important = Wichtig!
  | backgroundbox =  
+
| backgroundbox =  
  | #default = Hinweis:
+
| #default = Hinweis:
}}
+
}}
 
</span>{{{Note text}}}
 
</span>{{{Note text}}}
</div>
+
</div>
<noinclude>
+
<noinclude>
Kopiervorlage:
+
Kopiervorlage:
<pre>
+
<pre>
 
{{Box_Note|Note text =|bgcolor =}}
 
{{Box_Note|Note text =|bgcolor =}}
 
</pre>
 
</pre>
 
<templatedata>
 
<templatedata>
{
+
{
  "params": {
+
"params": {
    "Note text": {},
+
"Note text": {},
    "boxtype": {
+
"boxtype": {
      "description": "Mögliche Werte: note, tip, warning, important, example, backgroundbox",
+
"description": "Mögliche Werte: note, tip, warning, important, example, backgroundbox",
      "example": "note",
+
"example": "note",
      "type": "string",
+
"type": "string",
      "default": "note",
+
"default": "note",
      "required": true
+
"required": true
    },
+
},
    "bgcolor": {
+
"bgcolor": {
      "label": "bgcolor",
+
"label": "bgcolor",
      "description": "Hintergrundfarbe der Box im Hex-format (z.B. #ececec)",
+
"description": "Hintergrundfarbe der Box im Hex-format (z.B. #ececec)",
      "type": "string"
+
"type": "string"
    }
+
}
 
},
 
},
 
"description": "Erstellt eine Infobox für Hinweise, Warnungen, Tipps, etc.",
 
"description": "Erstellt eine Infobox für Hinweise, Warnungen, Tipps, etc.",
 
"paramOrder": [
 
"paramOrder": [
  "boxtype",
+
"boxtype",
  "Note text",
+
"Note text",
  "bgcolor"
+
"bgcolor"
 
]
 
]
 
}
 
}
 
</templatedata>
 
</templatedata>
 
</noinclude>
 
</noinclude>

Revision as of 13:00, 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>