Vorlage:Button: Unterschied zwischen den Versionen
Aus ZUM Grundschullernportal
Keine Bearbeitungszusammenfassung Markierung: Quelltext-Bearbeitung 2017 |
Keine Bearbeitungszusammenfassung Markierung: Quelltext-Bearbeitung 2017 |
||
| (7 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
| Zeile 4: | Zeile 4: | ||
# position: links|zenriert|rechts (optional, default ist links) | # position: links|zenriert|rechts (optional, default ist links) | ||
# text: ... | # text: ... | ||
# link: ... | # link: ... (Link zu interner Wikiseite) | ||
# linkext: ... (Link zu externer Internetseite) | |||
# hervorhebung: ja|nein (optional, default ist nein) | # hervorhebung: ja|nein (optional, default ist nein) | ||
| Zeile 16: | Zeile 17: | ||
|text=Start | |text=Start | ||
|link=Hauptseite | |link=Hauptseite | ||
|linkext= | |||
|hervorhebung=ja | |hervorhebung=ja | ||
}} | }} | ||
| Zeile 26: | Zeile 28: | ||
|text=Start | |text=Start | ||
|link=Hauptseite | |link=Hauptseite | ||
|linkext= | |||
|hervorhebung=ja | |hervorhebung=ja | ||
}} | }} | ||
{{button | |||
|position=zentriert | |||
|text=Fisch | |||
|link=Fisch | |||
|linkext= | |||
|hervorhebung=ja | |||
}} | |||
'''Weiteres Beispiel mit Icon:''' | '''Weiteres Beispiel mit Icon:''' | ||
| Zeile 36: | Zeile 45: | ||
|position=rechts | |position=rechts | ||
|text=Lernpfade Mathematik <span class="fa fa-chevron-circle-right"></span> | |text=Lernpfade Mathematik <span class="fa fa-chevron-circle-right"></span> | ||
|link= | |link= | ||
|linkext=https://www.zum.de | |||
}} | }} | ||
</pre> | </pre> | ||
| Zeile 45: | Zeile 55: | ||
|position=rechts | |position=rechts | ||
|text=Lernpfade Mathematik <span class="fa fa-chevron-circle-right"></span> | |text=Lernpfade Mathematik <span class="fa fa-chevron-circle-right"></span> | ||
|link= | |link= | ||
|linkext=https://www.zum.de | |||
}} | }} | ||
| Zeile 61: | Zeile 72: | ||
|text=Button links | |text=Button links | ||
|link=:Kategorie:Lernpfad | |link=:Kategorie:Lernpfad | ||
|linkext= | |||
}} | }} | ||
| | | | ||
| Zeile 67: | Zeile 79: | ||
|text=Button Mitte | |text=Button Mitte | ||
|link=:Kategorie:Lernpfad | |link=:Kategorie:Lernpfad | ||
|linkext= | |||
}} | }} | ||
| | | | ||
| Zeile 73: | Zeile 86: | ||
|text=Button rechts | |text=Button rechts | ||
|link=:Kategorie:Lernpfad | |link=:Kategorie:Lernpfad | ||
|linkext= | |||
}} | }} | ||
}} | }} | ||
| Zeile 84: | Zeile 98: | ||
|text=Button links | |text=Button links | ||
|link=:Kategorie:Lernpfad | |link=:Kategorie:Lernpfad | ||
|linkext= | |||
}} | }} | ||
| | | | ||
| Zeile 90: | Zeile 105: | ||
|text=Button Mitte | |text=Button Mitte | ||
|link=:Kategorie:Lernpfad | |link=:Kategorie:Lernpfad | ||
|linkext= | |||
}} | }} | ||
| | | | ||
| Zeile 96: | Zeile 112: | ||
|text=Button rechts | |text=Button rechts | ||
|link=:Kategorie:Lernpfad | |link=:Kategorie:Lernpfad | ||
|linkext= | |||
}} | }} | ||
}} | }} | ||
| Zeile 109: | Zeile 126: | ||
|text=<span class="fa fa-chevron-circle-left"></span> zurück | |text=<span class="fa fa-chevron-circle-left"></span> zurück | ||
|link=:Kategorie:Lernpfad | |link=:Kategorie:Lernpfad | ||
|linkext= | |||
}} | }} | ||
| | | | ||
| Zeile 115: | Zeile 133: | ||
|text=weiter <span class="fa fa-chevron-circle-right"></span> | |text=weiter <span class="fa fa-chevron-circle-right"></span> | ||
|link=:Kategorie:Lernpfad | |link=:Kategorie:Lernpfad | ||
|linkext= | |||
|hervorhebung=ja | |hervorhebung=ja | ||
}} | }} | ||
| Zeile 128: | Zeile 147: | ||
|text=<span class="fa fa-chevron-circle-left"></span> zurück | |text=<span class="fa fa-chevron-circle-left"></span> zurück | ||
|link=:Kategorie:Lernpfad | |link=:Kategorie:Lernpfad | ||
|linkext= | |||
}} | }} | ||
| | | | ||
| Zeile 134: | Zeile 154: | ||
|text=weiter <span class="fa fa-chevron-circle-right"></span> | |text=weiter <span class="fa fa-chevron-circle-right"></span> | ||
|link=:Kategorie:Lernpfad | |link=:Kategorie:Lernpfad | ||
|linkext= | |||
|hervorhebung=ja | |hervorhebung=ja | ||
}} | }} | ||
| Zeile 140: | Zeile 161: | ||
</noinclude><includeonly> | </noinclude><includeonly> | ||
<div class="{{#switch:{{{position|}}}|links=button-left|zentriert=button-center|rechts=button-right}} {{#ifeq:{{{hervorhebung|}}}|ja|button-primary}}">{{#if:{{{link}}}|[[{{{link|}}}|{{{text|}}}]]}} {{#if:{{{linkext}}}| | <div class="{{#switch:{{{position|}}}|links=button-left|zentriert=button-center|rechts=button-right}} {{#ifeq:{{{hervorhebung|}}}|ja|button-primary}}">{{#if:{{{link}}}|[[{{{link|}}}|{{{text|}}}]]}} {{#if:{{{linkext}}}|[{{{linkext|}}} {{{text|}}}]}}</div> | ||
</includeonly> | </includeonly> | ||
Aktuelle Version vom 5. April 2020, 16:04 Uhr
Mit dieser Vorlage können Links einfach als Button angezeigt werden. Die Vorlage hat folgende Parameter:
- position: links|zenriert|rechts (optional, default ist links)
- text: ...
- link: ... (Link zu interner Wikiseite)
- linkext: ... (Link zu externer Internetseite)
- hervorhebung: ja|nein (optional, default ist nein)
Das schreibt man:
{{button
|position=zentriert
|text=Start
|link=Hauptseite
|linkext=
|hervorhebung=ja
}}
Das sieht man:
Weiteres Beispiel mit Icon:
{{button
|position=rechts
|text=Lernpfade Mathematik <span class="fa fa-chevron-circle-right"></span>
|link=
|linkext=https://www.zum.de
}}
Das sieht man:
Mehrere Buttons nebeneinander
Wenn mehrere Buttons nebeneinander positioniert werden sollen, kann diese Vorlage mit der Vorlage:2Spalten bzw. der Vorlage:3Spalten kombiniert werden. Die Buttons werden dann auf kleinen Displays untereinander statt nebeneinander angezeigt:
{{3Spalten
|
{{button
|position=links
|text=Button links
|link=:Kategorie:Lernpfad
|linkext=
}}
|
{{button
|position=zentriert
|text=Button Mitte
|link=:Kategorie:Lernpfad
|linkext=
}}
|
{{button
|position=rechts
|text=Button rechts
|link=:Kategorie:Lernpfad
|linkext=
}}
}}
Das sieht man:
Weiteres Beispiel
{{2Spalten
|
{{button
|position=links
|text=<span class="fa fa-chevron-circle-left"></span> zurück
|link=:Kategorie:Lernpfad
|linkext=
}}
|
{{button
|position=rechts
|text=weiter <span class="fa fa-chevron-circle-right"></span>
|link=:Kategorie:Lernpfad
|linkext=
|hervorhebung=ja
}}
}}
Das sieht man:
