m (force specifying px or %) |
(wrong category oops) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
<div class="thumbinner" style="width:{{{2|{{{width|{{{size| | <div class="thumbinner" style="width:{{{2|{{{width|{{{size|100}}}}}}}}}px; {{#ifeq:{{{3|{{{align|}}}}}}|center|margin:auto|float:{{{3|{{{align|}}}}}}}};"><div style="background-color:white; border: 1px solid #c8ccd1;">[[File:{{{1|{{{File}}}}}}|{{{2|{{{width|{{{size|100}}}}}}}}}px|{{{5|{{{hover|}}}}}}]]</div><div class="thumbcaption"><div class="magnify">[[File:{{{1|{{{File}}}}}}|Enlarge]]</div>{{{4|{{{caption|}}}}}}</div></div> | ||
<noinclude>{{documentation}}</noinclude> | <noinclude> | ||
{{documentation}} | |||
[[Category:Formatting templates]] | |||
</noinclude> |
Latest revision as of 04:58, 10 May 2024
[[File:{{{File}}}|100px|]]
Documentation (for the above template, sometimes hidden or invisible)
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|center|Example usage.|Hey, listen!}}
Produces:
Compare this to the actual image thumb:
[[File:cagedfairy.png|thumb|300px|center|Example usage.]]
This instead produces:
Visit Template:Thumb/doc to edit this text! (How does this work?)