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

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>