Template:ImageButton: Difference between revisions

From Echopedia
echopediagg>NtsFranz
No edit summary
No edit summary
 
(8 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#tag:html|
<div class="image_button" style="display:inline-block; width:10em; padding:1em; text-align:center; vertical-align:top; overflow:hidden; background-color:#444; color:#eee; border:0.1em solid black; text-shadow:0 0 .5em #000; box-shadow:0 0 .5em #0003;">
{{#if:{{{image|}}}|[[File:{{{image}}}{{!}}160x100px{{!}}link={{{page}}}]]<br>}}[[:{{{page}}}|'''{{{text}}}''']]
<div class="image_button">
</div><noinclude>
<a href="/wiki/{{{page}}}">
<div style="background-image: url('{{{image}}}');">
{{{text}}}
</div>
</a>
</div>
}}
<noinclude>
<templatedata>
<templatedata>
{
{
"params": {
"params": {
"text": {
"text": {
"description": "Content of the button",
"description": "Content of the button",
"type": "string",
"type": "string",
"required": true
"required": true
},
},
"image": {
"image": {
"description": "Filename of an uploaded wiki image (not a URL). Omit for a text-only button.",
"description": "full image url",
"type": "string",
"type": "url",
"suggested": true
"suggested": true
},
},
"page": {
"page": {
"description": "Name of the page to link to",
"description": "Name of the page to link to",
"type": "wiki-page-name",
"type": "wiki-page-name",
"required": true
"required": true
}
}
},
"description": "A large link button with an image background",
"maps": {
"text": {}
},
},
"description": "A card-style link button, optionally with an image",
"format": "block",
"format": "block",
"paramOrder": [
"paramOrder": [
"text",
"text",
"page",
"page",
"image"
"image"
]
]
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>

Latest revision as of 01:06, 12 July 2026

[[:{{{page}}}|{{{text}}}]]

<templatedata> { "params": { "text": { "description": "Content of the button", "type": "string", "required": true }, "image": { "description": "Filename of an uploaded wiki image (not a URL). Omit for a text-only button.", "type": "string", "suggested": true }, "page": { "description": "Name of the page to link to", "type": "wiki-page-name", "required": true } }, "description": "A card-style link button, optionally with an image", "format": "block", "paramOrder": [ "text", "page", "image" ] } </templatedata>