Template:Book: Difference between revisions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<div style="width: 300px; background: #ffffff; border: 1px solid #aaa; padding: 0.5em | <div style="max-width: 300px; background: #ffffff; border: 1px solid #aaa; padding: 0.5em;"> | ||
<table style="width: 100%; background: #ffffff; border-spacing: 0; margin: 0;"> | <table style="width: 100%; background: #ffffff; border-spacing: 0; margin: 0;"> | ||
<tr> | <tr> | ||
<td colspan="2" style="text-align: center; background-color: #f2f2f2; font-size: 120%; padding: 0.5em; font-weight: bold;"> | <td colspan="2" style="text-align: center; background-color: #f2f2f2; font-size: 120%; padding: 0.5em; font-weight: bold;">{{{title|No title provided}}}</td> | ||
</tr> | </tr> | ||
{{#if: {{{image|}}}| | |||
{{#if: {{{image|}}} | | |||
<tr> | <tr> | ||
<td colspan="2" style="text-align: center; padding: 0.5em;"> | <td colspan="2" style="text-align: center; padding: 0.5em;"> | ||
<img src="{{{image}}}" alt="{{{caption|Book cover}}}" style="max-width: 100%; height: auto;"/> | |||
<div style="font-style: italic; font-size: 90%;">{{{caption|No caption provided}}}</div> | |||
</td> | </td> | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if: {{{author|}}}| | |||
{{#if: {{{author|}}} | | |||
<tr> | <tr> | ||
<td style="font-weight: bold; padding: 0.5em;">Author</td> | <td style="font-weight: bold; padding: 0.5em;">Author</td> | ||
| Line 34: | Line 19: | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if: {{{audio_read_by|}}}| | |||
{{#if: {{{audio_read_by|}}} | | |||
<tr> | <tr> | ||
<td style="font-weight: bold; padding: 0.5em;"> | <td style="font-weight: bold; padding: 0.5em;">Narrator (Audiobook)</td> | ||
<td style="padding: 0.5em;">{{{audio_read_by}}}</td> | <td style="padding: 0.5em;">{{{audio_read_by}}}</td> | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if: {{{series|}}}| | |||
{{#if: {{{series|}}} | | |||
<tr> | <tr> | ||
<td style="font-weight: bold; padding: 0.5em;">Series</td> | <td style="font-weight: bold; padding: 0.5em;">Series</td> | ||
| Line 50: | Line 31: | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if: {{{publication_date|}}}| | |||
{{#if: {{{publication_date|}}} | | |||
<tr> | <tr> | ||
<td style="font-weight: bold; padding: 0.5em;">Publication | <td style="font-weight: bold; padding: 0.5em;">Publication Date</td> | ||
<td style="padding: 0.5em;">{{{publication_date}}}</td> | <td style="padding: 0.5em;">{{{publication_date}}}</td> | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if: {{{publisher|}}}| | |||
{{#if: {{{publisher|}}} | | |||
<tr> | <tr> | ||
<td style="font-weight: bold; padding: 0.5em;">Publisher</td> | <td style="font-weight: bold; padding: 0.5em;">Publisher</td> | ||
| Line 66: | Line 43: | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if: {{{media_type|}}}| | |||
{{#if: {{{media_type|}}} | | |||
<tr> | <tr> | ||
<td style="font-weight: bold; padding: 0.5em;">Media | <td style="font-weight: bold; padding: 0.5em;">Media Type</td> | ||
<td style="padding: 0.5em;">{{{media_type}}}</td> | <td style="padding: 0.5em;">{{{media_type}}}</td> | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if: {{{pages|}}}| | |||
{{#if: {{{pages|}}} | | |||
<tr> | <tr> | ||
<td style="font-weight: bold; padding: 0.5em;">Pages</td> | <td style="font-weight: bold; padding: 0.5em;">Pages</td> | ||
| Line 82: | Line 55: | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if: {{{genre|}}}| | |||
{{#if: {{{genre|}}} | | |||
<tr> | <tr> | ||
<td style="font-weight: bold; padding: 0.5em;">Genre</td> | <td style="font-weight: bold; padding: 0.5em;">Genre</td> | ||
| Line 90: | Line 61: | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if: {{{isbn|}}}| | |||
{{#if: {{{isbn|}}} | | |||
<tr> | <tr> | ||
<td style="font-weight: bold; padding: 0.5em;">ISBN</td> | <td style="font-weight: bold; padding: 0.5em;">ISBN</td> | ||
| Line 98: | Line 67: | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if: {{{preceded_by|}}}| | |||
{{#if: {{{preceded_by|}}} | | |||
<tr> | <tr> | ||
<td style="font-weight: bold; padding: 0.5em;">Preceded | <td style="font-weight: bold; padding: 0.5em;">Preceded By</td> | ||
<td style="padding: 0.5em;">{{{preceded_by}}}</td> | <td style="padding: 0.5em;">{{{preceded_by}}}</td> | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if: {{{proceeded_by|}}}| | |||
{{#if: {{{proceeded_by|}}} | | |||
<tr> | <tr> | ||
<td style="font-weight: bold; padding: 0.5em;">Proceeded | <td style="font-weight: bold; padding: 0.5em;">Proceeded By</td> | ||
<td style="padding: 0.5em;">{{{proceeded_by}}}</td> | <td style="padding: 0.5em;">{{{proceeded_by}}}</td> | ||
</tr> | </tr> | ||
| Line 117: | Line 82: | ||
</div> | </div> | ||
</includeonly> | </includeonly> | ||
<noinclude> | <noinclude> | ||
== Usage == | == Usage == | ||
Revision as of 21:47, 20 November 2024
Usage
This is a generic infobox for books. Only fields that are provided will appear in the infobox.
Parameters
- `title` (required): The book's title.
- `image`: Filename of the book cover image (e.g., `File:Example.jpg`).
- `caption`: Caption for the image.
- `author`: Author of the book.
- `audio_read_by`: The narrator of the audiobook (if applicable).
- `series`: Series the book belongs to.
- `publication_date`: Date the book was published.
- `publisher`: The book's publisher.
- `media_type`: The format (e.g., Hardcover, Paperback, eBook, Audiobook).
- `pages`: Number of pages in the book.
- `genre`: The book's genre.
- `isbn`: The ISBN of the book.
- `preceded_by`: Previous book in the series (if applicable).
- `proceeded_by`: Next book in the series (if applicable).
Example Usage
```wiki Template:InfoboxBook