Template:Article thumbnail: Difference between revisions
Appearance
Content deleted Content added
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<templatestyles src="Article thumbnail/styles.css" /> |
<templatestyles src="Article thumbnail/styles.css" /> |
||
<div class="article-thumb"> |
<div class="article-thumb article-thumb--align-{{{align|center}}}"> |
||
<div class="article-thumb__imgwrap"> |
<div class="article-thumb__imgwrap"> |
||
[[File:{{{image|work-in-progress-book.jpg}}}|{{{width|180}}}px|link={{{page|{{BASEPAGENAME}}}}}|alt={{{alt|Thumbnail for {{{page|{{BASEPAGENAME}}}}}}}}]] |
[[File:{{{image|work-in-progress-book.jpg}}}|{{{width|180}}}px|link={{{page|{{BASEPAGENAME}}}}}|alt={{{alt|Thumbnail for {{{page|{{BASEPAGENAME}}}}}}}}]] |
||
| Line 9: | Line 9: | ||
</div> |
</div> |
||
</div><noinclude> |
</div><noinclude> |
||
== What this does == |
|||
Displays a small, consistent '''article thumbnail''' card: an image that links to a page, with a caption under it. |
|||
== Parameters == |
== Parameters == |
||
* <code>image</code> – |
* <code>image</code> – File name without prefix. |
||
* <code>page</code> – |
* <code>page</code> – Target page link. |
||
* <code>caption</code> – |
* <code>caption</code> – Text under the link (color #202122). |
||
* <code> |
* <code>align</code> – Optional. Set to <code>left</code>, <code>right</code>, or <code>center</code>. Defaults to <code>center</code>. |
||
* <code> |
* <code>width</code> – Image width (numeric). |
||
== Example == |
== Example (Left Aligned) == |
||
<pre> |
<pre> |
||
{{Article thumbnail |
{{Article thumbnail |
||
| Line 25: | Line 22: | ||
| page = Atomic Habits |
| page = Atomic Habits |
||
| caption = James Clear (2018) |
| caption = James Clear (2018) |
||
| align = left |
|||
}} |
}} |
||
</pre> |
</pre> |
||
Latest revision as of 15:23, 4 January 2026
Parameters
image– File name without prefix.page– Target page link.caption– Text under the link (color #202122).align– Optional. Set toleft,right, orcenter. Defaults tocenter.width– Image width (numeric).
Example (Left Aligned)
{{Article thumbnail
| image = Atomic Habits cover.jpg
| page = Atomic Habits
| caption = James Clear (2018)
| align = left
}}