Template:Book: Difference between revisions

From The Reed and Rite
No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 1: Line 1:
<includeonly>
<includeonly>
<div style="float: right; clear: right; width: 300px; margin: 0 0 1em 1em; background-color: #f9f9f9; 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;"
    <!-- Title Section -->
|-
    <tr>
! colspan="2" style="text-align: center; background-color: #f2f2f2; font-size: 120%; padding: 0.5em; font-weight: bold;" | {{{title|Title Unknown}}}
      <td colspan="2" style="text-align: center; background-color: #f2f2f2; font-size: 120%; padding: 0.5em; font-weight: bold;">
|-
        {{{title|Title Unknown}}}
{{#if: {{{image|}}} |
      </td>
| colspan="2" style="text-align: center;" | [[File:{{{image}}}|200px|{{{caption|}}}]]
    </tr>
|- }}
 
{{#if: {{{caption|}}} |
    <!-- Image Section (if provided) -->
| colspan="2" style="text-align: center; font-size: 90%; font-style: italic; padding: 0.5em;" | {{{caption}}}
    {{#if: {{{image|}}} |
|- }}
    <tr>
{{#if: {{{author|}}} |
      <td colspan="2" style="text-align: center;">
| '''Author''' || {{{author}}}
        <img src="[[File:{{{image}}}|200px|alt={{{caption|}}}]]" alt="{{{caption|}}}">
|- }}
      </td>
{{#if: {{{audio_read_by|}}} |
    </tr>
| '''Audio read by''' || {{{audio_read_by}}}
    }}
|- }}
 
{{#if: {{{series|}}} |
    <!-- Caption Section (if provided) -->
| '''Series''' || {{{series}}}
    {{#if: {{{caption|}}} |
|- }}
    <tr>
{{#if: {{{publication_date|}}} |
      <td colspan="2" style="text-align: center; font-size: 90%; font-style: italic; padding: 0.5em;">
| '''Publication date''' || {{{publication_date}}}
        {{{caption}}}
|- }}
      </td>
{{#if: {{{publication_place|}}} |
    </tr>
| '''Publication place''' || {{{publication_place}}}
    }}
|- }}
 
{{#if: {{{publisher|}}} |
    <!-- Author Section -->
| '''Publisher''' || {{{publisher}}}
    {{#if: {{{author|}}} |
|- }}
    <tr>
{{#if: {{{media_type|}}} |
      <td style="font-weight: bold; padding: 0.5em;">Author</td>
| '''Media type''' || {{{media_type}}}
      <td style="padding: 0.5em;">{{{author}}}</td>
|- }}
    </tr>
{{#if: {{{pages|}}} |
    }}
| '''Pages''' || {{{pages}}}
 
|- }}
    <!-- Audio Read By Section -->
{{#if: {{{genre|}}} |
    {{#if: {{{audio_read_by|}}} |
| '''Genre''' || {{{genre}}}
    <tr>
|- }}
      <td style="font-weight: bold; padding: 0.5em;">Audio read by</td>
{{#if: {{{isbn|}}} |
      <td style="padding: 0.5em;">{{{audio_read_by}}}</td>
| '''ISBN''' || {{{isbn}}}
    </tr>
|- }}
    }}
{{#if: {{{preceded_by|}}} |
 
| '''Preceded by''' || {{{preceded_by}}}
    <!-- Series Section -->
|- }}
    {{#if: {{{series|}}} |
{{#if: {{{proceeded_by|}}} |
    <tr>
| '''Proceeded by''' || {{{proceeded_by}}}
      <td style="font-weight: bold; padding: 0.5em;">Series</td>
|- }}
      <td style="padding: 0.5em;">{{{series}}}</td>
|}
    </tr>
    }}
 
    <!-- Publication Date Section -->
    {{#if: {{{publication_date|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.5em;">Publication date</td>
      <td style="padding: 0.5em;">{{{publication_date}}}</td>
    </tr>
    }}
 
    <!-- Publication Place Section -->
    {{#if: {{{publication_place|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.5em;">Publication place</td>
      <td style="padding: 0.5em;">{{{publication_place}}}</td>
    </tr>
    }}
 
    <!-- Publisher Section -->
    {{#if: {{{publisher|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.5em;">Publisher</td>
      <td style="padding: 0.5em;">{{{publisher}}}</td>
    </tr>
    }}
 
    <!-- Media Type Section -->
    {{#if: {{{media_type|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.5em;">Media type</td>
      <td style="padding: 0.5em;">{{{media_type}}}</td>
    </tr>
    }}
 
    <!-- Pages Section -->
    {{#if: {{{pages|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.5em;">Pages</td>
      <td style="padding: 0.5em;">{{{pages}}}</td>
    </tr>
    }}
 
    <!-- Genre Section -->
    {{#if: {{{genre|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.5em;">Genre</td>
      <td style="padding: 0.5em;">{{{genre}}}</td>
    </tr>
    }}
 
    <!-- ISBN Section -->
    {{#if: {{{isbn|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.5em;">ISBN</td>
      <td style="padding: 0.5em;">{{{isbn}}}</td>
    </tr>
    }}
 
    <!-- Preceded By Section -->
    {{#if: {{{preceded_by|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.5em;">Preceded by</td>
      <td style="padding: 0.5em;">{{{preceded_by}}}</td>
    </tr>
    }}
 
    <!-- Proceeded By Section -->
    {{#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>

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