Template:Book: Difference between revisions

From The Reed and Rite
No edit summary
No edit summary
Line 1: Line 1:
<includeonly>
<includeonly>
<div style="max-width: 300px; background: #ffffff; border: 1px solid #aaa; padding: 0.5em;">
<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: #ffffff; border-spacing: 0; margin: 0;">
{| style="width: 100%; background: #ffffff; border-spacing: 0; margin: 0;"
    <tr>
|-
      <td colspan="2" style="text-align: center; background-color: #f2f2f2; font-size: 120%; padding: 0.5em; font-weight: bold;">{{{title|No title provided}}}</td>
! colspan="2" style="text-align: center; background-color: #f2f2f2; font-size: 120%; padding: 0.5em; font-weight: bold;" | {{{title|Title Unknown}}}
    </tr>
|-
    {{#if: {{{image|}}}|
{{#if: {{{image|}}} |
    <tr>
| colspan="2" style="text-align: center;" | [[File:{{{image}}}|200px|alt={{{caption|}}}|{{{caption|}}}]]
      <td colspan="2" style="text-align: center; padding: 0.5em;">
|- }}
        <img src="{{{image}}}" alt="{{{caption|Book cover}}}" style="max-width: 100%; height: auto;" />
{{#if: {{{caption|}}} |
        <div style="font-style: italic; font-size: 90%;">{{{caption|No caption provided}}}</div>
| colspan="2" style="text-align: center; font-size: 90%; font-style: italic; padding: 0.5em;" | {{{caption}}}
      </td>
|- }}
    </tr>
{{#if: {{{author|}}} |
    }}
| '''Author''' || {{{author}}}
    {{#if: {{{author|}}}|
|- }}
    <tr>
{{#if: {{{audio_read_by|}}} |
      <td style="font-weight: bold; padding: 0.5em;">Author</td>
| '''Audio read by''' || {{{audio_read_by}}}
      <td style="padding: 0.5em;">{{{author}}}</td>
|- }}
    </tr>
{{#if: {{{series|}}} |
    }}
| '''Series''' || {{{series}}}
    {{#if: {{{audio_read_by|}}}|
|- }}
    <tr>
{{#if: {{{publication_date|}}} |
      <td style="font-weight: bold; padding: 0.5em;">Narrator (Audiobook)</td>
| '''Publication date''' || {{{publication_date}}}
      <td style="padding: 0.5em;">{{{audio_read_by}}}</td>
|- }}
    </tr>
{{#if: {{{publication_place|}}} |
    }}
| '''Publication place''' || {{{publication_place}}}
    {{#if: {{{series|}}}|
|- }}
    <tr>
{{#if: {{{publisher|}}} |
      <td style="font-weight: bold; padding: 0.5em;">Series</td>
| '''Publisher''' || {{{publisher}}}
      <td style="padding: 0.5em;">{{{series}}}</td>
|- }}
    </tr>
{{#if: {{{media_type|}}} |
    }}
| '''Media type''' || {{{media_type}}}
    {{#if: {{{publication_date|}}}|
|- }}
    <tr>
{{#if: {{{pages|}}} |
      <td style="font-weight: bold; padding: 0.5em;">Publication Date</td>
| '''Pages''' || {{{pages}}}
      <td style="padding: 0.5em;">{{{publication_date}}}</td>
|- }}
    </tr>
{{#if: {{{genre|}}} |
    }}
| '''Genre''' || {{{genre}}}
    {{#if: {{{publisher|}}}|
|- }}
    <tr>
{{#if: {{{isbn|}}} |
      <td style="font-weight: bold; padding: 0.5em;">Publisher</td>
| '''ISBN''' || {{{isbn}}}
      <td style="padding: 0.5em;">{{{publisher}}}</td>
|- }}
    </tr>
{{#if: {{{preceded_by|}}} |
    }}
| '''Preceded by''' || {{{preceded_by}}}
    {{#if: {{{media_type|}}}|
|- }}
    <tr>
{{#if: {{{proceeded_by|}}} |
      <td style="font-weight: bold; padding: 0.5em;">Media Type</td>
| '''Proceeded by''' || {{{proceeded_by}}}
      <td style="padding: 0.5em;">{{{media_type}}}</td>
|- }}
    </tr>
|}
    }}
    {{#if: {{{pages|}}}|
    <tr>
      <td style="font-weight: bold; padding: 0.5em;">Pages</td>
      <td style="padding: 0.5em;">{{{pages}}}</td>
    </tr>
    }}
    {{#if: {{{genre|}}}|
    <tr>
      <td style="font-weight: bold; padding: 0.5em;">Genre</td>
      <td style="padding: 0.5em;">{{{genre}}}</td>
    </tr>
    }}
    {{#if: {{{isbn|}}}|
    <tr>
      <td style="font-weight: bold; padding: 0.5em;">ISBN</td>
      <td style="padding: 0.5em;">{{{isbn}}}</td>
    </tr>
    }}
    {{#if: {{{preceded_by|}}}|
    <tr>
      <td style="font-weight: bold; padding: 0.5em;">Preceded By</td>
      <td style="padding: 0.5em;">{{{preceded_by}}}</td>
    </tr>
    }}
    {{#if: {{{proceeded_by|}}}|
    <tr>
      <td style="font-weight: bold; padding: 0.5em;">Proceeded By</td>
      <td style="padding: 0.5em;">{{{proceeded_by}}}</td>
    </tr>
    }}
  </table>
</div>
</div>
</includeonly>
</includeonly>
Line 94: Line 62:
* `series`: Series the book belongs to.
* `series`: Series the book belongs to.
* `publication_date`: Date the book was published.
* `publication_date`: Date the book was published.
* `publication_place`: Place where the book was published.
* `publisher`: The book's publisher.
* `publisher`: The book's publisher.
* `media_type`: The format (e.g., Hardcover, Paperback, eBook, Audiobook).
* `media_type`: The format (e.g., Hardcover, Paperback, eBook, Audiobook).
Line 112: Line 81:
| series = Mistborn
| series = Mistborn
| publication_date = July 17, 2006
| publication_date = July 17, 2006
| publication_place = New York, NY
| publisher = Tor Books
| publisher = Tor Books
| media_type = Hardcover
| media_type = Hardcover

Revision as of 21:54, 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