(create doc for template:thumb) |
m (change param name) |
||
Line 2: | Line 2: | ||
Mimics the function of image thumbs, but allows images to be enlarged. | Mimics the function of image thumbs, but allows images to be enlarged. | ||
==Syntax== | ==Syntax== | ||
<pre>{{thumb|ext.png|width|alignment|caption| | <pre>{{thumb|ext.png|width|alignment|caption|hovertext}}</pre> | ||
or | or | ||
<pre>{{thumb|File=ext.png|width=?|align=?|caption=?| | <pre>{{thumb|File=ext.png|width=?|align=?|caption=?|hover=?}}</pre> | ||
==Usage== | ==Usage== | ||
The only real use of the template is to allow thumbs to present enlarged images, which Mediawiki normally does not allow. Otherwise, this template acts almost exactly as normal images with mode set to "thumb." | The only real use of the template is to allow thumbs to present enlarged images, which Mediawiki normally does not allow. Otherwise, this template acts almost exactly as normal images with mode set to "thumb." | ||
Line 30: | Line 30: | ||
"type": "line", | "type": "line", | ||
"description": "The alignment of the image on the page.", | "description": "The alignment of the image on the page.", | ||
"suggestedvalues": ["left | "suggestedvalues": ["left","right"], | ||
"default": "inline" | "default": "inline" | ||
}, | }, | ||
Line 41: | Line 41: | ||
}, | }, | ||
"5": { | "5": { | ||
"aliases": [" | "aliases": ["hover"], | ||
"label": " | "label": "Hover Text", | ||
"type": "string", | "type": "string", | ||
"description": "Text that | "description": "Text that appears when hovering over the image.", | ||
"example": "A picture of the Frog NPC in Dense Woods B." | "example": "A picture of the Frog NPC in Dense Woods B." | ||
}}}</templatedata> | }}}</templatedata> | ||
Line 51: | Line 51: | ||
<pre>{{thumb|cagedfairy.png|300|right|Example usage.|Hey, listen!}}</pre> | <pre>{{thumb|cagedfairy.png|300|right|Example usage.|Hey, listen!}}</pre> | ||
Produces: | Produces: | ||
{{thumb|cagedfairy.png|300|right|Example usage.|Hey, listen!}} | {{thumb|cagedfairy.png|300|right|Example usage.|Hey, listen!}}<br clear=all> | ||
Compare this to the normal output: | |||
[[File:cagedfairy.png|thumb|300px|right|Example usage.]] | |||
<noinclude>__NOTOC__ [[Category:Template Documentation]]</noinclude> | <noinclude>__NOTOC__ [[Category:Template Documentation]]</noinclude> | ||
<includeonly>__NOEDITSECTION__</includeonly> | <includeonly>__NOEDITSECTION__</includeonly> |
Revision as of 11:20, 30 July 2023
Description
Mimics the function of image thumbs, but allows images to be enlarged.
Syntax
{{thumb|ext.png|width|alignment|caption|hovertext}}
or
{{thumb|File=ext.png|width=?|align=?|caption=?|hover=?}}
Usage
The only real use of the template is to allow thumbs to present enlarged images, which Mediawiki normally does not allow. Otherwise, this template acts almost exactly as normal images with mode set to "thumb."
Parameters
Parameter | Description | Type | Status | |
---|---|---|---|---|
File | 1 File | The image.
| File | required |
Image Width | 2 width size | The wanted width of the image in pixels.
| Number | optional |
Alignment | 3 align | The alignment of the image on the page.
| Line | optional |
Thumb Caption | 4 caption | A caption for the image thumb.
| Content | optional |
Hover Text | 5 hover | Text that appears when hovering over the image.
| String | optional |
Sample
The following input:
{{thumb|cagedfairy.png|300|right|Example usage.|Hey, listen!}}
Produces:
Compare this to the normal output: