Vorlage:Meldungsbox: Unterschied zwischen den Versionen
Zur Navigation springen
Zur Suche springen
(+Parameter CSS) |
|||
| (Eine dazwischenliegende Version desselben Benutzers wird nicht angezeigt) | |||
| Zeile 2: | Zeile 2: | ||
template programming here | template programming here | ||
-->{{#switch: {{LC:{{{Stil|{{{2|}}}}}}}}<!-- | -->{{#switch: {{LC:{{{Stil|{{{2|}}}}}}}}<!-- | ||
| − | -->| gefahr = <div class="alert alert-danger" style="/* .alert */ padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; /* .alert-danger */ color: #a94442; background-color: #f2dede; border-color: #ebccd1; {{{CSS|}}}">{{{1|{{{Inhalt|{{{Text|}}}}}}}}}</div><!-- | + | -->| gefahr = <div class="alert alert-danger" style="/* .alert */ padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; /* .alert-danger */ color: #a94442; background-color: #f2dede; border-color: #ebccd1; {{{CSS|}}}" {{#if: {{{Anker|}}}|id="{{{Anker|}}}"}} >{{#if: {{{Anker|}}}<!-- |
| − | -->| info | information | #default = <div class="alert alert-info" style="/* .alert */ padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; /* .alert-info */ color: #31708f; background-color: #d9edf7; border-color: #bce8f1; {{{CSS|}}}">{{{1|{{{Inhalt|{{{Text|}}}}}}}}}</div><!-- | + | -->|<!-- |
| − | -->| erfolgreich | erfolg = <div class="alert alert-success" style="/* .alert */ padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; /* .alert-success */ color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; {{{CSS|}}}">{{{1|{{{Inhalt|{{{Text|}}}}}}}}}</div><!-- | + | --><div class="mw-collapsible mw-collapsed" style="border-bottom:1px solid gray;margin-bottom:1ex;" id="mw-customcollapsible-{{#REPLACE:{{ANCHORENCODE:{{{Anker|}}}}}|.|dot}}" ><!-- |
| − | -->| warnung = <div class="alert alert-warning" style="/* .alert */ padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; /* .alert-warning */ color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; {{{CSS|}}}">{{{1|{{{Inhalt|{{{Text|}}}}}}}}}</div><!-- | + | --><span title="Draufklicken um den Anker zu dieser Meldungsbox anzuzeigen" class="mw-customtoggle-{{#REPLACE:{{ANCHORENCODE:{{{Anker|}}}}}|.|dot}}">🔗</span><!-- |
| + | --><div class="mw-collapsible-content">Link hierher: [[#{{{Anker|}}}]]</div><!-- | ||
| + | --></div><!-- | ||
| + | -->}}<!-- | ||
| + | -->{{{1|{{{Inhalt|{{{Text|}}}}}}}}}</div><!-- | ||
| + | -->| info | information | #default = <div class="alert alert-info" style="/* .alert */ padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; /* .alert-info */ color: #31708f; background-color: #d9edf7; border-color: #bce8f1; {{{CSS|}}}" {{#if: {{{Anker|}}}|id="{{{Anker|}}}"}}>{{#if: {{{Anker|}}}<!-- | ||
| + | -->|<!-- | ||
| + | --><div class="mw-collapsible mw-collapsed" style="border-bottom:1px solid gray;margin-bottom:1ex;" id="mw-customcollapsible-{{#REPLACE:{{ANCHORENCODE:{{{Anker|}}}}}|.|dot}}" ><!-- | ||
| + | --><span title="Draufklicken um den Anker zu dieser Meldungsbox anzuzeigen" class="mw-customtoggle-{{#REPLACE:{{ANCHORENCODE:{{{Anker|}}}}}|.|dot}}">🔗</span><!-- | ||
| + | --><div class="mw-collapsible-content">Link hierher: [[#{{{Anker|}}}]]</div><!-- | ||
| + | --></div><!-- | ||
| + | -->}}<!-- | ||
| + | -->{{{1|{{{Inhalt|{{{Text|}}}}}}}}}</div><!-- | ||
| + | -->| erfolgreich | erfolg = <div class="alert alert-success" style="/* .alert */ padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; /* .alert-success */ color: #3c763d; background-color: #dff0d8; border-color: #d6e9c6; {{{CSS|}}}" {{#if: {{{Anker|}}}|id="{{{Anker|}}}"}}>{{#if: {{{Anker|}}}<!-- | ||
| + | -->|<!-- | ||
| + | --><div class="mw-collapsible mw-collapsed" style="border-bottom:1px solid gray;margin-bottom:1ex;" id="mw-customcollapsible-{{#REPLACE:{{ANCHORENCODE:{{{Anker|}}}}}|.|dot}}" ><!-- | ||
| + | --><span title="Draufklicken um den Anker zu dieser Meldungsbox anzuzeigen" class="mw-customtoggle-{{#REPLACE:{{ANCHORENCODE:{{{Anker|}}}}}|.|dot}}">🔗</span><!-- | ||
| + | --><div class="mw-collapsible-content">Link hierher: [[#{{{Anker|}}}]]</div><!-- | ||
| + | --></div><!-- | ||
| + | -->}}<!-- | ||
| + | -->{{{1|{{{Inhalt|{{{Text|}}}}}}}}}</div><!-- | ||
| + | -->| warnung = <div class="alert alert-warning" style="/* .alert */ padding: 15px; margin-bottom: 20px; border: 1px solid transparent; border-radius: 4px; /* .alert-warning */ color: #8a6d3b; background-color: #fcf8e3; border-color: #faebcc; {{{CSS|}}}" {{#if: {{{Anker|}}}|id="{{{Anker|}}}"}}>{{#if: {{{Anker|}}}<!-- | ||
| + | -->|<!-- | ||
| + | --><div class="mw-collapsible mw-collapsed" style="border-bottom:1px solid gray;margin-bottom:1ex;" id="mw-customcollapsible-{{#REPLACE:{{ANCHORENCODE:{{{Anker|}}}}}|.|dot}}" ><!-- | ||
| + | --><span title="Draufklicken um den Anker zu dieser Meldungsbox anzuzeigen" class="mw-customtoggle-{{#REPLACE:{{ANCHORENCODE:{{{Anker|}}}}}|.|dot}}">🔗</span><!-- | ||
| + | --><div class="mw-collapsible-content">Link hierher: [[#{{{Anker|}}}]]</div><!-- | ||
| + | --></div><!-- | ||
| + | -->}}<!-- | ||
| + | -->{{{1|{{{Inhalt|{{{Text|}}}}}}}}}</div><!-- | ||
-->}}<!-- end switch | -->}}<!-- end switch | ||
--></includeonly><noinclude> | --></includeonly><noinclude> | ||
| Zeile 36: | Zeile 64: | ||
|Text in der Box beachten (Info Standardstil) | |Text in der Box beachten (Info Standardstil) | ||
|Info | |Info | ||
| + | }} | ||
| + | </td><!-- | ||
| + | --></tr><!-- | ||
| + | --><tr><!-- | ||
| + | --><td> | ||
| + | <nowiki>{{</nowiki>{{PAGENAME}} | ||
| + | |Text in der Box beachten auch mit Anker (Info Standardstil) | ||
| + | |Anker=Info XY | ||
| + | }} | ||
| + | |||
| + | </td><td> | ||
| + | … ergibt Folgendes | ||
| + | |||
| + | {{ {{PAGENAME}} | ||
| + | |Text in der Box beachten auch mit Anker (Info Standardstil) | ||
| + | |Anker=Info XY | ||
}} | }} | ||
</td><!-- | </td><!-- | ||
| Zeile 83: | Zeile 127: | ||
--></table> | --></table> | ||
| − | == | + | == Beiwerte der Vorlage == |
| − | ''' | + | '''Erforderliche Werte''' und <tt>wahlfreie Vorlagenbeiwerte</tt> (Parameter) können wie folgt angewendet werden: |
; |1= <span style="font-weight:normal;">oder</span> |Inhalt= <span style="font-weight:normal;">oder</span> |Text= : der Textinhalt der Box | ; |1= <span style="font-weight:normal;">oder</span> |Inhalt= <span style="font-weight:normal;">oder</span> |Text= : der Textinhalt der Box | ||
| − | ; <span style="font-weight:normal;">|2= oder |Stil=</span> : die Stilart für die Meldungsbox <code>Info</code>, <code>Erfolg</code>, <code>Warnung</code>, <code>Gefahr</code> (Standardstil: Info) | + | ; <span style="font-weight:normal;"><tt>|2=</tt> oder <tt>|Stil=</tt></span> : die Stilart für die Meldungsbox <code>Info</code>, <code>Erfolg</code>, <code>Warnung</code>, <code>Gefahr</code> (Standardstil: Info) |
| − | ; <span style="font-weight:normal;">|CSS=</span> : CSS Anweisung für die gesamte Box, z.B. <code><nowiki>|CSS=font-size:smaller;</nowiki></code> | + | ; <span style="font-weight:normal;"><tt>|CSS=</tt></span> : CSS Anweisung für die gesamte Box, z.B. <code><nowiki>|CSS=font-size:smaller;</nowiki></code> |
| + | ; <span style="font-weight:normal;"><tt>|Anker=</tt></span> : Anker bzw. eindeutige HTML-Kennzeichen/Anknüpfungspunkt zu dieser Meldung her | ||
[[Kategorie: Infoboxen]] | [[Kategorie: Infoboxen]] | ||
</noinclude> | </noinclude> | ||
Neueste Überarbeitung vom 8. April 2024, 08:11 Uhr
Zusammenfassung: verschiedene Arten von Anzeigefeldern für Meldungen (z.B. Info, Warnung, Gefahr, Erfolg)
(Technische Anmerkung: das Layout ist von https://demo.codimd.org)
Verwendung
| Wiki Code | Beispiel |
|---|---|
{{Meldungsbox
|Text in der Box beachten (Info Standardstil)
}}
{{Meldungsbox
|Text in der Box beachten (Info Standardstil)
|Info
}}
|
… ergibt Folgendes Text in der Box beachten (Info Standardstil)
|
{{Meldungsbox
|Text in der Box beachten auch mit Anker (Info Standardstil)
|Anker=Info XY
}}
|
… ergibt Folgendes 🔗 Text in der Box beachten auch mit Anker (Info Standardstil)
Link hierher: #Info XY |
{{Meldungsbox
|Ja, Text in der Box (Stil: Erfolg)
|Erfolg
}}
|
… ergibt Folgendes Ja, Text in der Box (Stil: Erfolg)
|
{{Meldungsbox
|Passen Sie auf! Text in der Box (Stil: Warnung)
|Warnung
}}
|
… which gives Passen Sie auf! Text in der Box (Stil: Warnung)
|
{{Meldungsbox
|Oh Nein! Text in der Box (Stil: Gefahr)
|Gefahr
}}
|
… which gives Oh Nein! Text in der Box (Stil: Gefahr)
|
Beiwerte der Vorlage
Erforderliche Werte und wahlfreie Vorlagenbeiwerte (Parameter) können wie folgt angewendet werden:
- |1= oder |Inhalt= oder |Text=
- der Textinhalt der Box
- |2= oder |Stil=
- die Stilart für die Meldungsbox
Info,Erfolg,Warnung,Gefahr(Standardstil: Info) - |CSS=
- CSS Anweisung für die gesamte Box, z.B.
|CSS=font-size:smaller; - |Anker=
- Anker bzw. eindeutige HTML-Kennzeichen/Anknüpfungspunkt zu dieser Meldung her