Template:Book: Difference between revisions
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
| Line 1: | Line 1: | ||
<includeonly> | <includeonly> | ||
<div style="width: | <div style="float: right; clear: right; width: 300px; margin: 0 0 1em 1em; background-color: #f9f9f9; border: 1px solid #aaa; padding: 0.5em;"> | ||
<table style="width: 100%; background: # | <table style="width: 100%; background: #ffffff; border-spacing: 0; margin: 0;"> | ||
<!-- Title Section --> | <!-- Title Section --> | ||
<tr> | <tr> | ||
<td colspan="2" style="text-align: center; background-color: #f2f2f2; font-size: 120%; padding: | <td colspan="2" style="text-align: center; background-color: #f2f2f2; font-size: 120%; padding: 0.5em; font-weight: bold;"> | ||
{{{title| | {{{title|Title Unknown}}} | ||
</td> | </td> | ||
</tr> | </tr> | ||
<!-- Image Section (if provided) --> | |||
{{#if: {{{image|}}} | | |||
<tr> | |||
<td colspan="2" style="text-align: center;"> | |||
[[File:{{{image}}}|200px|alt={{{caption|}}}|{{{caption|}}}]] | |||
</td> | |||
</tr> | |||
}} | |||
<!-- Caption Section (if provided) --> | |||
{{#if: {{{caption|}}} | | |||
<tr> | |||
<td colspan="2" style="text-align: center; font-size: 90%; font-style: italic; padding: 0.5em;"> | |||
{{{caption}}} | |||
</td> | |||
</tr> | |||
}} | |||
<!-- Author Section --> | <!-- Author Section --> | ||
{{#if: {{{author|}}}| | {{#if: {{{author|}}} | | ||
<tr> | |||
<td style="font-weight: bold; padding: 0.5em; text-align: left;">Author</td> | |||
<td style="padding: 0.5em; text-align: left;">{{{author}}}</td> | |||
</tr> | |||
}} | |||
<!-- Audio Read By Section --> | |||
{{#if: {{{audio_read_by|}}} | | |||
<tr> | |||
<td style="font-weight: bold; padding: 0.5em; text-align: left;">Audio read by</td> | |||
<td style="padding: 0.5em; text-align: left;">{{{audio_read_by}}}</td> | |||
</tr> | |||
}} | |||
<!-- Series Section --> | |||
{{#if: {{{series|}}} | | |||
<tr> | |||
<td style="font-weight: bold; padding: 0.5em; text-align: left;">Series</td> | |||
<td style="padding: 0.5em; text-align: left;">{{{series}}}</td> | |||
</tr> | |||
}} | |||
<!-- Publication Date Section --> | |||
{{#if: {{{publication_date|}}} | | |||
<tr> | |||
<td style="font-weight: bold; padding: 0.5em; text-align: left;">Publication date</td> | |||
<td style="padding: 0.5em; text-align: left;">{{{publication_date}}}</td> | |||
</tr> | |||
}} | |||
<!-- Publication Place Section --> | |||
{{#if: {{{publication_place|}}} | | |||
<tr> | |||
<td style="font-weight: bold; padding: 0.5em; text-align: left;">Publication place</td> | |||
<td style="padding: 0.5em; text-align: left;">{{{publication_place}}}</td> | |||
</tr> | |||
}} | |||
<!-- Publisher Section --> | |||
{{#if: {{{publisher|}}} | | |||
<tr> | |||
<td style="font-weight: bold; padding: 0.5em; text-align: left;">Publisher</td> | |||
<td style="padding: 0.5em; text-align: left;">{{{publisher}}}</td> | |||
</tr> | |||
}} | |||
<!-- Media Type Section --> | |||
{{#if: {{{media_type|}}} | | |||
<tr> | |||
<td style="font-weight: bold; padding: 0.5em; text-align: left;">Media type</td> | |||
<td style="padding: 0.5em; text-align: left;">{{{media_type}}}</td> | |||
</tr> | |||
}} | |||
<!-- Pages Section --> | |||
{{#if: {{{pages|}}} | | |||
<tr> | |||
<td style="font-weight: bold; padding: 0.5em; text-align: left;">Pages</td> | |||
<td style="padding: 0.5em; text-align: left;">{{{pages}}}</td> | |||
</tr> | |||
}} | |||
<!-- Genre Section --> | |||
{{#if: {{{genre|}}} | | |||
<tr> | |||
<td style="font-weight: bold; padding: 0.5em; text-align: left;">Genre</td> | |||
<td style="padding: 0.5em; text-align: left;">{{{genre}}}</td> | |||
</tr> | |||
}} | |||
<!-- ISBN Section --> | |||
{{#if: {{{isbn|}}} | | |||
<tr> | <tr> | ||
<td style="font-weight: bold; padding: 0.5em; text-align: left | <td style="font-weight: bold; padding: 0.5em; text-align: left;">ISBN</td> | ||
<td style="padding: 0.5em; text-align: left | <td style="padding: 0.5em; text-align: left;">{{{isbn}}}</td> | ||
</tr> | </tr> | ||
}} | }} | ||
<!-- | |||
{{#if: {{{ | <!-- Preceded By Section --> | ||
{{#if: {{{preceded_by|}}} | | |||
<tr> | <tr> | ||
<td style="font-weight: bold; padding: 0.5em; text-align: left | <td style="font-weight: bold; padding: 0.5em; text-align: left;">Preceded by</td> | ||
<td style="padding: 0.5em; text-align: left | <td style="padding: 0.5em; text-align: left;">{{{preceded_by}}}</td> | ||
</tr> | </tr> | ||
}} | }} | ||
{{#if: {{{ | |||
<!-- Proceeded By Section --> | |||
{{#if: {{{proceeded_by|}}} | | |||
<tr> | <tr> | ||
<td style="font-weight: bold; padding: 0.5em; text-align: left | <td style="font-weight: bold; padding: 0.5em; text-align: left;">Proceeded by</td> | ||
<td style="padding: 0.5em; text-align: left | <td style="padding: 0.5em; text-align: left;">{{{proceeded_by}}}</td> | ||
</tr> | </tr> | ||
}} | }} | ||
</table> | </table> | ||
</div> | </div> | ||
</includeonly> | </includeonly> | ||
<noinclude> | |||
== 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. | |||
* `publication_place`: Place where 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 | |||
{{InfoboxBook | |||
| title = Mistborn: The Final Empire | |||
| image = Beth Brower.jpg | |||
| caption = Cover of ''Mistborn: The Final Empire'' | |||
| author = Brandon Sanderson | |||
| audio_read_by = Michael Kramer | |||
| series = Mistborn | |||
| publication_date = July 17, 2006 | |||
| publication_place = New York, NY | |||
| publisher = Tor Books | |||
| media_type = Hardcover | |||
| pages = 541 | |||
| genre = Fantasy | |||
| isbn = 978-0-7653-1178-4 | |||
| preceded_by = (None) | |||
| proceeded_by = ''The Well of Ascension'' | |||
}} | |||
Revision as of 21:04, 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.
- `publication_place`: Place where 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