Jump to content

Template:Infobox book: Difference between revisions

From wiki58
m 1 revision: Updates made for portability
 
m Remove generated paragraph spacing inside infobox cells; retain Wikipedia CSS
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<infobox>
{{#if:{{{title|}}}{{{image|}}}{{{author|}}}{{{illustrator|}}}{{{datePublished|}}}{{{publisher|}}}{{{previous|}}}{{{next|}}}|<table class="infobox">
<title source="title"/>
{{#if:{{{title|}}}|<caption class="infobox-title">{{{title|}}}</caption>|}}
<image source="image"><caption source="imagecaption"/></image>
{{#if:{{{image|}}}|<tr>
<data source="author"><label>Author</label></data>
<td class="infobox-image" colspan="2">{{#ifeq:{{#sub:{{{image|}}}|0|1}}|[|{{{image|}}}|[[{{#ifeq:{{lc:{{#sub:{{{image|}}}|0|5}}}}|file:||{{#ifeq:{{lc:{{#sub:{{{image|}}}|0|6}}}}|image:||File:}}}}{{{image|}}}|frameless|220px]]}}{{#if:{{{imagecaption|}}}|<div class="infobox-caption">{{{imagecaption|}}}</div>|}}</td>
<data source="illustrator"><label>Illustrator</label></data>
</tr>|}}
<data source="datePublished"><label>Published on</label></data>
{{#if:{{{author|}}}|<tr>
<data source="publisher"><label>Publisher</label></data>
<th class="infobox-label" scope="row">Author</th>
<group layout="horizontal">
<td class="infobox-data">{{{author|}}}</td>
<header>Publication order</header>
</tr>|}}
<data source="previous"><label>Previous</label></data>
{{#if:{{{illustrator|}}}|<tr>
<data source="next"><label>Next</label></data>
<th class="infobox-label" scope="row">Illustrator</th>
</group>
<td class="infobox-data">{{{illustrator|}}}</td>
</infobox><includeonly>[[Category:Books]]</includeonly><noinclude>{{Documentation}}</noinclude>
</tr>|}}
{{#if:{{{datePublished|}}}|<tr>
<th class="infobox-label" scope="row">Published on</th>
<td class="infobox-data">{{{datePublished|}}}</td>
</tr>|}}
{{#if:{{{publisher|}}}|<tr>
<th class="infobox-label" scope="row">Publisher</th>
<td class="infobox-data">{{{publisher|}}}</td>
</tr>|}}
{{#if:{{{previous|}}}{{{next|}}}|<tr>
<th class="infobox-header" colspan="2">Publication order</th>
</tr>
<tr>
<td class="infobox-full-data" colspan="2"><table class="infobox-subbox">
<tr>
{{#if:{{{previous|}}}|<th class="infobox-label" scope="col">Previous</th>|}}
{{#if:{{{next|}}}|<th class="infobox-label" scope="col">Next</th>|}}
</tr>
<tr>
{{#if:{{{previous|}}}|<td class="infobox-data">{{{previous|}}}</td>|}}
{{#if:{{{next|}}}|<td class="infobox-data">{{{next|}}}</td>|}}
</tr>
</table></td>
</tr>|}}
</table>|}}<includeonly>[[Category:Books]]</includeonly><noinclude>
Native MediaWiki infobox using locally mirrored Wikipedia styles. Image fields accept a bare filename, a <code>File:</code>-prefixed name, or complete <code><nowiki>[[File:…]]</nowiki></code> markup. Fields, defaults, and categories retain the imported template API.
 
{{Documentation}}</noinclude>

Latest revision as of 18:52, 11 November 2026

Native MediaWiki infobox using locally mirrored Wikipedia styles. Image fields accept a bare filename, a File:-prefixed name, or complete [[File:…]] markup. Fields, defaults, and categories retain the imported template API.