×
Create a new article
Write your page title here:
We currently have 3,035 articles on YumeWiki. Type your article name above or click on one of the titles below and start writing!



YumeWiki
3,035Articles

Template:Thumb/doc: Difference between revisions

(create doc for template:thumb)
 
(change category to lowercase to fit in line with other editing categories)
 
(2 intermediate revisions by the same user not shown)
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|alttext}}</pre>
<pre>{{thumb|ext.png|width|alignment|caption|hovertext}}</pre>
or
or
<pre>{{thumb|File=ext.png|width=?|align=?|caption=?|alt=?}}</pre>
<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 41: Line 41:
},
},
"5": {
"5": {
"aliases": ["alt"],
"aliases": ["hover"],
"label": "Alt Text",
"label": "Hover Text",
"type": "string",
"type": "string",
"description": "Text that is read by screen readers, and appears when hovering over the image.",
"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>
==Sample==
==Sample==
The following input:
The following input:
<pre>{{thumb|cagedfairy.png|300|right|Example usage.|Hey, listen!}}</pre>
<pre>{{thumb|cagedfairy.png|300|center|Example usage.|Hey, listen!}}</pre>
Produces:
Produces:
{{thumb|cagedfairy.png|300|right|Example usage.|Hey, listen!}}
{{thumb|cagedfairy.png|300|center|Example usage.|Hey, listen!}}<br clear=all>
<noinclude>__NOTOC__ [[Category:Template Documentation]]</noinclude>
Compare this to the actual image thumb:
<pre>[[File:cagedfairy.png|thumb|300px|center|Example usage.]]</pre>
This instead produces:
[[File:cagedfairy.png|thumb|300px|center|Example usage.]]
<noinclude>__NOTOC__ [[Category:Template documentation]]</noinclude>
<includeonly>__NOEDITSECTION__</includeonly>
<includeonly>__NOEDITSECTION__</includeonly>

Latest revision as of 22:00, 11 May 2024

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

Template parameters

ParameterDescriptionTypeStatus
File1 File

The image.

Example
Example.png
Filerequired
Image Width2 width size

The wanted width of the image in pixels.

Default
100% of page width
Example
400
Numberoptional
Alignment3 align

The alignment of the image on the page.

Suggested values
left center right
Default
inline
Lineoptional
Thumb Caption4 caption

A caption for the image thumb.

Example
The location of the [[Yume Nikki:Frog|Frog]] in the woods.
Contentoptional
Hover Text5 hover

Text that appears when hovering over the image.

Example
A picture of the Frog NPC in Dense Woods B.
Stringoptional

Sample

The following input:

{{thumb|cagedfairy.png|300|center|Example usage.|Hey, listen!}}

Produces:

Hey, listen!
Enlarge
Example usage.


Compare this to the actual image thumb:

[[File:cagedfairy.png|thumb|300px|center|Example usage.]]

This instead produces:

Example usage.