Template:MP link/doc: Difference between revisions

copy from https://cytooxien.wiki.gg/de/wiki/Vorlage:MP_link/doc
https://support.wiki.gg>Mr Pie 5
(Updating IMP pages)
(copy from https://cytooxien.wiki.gg/de/wiki/Vorlage:MP_link/doc)
Line 1: Line 1:
This creates one of the stylized and formatted links on the [[{{MediaWiki:Mainpage}}|main page]].
This creates one of the stylized and formatted links on the [[{{SITENAME}}|main page]].


== Usage ==
== Usage ==
Groups of this template should be wrapped inside of <code><nowiki><div class="mp-links"></div></nowiki></code> and each entry should be a separate line in an [[wikipedia:Help:Lists#Basically|unordered list]]. This div can be given one of the classes <code>columns-x</code> where x is a number from 1 to 7, and the links will line up in that many columns if space permits (default is 3). The div can also optionally be given the class <code>stretch</code> and it will stretch the list vertically to fill empty space. See [[Mediawiki:Common.css]] for the full definitions of these classes and styling for this template.
Groups of this template should be wrapped inside of <code><nowiki><div class="mp-links"></div></nowiki></code> and each entry should be a separate line in an [[wikipedia:Help:Lists#Basically|unordered list]]. This div can be given one of the classes <code>columns-x</code> where x is a number from 1 to 5, and the links will line up in that many columns if space permits (default is 3). The div can also optionally be given the class <code>stretch</code> and it will stretch the list vertically to fill empty space. See [[Mediawiki:Common.css]] for the full definitions of these classes and styling for this template.


===Parameters===
===Parameters===
<templatedata>
<templatedata>
{
{
"description": {
    "description": {
"en": "Creates stylized and formatted links on the main page."
        "en": "Creates stylized and formatted links on the main page."
},
    },
"format": "inline",
    "format": "inline",
"params": {
    "params": {
"1": {
        "1": {
"label": {
            "label": {
"en": "Text"
                "en": "Text"
},
            },
"description": {
            "description": {
"en": "The text to display. If the link parameter is not given, this will also be the link target."
                "en": "The text to display. If the link parameter is not given, this will also be the link target."
},
            },
"example": "Stuff",
            "required": true,
"type": "string",
            "example": "Stuff",
"suggested": true
            "type": "string"
},
        },
"link": {
        "link": {
"label": {
            "label": {
"en": "Link"
                "en": "Link"
},
            },
"description": {
            "description": {
"en": "The target page for the link, if different than the display text."
                "en": "The target page for the link, if different than the display text."
},
            },
"required": false,
            "required": false,
"example": "Main Page",
            "example": "Main Page",
"type": "wiki-page-name"
            "type": "wiki-page-name"
},
        },
"image": {
        "image": {
"label": {
            "label": {
"en": "Image"
                "en": "Image"
},
            },
"description": {
            "description": {
"en": "An image to display with the link."
                "en": "An image to display with the link."
},
            },
"required": false,
            "required": false,
"suggested": true,
            "suggested": true,
"type": "wiki-file-name"
            "type": "wiki-file-name"
},
        },
"size": {
        "size": {
"label": {
            "label": {
"en": "Image size"
                "en": "Image size"
},
            },
"description": {
            "description": {
"en": "The size of the image, in px."
                "en": "The size of the image, in px."
},
            },
"required": false,
            "required": false,
"default": "42px",
            "default": "42px",
"type": "string"
            "type": "string"
},
        }
"imageClass": {
    },
"label": "Image class",
    "paramOrder": [
"description": "A class to give directly to the image",
        "1",
"example": "invert-on-dark",
        "link",
"type": "string",
        "image",
"suggestedvalues": [
        "size"
"invert-on-dark",
    ]
"invert-on-light"
]
},
"altText": {
"label": "Alt text",
"description": "Alt text to describe the image",
"example": "Wiki logo",
"type": "string",
"suggested": true
}
},
"paramOrder": [
"1",
"link",
"image",
"size",
"imageClass",
"altText"
]
}
}
</templatedata>
</templatedata>