Vorlage:Button: Unterschied zwischen den Versionen
Aus DragonballWiki
Weitere Optionen
Inhalt gelöscht Inhalt hinzugefügt
| Zeile 1: | Zeile 1: | ||
<!-- |
|||
<includeonly><span class="mcbutton mw-ui-button {{{class|}}} {{#switch: {{{color|white}}} | red = mw-ui-destructive | green = mw-ui-constructive | white = | blue = mw-ui-progressive|#default = {{{color|white}}}}}" style="width:{{{width|auto}}}; height:{{{height|auto}}}; line-height: {{{lineheight|1}}}; margin-left:{{{marginleft|auto}}}; margin-right:{{{marginright|auto}}};">{{{1|Button text}}}</span></includeonly><noinclude>{{Button|Test}}<noinclude>[[Category:Design Templates]]</noinclude> |
|||
Template:Button |
|||
-------------------- |
|||
Template to create a button that is actually a link |
|||
@param {string} class HTML class for the button |
|||
@param {string} icon File name of the icon |
|||
@param {string} label Label for the button |
|||
@param {string} page Page name to be link |
|||
@param {string} type Type of button |
|||
@param {string} url URL to be linked |
|||
@return {string} wikitext of the button |
|||
--><includeonly><!-- |
|||
--><div class="t-button {{#if:{{{type|}}}|t-button--{{{type}}}}} {{#if:{{{url|}}}|plainlinks}} {{#if:{{{class|}}}|{{{class}}}}}"><!-- |
|||
-->{{#if:{{{page|}}}|<!-- |
|||
-->[[{{{page}}}|{{#if:{{{icon|}}}|<span class="t-button-icon">[[File:{{{icon}}}|{{#ifeq:{{{type|}}}|icon|24px|18px}}|class=metadata|link=]]</span>}}{{{label|{{{page}}}}}}]]<!-- |
|||
-->}}<!-- |
|||
-->{{#if:{{{url|}}}|<!-- |
|||
-->[{{{url}}} {{#if:{{{icon|}}}|<span class="t-button-icon">[[File:{{{icon}}}|{{#ifeq:{{{type|}}}|icon|24px|18px}}|class=metadata|link=]]</span>}}{{{label}}}]<!-- |
|||
-->}}<!-- |
|||
--></div><!-- |
|||
--><templatestyles src="Template:Button/styles.css"/><!-- |
|||
--></includeonly><!-- |
|||
--><noinclude><!-- |
|||
Template documentation |
|||
---------------------- |
|||
-->{{/doc}}<!-- |
|||
--></noinclude> |
|||
Aktuelle Version vom 12. Februar 2025, 23:12 Uhr
Diese Dokumentation wird von Vorlage:Button/doc aus übernommen. Änderungen können auf der Diskussionsseite vorgeschlagen werden.
Create a button that is actually a link
Usage
{{Button|label=Best ship|page=Carrack}} gives
{{Button|label=RSI site|url=https://robertsspaceindustries.com}} gives
{{Button|label=Best mascot|page=Pico|type=primary}} gives
{{Button|label=Lando's favourite ship|page=Carrack|type=secondary}} gives
TemplateData
Create a button that is actually a link
| Parameter | Beschreibung | Typ | Status | |
|---|---|---|---|---|
| Label | label | Label text of the button | Mehrzeiliger Text | vorgeschlagen |
| Page name | page | Wiki page name | Seitenname | optional |
| URL | url | URL of the site linked | URL | optional |
| Button type | type | Type of the button
| Mehrzeiliger Text | optional |
| HTML class | class | HTML class added to the button | Mehrzeiliger Text | optional |