Template:Book: Difference between revisions

No edit summary
Tag: Reverted
m Renamed parameters.
 
(82 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>
<includeonly>{{Infobox<!--
<div style="width: 300px; background: #ffffff; border: 1px solid #aaa; padding: 0.5em; float: right; margin: 0 0 1em 1em; vertical-align: top; display: inline-block; margin-top: 0;">
-->| name = ''{{{name|}}}''<!--
  <table style="width: 100%; border-spacing: 0; margin: 0; background-color: #ffffff;">
-->| image = {{{image|}}}<!--
    <!-- Title -->
-->| caption = {{{caption|}}}<!--
    <tr>
-->| data_rows =<!--
      <td colspan="2" style="text-align: center; background-color: #ffffff; font-size: 120%; font-weight: bold; padding: 0;">{{{title|No title provided}}}</td>
-->{{#if: {{{author|}}} |<tr class="infobox-data-row"><th>Author</th><td>{{{author}}}</td></tr>}}<!--
    </tr>
-->{{#if: {{{cover_artist|}}} |<tr class="infobox-data-row"><th>Cover Artist</th><td>{{{cover_artist}}}</td></tr>}}<!--
    <!-- Image -->
-->{{#if: {{{series|}}} | <tr class="infobox-data-row"><th>Series</th><td>{{#if:{{b|{{{series}}}}} | ''[[{{b|{{{series}}}}}|{{b|{{{series}}}|text=y}}]]'' | {{{series}}}}}</td></tr>}}<!--
    {{#if: {{{image|}}} |
-->{{#if: {{{period_covered|}}} |<tr class="infobox-data-row"><th>Period Covered</th><td>{{{period_covered}}}</td></tr>}}<!--
    <tr>
-->{{#if: {{{publication_date|}}} |<tr class="infobox-data-row"><th>Publication Date</th><td>{{{publication_date}}}</td></tr>}}<!--
      <td colspan="2" style="text-align: center; padding: 0; background-color: #ffffff;">
-->{{#if: {{{publication_place|}}} |<tr class="infobox-data-row"><th>Publication Place</th><td>{{{publication_place}}}</td></tr>}}<!--
        <div style="display: block; margin: auto; padding: 0.5em 0; background-color: #ffffff;">
-->{{#if: {{{publisher|}}} |<tr class="infobox-data-row"><th>Publisher</th><td>{{{publisher}}}</td></tr>}}<!--
          [[File:{{{image}}}|200px|center|alt={{{caption|}}}|{{{caption|}}}]]
-->{{#if: {{{media_type|}}} |<tr class="infobox-data-row"><th>Media Type</th><td>{{{media_type}}}</td></tr>}}<!--
        </div>
-->{{#if: {{{pages|}}} |<tr class="infobox-data-row"><th>Pages</th><td>{{{pages}}}</td></tr>}}<!--
      </td>
-->{{#if: {{{word_count|}}} |<tr class="infobox-data-row"><th>Word Count</th><td>{{{word_count}}}</td></tr>}}<!--
    </tr>
-->{{#if: {{{audiobook_length|}}} |<tr class="infobox-data-row"><th>Audiobook Length</th><td>{{{audiobook_length}}}</td></tr>}}<!--
    }}
-->{{#if: {{{narrated_by|}}} |<tr class="infobox-data-row"><th>Narrated By</th><td>{{{narrated_by}}}</td></tr>}}<!--
    <!-- Image Caption -->
-->{{#if: {{{genre|}}} |<tr class="infobox-data-row"><th>Genre</th><td>{{{genre}}}</td></tr>}}<!--
    {{#if: {{{caption|}}} |
-->{{#if: {{{isbn|}}} |<tr class="infobox-data-row"><th>ISBN</th><td>{{{isbn}}}</td></tr>}}<!--
    <tr>
-->{{#if: {{{preceded_by|}}} | <tr class="infobox-data-row"><th>Preceded By</th><td>{{#if:{{b|{{{preceded_by}}}}} | ''[[{{b|{{{preceded_by}}}}}|{{b|{{{preceded_by}}}|text=y}}]]'' | {{{preceded_by}}}}}</td></tr>}}<!--
      <td colspan="2" style="text-align: center; font-size: 90%; font-style: italic; color: #000000; background-color: #ffffff; padding: 0.1em 0;">{{{caption}}}</td>
-->{{#if: {{{followed_by|}}} | <tr class="infobox-data-row"><th>Followed By</th><td>{{#if:{{b|{{{followed_by}}}}} | ''[[{{b|{{{followed_by}}}}}|{{b|{{{followed_by}}}|text=y}}]]'' | {{{followed_by}}}}}</td></tr>}}<!--
    </tr>
-->}}<!--
    }}
-->{{#ifeq:{{NAMESPACE}}|{{ns:0}}|[[Category:Books]]}}</includeonly><noinclude>
    <!-- Data Rows -->
== Description ==
    {{#if: {{{author|}}} |
This template should be used on book pages to add an infobox in the upper right hand corner of the article.
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 40%;">Author</td>
      <td style="padding: 0.1em;">{{{author}}}</td>
    </tr>
    }}
    {{#if: {{{audio_read_by|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 40%;">Audio Read by</td>
      <td style="padding: 0.1em;">{{{audio_read_by}}}</td>
    </tr>
    }}
    {{#if: {{{series|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 40%;">Series</td>
      <td style="padding: 0.1em;">{{{series}}}</td>
    </tr>
    }}
    {{#if: {{{period covered|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 40%;">Period Covered</td>
      <td style="padding: 0.1em;">{{{period covered}}}</td>
    </tr>
    }}
    {{#if: {{{publication_date|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 40%;">Publication Date</td>
      <td style="padding: 0.1em;">{{{publication_date}}}</td>
    </tr>
    }}
    {{#if: {{{publication_place|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 40%;">Publication Place</td>
      <td style="padding: 0.1em;">{{{publication_place}}}</td>
    </tr>
    }}
    {{#if: {{{publisher|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 40%;">Publisher</td>
      <td style="padding: 0.1em;">{{{publisher}}}</td>
    </tr>
    }}
    {{#if: {{{media_type|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 40%;">Media Type</td>
      <td style="padding: 0.1em;">{{{media_type}}}</td>
    </tr>
    }}
    {{#if: {{{pages|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 40%;">Pages</td>
      <td style="padding: 0.1em;">{{{pages}}}</td>
    </tr>
    }}
    {{#if: {{{genre|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 40%;">Genre</td>
      <td style="padding: 0.1em;">{{{genre}}}</td>
    </tr>
    }}
    {{#if: {{{isbn|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 40%;">ISBN</td>
      <td style="padding: 0.1em;">{{{isbn}}}</td>
    </tr>
    }}
    {{#if: {{{preceded_by|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 40%;">Preceded by</td>
      <td style="padding: 0.1em;">{{{preceded_by}}}</td>
    </tr>
    }}
    {{#if: {{{followed_by|}}} |
    <tr>
      <td style="font-weight: bold; padding: 0.1em; vertical-align: top; width: 40%;">Followed by</td>
      <td style="padding: 0.1em;">{{{followed_by}}}</td>
    </tr>
    }}
  </table>
</div>
</includeonly>


<noinclude>
== Usage ==
{{InfoboxBook
This template has several [[:Template:Character#Parameters|parameters]] that can be used.
| title = Title Here
: '''Note: Only parameters that are provided will appear in the infobox. Not all parameters are required for each book.'''
| image = Emma - Volume 1.jpg
 
| caption = Caption Here
{| style="width: 100%; text-align: left; margin: auto;" class="wikitable"
| author = Author's Name
|-
| audio_read_by = Reader's Name
! width=50%|You Type
| series = Series Name
!You Get
| period covered = Time Period
|-
| publication_date = Date Here
| style="text-align: left; vertical-align: top;" |<pre>
| publication_place = Location here
{{book
| publisher = Publisher here
|name=Example Book Infobox
| media_type = Format Here
|image=Emma - Volume 1.jpg
| pages = Page Numbers
|caption=Caption Here
| genre = Genre Here
|author=Author's Name
| isbn = ISBN Here
|cover_artist=Artist's Name
| preceded_by = Title Here
|series=Series Name
| followed_by = Title Here
|period covered=Time Period
|publication_date=Date Here
|publication_place=Location Here
|publisher=Publisher Here
|media_type=Format Here
|pages=Number of Pages
|word_count=Word Count
|audiobook_length=Length of Audiobook
|narrated_by=Reader's Name(s)
|genre=Genre Here
|isbn=ISBN Here
|preceded_by=Title Here
|followed_by=Title Here
}}
</pre>
|<br>{{book
|name=Example Book Infobox
|image=Emma - Volume 1.jpg
|caption=Caption Here
|author=Author's Name
|cover_artist=Artist's Name
|series=Series Title
|period covered=Time Period
|publication_date=Date Here
|publication_place=Location Here
|publisher=Publisher Here
|media_type=Format Here
|pages=Number of Pages
|word_count=Word Count
|audiobook_length=Length of Audiobook
|narrated_by=Reader's Name(s)
|genre=Genre Here
|isbn=ISBN Here
|preceded_by=Title Here
|followed_by=Title Here
}}
}}
== Usage ==
|}
This is a generic infobox for books. Only fields that are provided will appear in the infobox.


=== Parameters ===
=== Parameters ===
* `title` (required): The book's title.
{| class="wikitable" style="width: 90%;"
* `image`: Filename of the book cover image (e.g., `File:Example.jpg`).
! Parameter !! Description
* `caption`: Caption for the image.
|-
* `author`: Author of the book.
| style="text-align: center;" | <code>name</code> || The book's title.
* `audio_read_by`: The narrator of the audiobook (if applicable).
|-
* `series`: Series the book belongs to.
| style="text-align: center;" | <code>image</code> || Filename of the book's cover image (e.g., 'Example.jpg`).
* 'period covered': Period of time covered in book.
|-
* `publication_date`: Date the book was published.
| style="text-align: center;" | <code>caption</code> || Caption for the image.
* `publication_place`: Place where the book was published.
|-
* `publisher`: The book's publisher.
| style="text-align: center;" | <code>author</code> || The author's name.
* `media_type`: The format (e.g., Hardcover, Paperback, eBook, Audiobook).
|-
* `pages`: Number of pages in the book.
| style="text-align: center;" | <code>cover_artist</code> || The name of the artist who created/designed the cover.
* `genre`: The book's genre.
|-
* `isbn`: The ISBN of the book.
| style="text-align: center;" | <code>audio_by</code> || The name(s) of who read the audiobook.
* `preceded_by`: Previous book in the series (if applicable).
|-
* `followed_by`: Next book in the series (if applicable).
| style="text-align: center;" | <code>series</code> || The series the book is from, if applicable. Use abbreviation(s) from [[:Template:B]].
|-
| style="text-align: center;" | <code>publication_date</code> || The date of publication of first edition.
|-
| style="text-align: center;" | <code>publication_place</code> || The country where the book was first published.
|-
| style="text-align: center;" | <code>publisher</code> || The name of the publisher. (e.g., Rhysdon Press)
|-
| style="text-align: center;" | <code>media_type</code> || The forms in which the book has been published. (e.g., Paperback, Hardcover, ebook, audiobook, etc.)
|-
| style="text-align: center;" | <code>pages</code> || The number of pages in the first edition.
|-
| style="text-align: center;" | <code>word_count</code> || The number of words in the first edition.
|-
| style="text-align: center;" | <code>audio_length</code> || The length of the audiobook of the first edition.
|-
| style="text-align: center;" | <code>genre</code> || The genre of the book.
|-
| style="text-align: center;" | <code>isbn</code> || The ISBN number of the first edition.
|-
| style="text-align: center;" | <code>preceded_by</code> || What book came before the book, if applicable. Use abbreviation(s) from [[:Template:B]].
|-
| style="text-align: center;" | <code>followed_by</code> || What book came after the book, if applicable. Use abbreviation(s) from [[:Template:B]].
|}
 
== Articles using Template ==
{{for|Special:WhatLinksHere/{{FULLPAGENAME}}|a full listing|here|pre=This list is limited to 100 pages}}
{{Special:WhatLinksHere/{{FULLPAGENAME}}|namespace=0|limit=100}}
 
[[Category:Infoboxes]]