Jump to content

Template:Infobox book: Difference between revisions

From wiki58
Replace Fandom component markup with native Wikipedia classes; retain source parameters, content, and archived history
m Remove generated paragraph spacing inside infobox cells; retain Wikipedia CSS
 
Line 2: Line 2:
{{#if:{{{title|}}}|<caption class="infobox-title">{{{title|}}}</caption>|}}
{{#if:{{{title|}}}|<caption class="infobox-title">{{{title|}}}</caption>|}}
{{#if:{{{image|}}}|<tr>
{{#if:{{{image|}}}|<tr>
<td class="infobox-image" colspan="2">
<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>
{{#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>
</tr>|}}
</tr>|}}
{{#if:{{{author|}}}|<tr>
{{#if:{{{author|}}}|<tr>
<th class="infobox-label" scope="row">
<th class="infobox-label" scope="row">Author</th>
Author
<td class="infobox-data">{{{author|}}}</td>
</th>
<td class="infobox-data">
{{{author|}}}
</td>
</tr>|}}
</tr>|}}
{{#if:{{{illustrator|}}}|<tr>
{{#if:{{{illustrator|}}}|<tr>
<th class="infobox-label" scope="row">
<th class="infobox-label" scope="row">Illustrator</th>
Illustrator
<td class="infobox-data">{{{illustrator|}}}</td>
</th>
<td class="infobox-data">
{{{illustrator|}}}
</td>
</tr>|}}
</tr>|}}
{{#if:{{{datePublished|}}}|<tr>
{{#if:{{{datePublished|}}}|<tr>
<th class="infobox-label" scope="row">
<th class="infobox-label" scope="row">Published on</th>
Published on
<td class="infobox-data">{{{datePublished|}}}</td>
</th>
<td class="infobox-data">
{{{datePublished|}}}
</td>
</tr>|}}
</tr>|}}
{{#if:{{{publisher|}}}|<tr>
{{#if:{{{publisher|}}}|<tr>
<th class="infobox-label" scope="row">
<th class="infobox-label" scope="row">Publisher</th>
Publisher
<td class="infobox-data">{{{publisher|}}}</td>
</th>
<td class="infobox-data">
{{{publisher|}}}
</td>
</tr>|}}
</tr>|}}
{{#if:{{{previous|}}}{{{next|}}}|<tr>
{{#if:{{{previous|}}}{{{next|}}}|<tr>
<th class="infobox-header" colspan="2">
<th class="infobox-header" colspan="2">Publication order</th>
Publication order
</th>
</tr>
</tr>
<tr>
<tr>
<td class="infobox-full-data" colspan="2">
<td class="infobox-full-data" colspan="2"><table class="infobox-subbox">
<table class="infobox-subbox">
<tr>
<tr>
{{#if:{{{previous|}}}|<th class="infobox-label" scope="col">
{{#if:{{{previous|}}}|<th class="infobox-label" scope="col">Previous</th>|}}
Previous
{{#if:{{{next|}}}|<th class="infobox-label" scope="col">Next</th>|}}
</th>|}}
{{#if:{{{next|}}}|<th class="infobox-label" scope="col">
Next
</th>|}}
</tr>
</tr>
<tr>
<tr>
{{#if:{{{previous|}}}|<td class="infobox-data">
{{#if:{{{previous|}}}|<td class="infobox-data">{{{previous|}}}</td>|}}
{{{previous|}}}
{{#if:{{{next|}}}|<td class="infobox-data">{{{next|}}}</td>|}}
</td>|}}
{{#if:{{{next|}}}|<td class="infobox-data">
{{{next|}}}
</td>|}}
</tr>
</tr>
</table>
</table></td>
</td>
</tr>|}}
</tr>|}}
</table>|}}<includeonly>[[Category:Books]]</includeonly><noinclude>
</table>|}}<includeonly>[[Category:Books]]</includeonly><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.