Difference between revisions of "Template:InfoBox"
From Book Trigger Warnings
(Created page with "<div class="infobox"> <div class="infobox-title">{{{title|{{PAGENAME}}}}}</div>{{#if:{{{image|}}}| <div class="infobox-image">[[File:{{{image}}}|300px]]</div>}} <table>{{#if:{...") |
|||
(13 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
+ | <includeonly> | ||
<div class="infobox"> | <div class="infobox"> | ||
− | <div class="infobox-title">{{{title|{{PAGENAME}}}}}</div>{{#if:{{{image|}}}| | + | <div class="infobox-title">''{{{title|{{PAGENAME}}}}}''</div> |
− | <div class="infobox-image">[[File:{{{image}}}| | + | |
− | <table>{{#if:{{{ | + | {{#if: {{{image|}}}| |
− | <th> | + | <div class="infobox-image">[[File:{{{image}}}|200px|alt=Cover of {{PAGENAME}}]]</div> |
− | <td>{{{ | + | |<div class="infobox-image">[[File:default.png|200px|alt=No cover image available]]</div> |
− | </tr>}}{{#if:{{{ | + | }} |
− | <th> | + | |
− | <td>{{{ | + | <table> |
− | </tr>}}</table> | + | <tr> |
+ | <th>Author(s)</th> | ||
+ | <td>{{{author|Unknown}}}</td> | ||
+ | </tr> | ||
+ | {{#if: {{{illustrator|}}}| | ||
+ | <tr> | ||
+ | <th>Illustrator(s)</th> | ||
+ | <td>{{{illustrator}}}</td> | ||
+ | </tr> | ||
+ | }} | ||
+ | {{#if: {{{published|}}}| | ||
+ | <tr> | ||
+ | <th>Published</th> | ||
+ | <td>{{{published}}}</td> | ||
+ | </tr> | ||
+ | }} | ||
+ | {{#if: {{{publisher|}}}| | ||
+ | <tr> | ||
+ | <th>Publisher</th> | ||
+ | <td>{{{publisher}}}</td> | ||
+ | </tr> | ||
+ | }} | ||
+ | {{#if: {{{genres|}}}| | ||
+ | <tr> | ||
+ | <th>Genre(s)</th> | ||
+ | <td>{{{genres}}}</td> | ||
+ | </tr> | ||
+ | }} | ||
+ | {{#if: {{{agegroup|}}}| | ||
+ | <tr> | ||
+ | <th>Age group</th> | ||
+ | <td>{{{agegroup}}}</td> | ||
+ | </tr> | ||
+ | }} | ||
+ | </table> | ||
</div> | </div> | ||
+ | </includeonly> | ||
+ | <noinclude> | ||
+ | This is the main template used for displaying the general book information on the top right of an article. | ||
+ | |||
+ | Here is a description of the parameters available and the default values they take on if nothing is specified (if applicable): | ||
+ | <pre> | ||
+ | {{InfoBox | ||
+ | | title = The title of the book. Default: the name of the article | ||
+ | | author = The author of the book. If the book is an anthology consisting of multiple authors, the editor(s) should be here instead. Default: Unknown | ||
+ | | illustrator = The illustrator(s)/colorist(s) of the book. | ||
+ | | image = The name of the cover image of the book. Default: default.png | ||
+ | | published = The oldest publication date. Any format is fine as long as it is unambiguous. | ||
+ | | publisher = The original publisher. | ||
+ | | genres = The main genre(s) of this novel such as Horror, Science Fiction, Contemporary Fiction, Poetry, etc. Generally this should only be one or two genres. If multiple genres are needed, they should be separated with a <br> tag. | ||
+ | | agegroup = The main age group of this novel. This should be Adult, New Adult, Young Adult, Middle Grade, Children's Fiction. | ||
+ | }} | ||
+ | </pre> | ||
+ | When no default is mentioned, the template does not display an entry for that data. '''Keep the lines for genre(s) and age group as succinct as possible.''' | ||
+ | |||
+ | ==Examples== | ||
+ | |||
+ | Here are two sample uses of the template. If you would like to see more, most of our articles use this template. | ||
+ | |||
+ | {{InfoBox | ||
+ | | title = A Song of Foo and Bar | ||
+ | | author = F. L. Theorem | ||
+ | | image = default.png | ||
+ | | published = February 28, 1999 | ||
+ | | genres = Horror<br>Science Fiction | ||
+ | | agegroup = Young Adult | ||
+ | }} | ||
+ | <pre style="overflow:auto;"> | ||
+ | {{InfoBox | ||
+ | | title = A Song of Foo and Bar | ||
+ | | author = F. L. Theorem | ||
+ | | image = default.png | ||
+ | | published = February 28, 1999 | ||
+ | | genres = Horror<br>Science Fiction | ||
+ | | agegroup = Young Adult | ||
+ | }} | ||
+ | </pre> | ||
+ | <div style="clear:both;"></div> | ||
+ | |||
+ | {{InfoBox | ||
+ | | title = The Red Crimson | ||
+ | | author = Jen Black | ||
+ | | genres = Thriller | ||
+ | | publisher = Grey Books | ||
+ | }} | ||
+ | <pre style="overflow:auto;"> | ||
+ | {{InfoBox | ||
+ | | title = The Red Crimson | ||
+ | | author = Jen Black | ||
+ | | genres = Thriller | ||
+ | | publisher = Grey Books | ||
+ | }} | ||
+ | </pre> | ||
+ | <div style="clear:both;"></div> | ||
+ | </noinclude> |
Latest revision as of 15:11, 4 July 2021
This is the main template used for displaying the general book information on the top right of an article.
Here is a description of the parameters available and the default values they take on if nothing is specified (if applicable):
{{InfoBox | title = The title of the book. Default: the name of the article | author = The author of the book. If the book is an anthology consisting of multiple authors, the editor(s) should be here instead. Default: Unknown | illustrator = The illustrator(s)/colorist(s) of the book. | image = The name of the cover image of the book. Default: default.png | published = The oldest publication date. Any format is fine as long as it is unambiguous. | publisher = The original publisher. | genres = The main genre(s) of this novel such as Horror, Science Fiction, Contemporary Fiction, Poetry, etc. Generally this should only be one or two genres. If multiple genres are needed, they should be separated with a <br> tag. | agegroup = The main age group of this novel. This should be Adult, New Adult, Young Adult, Middle Grade, Children's Fiction. }}
When no default is mentioned, the template does not display an entry for that data. Keep the lines for genre(s) and age group as succinct as possible.
Examples
Here are two sample uses of the template. If you would like to see more, most of our articles use this template.
A Song of Foo and Bar
Author(s) | F. L. Theorem |
---|---|
Published | February 28, 1999 |
Genre(s) | Horror Science Fiction |
Age group | Young Adult |
{{InfoBox | title = A Song of Foo and Bar | author = F. L. Theorem | image = default.png | published = February 28, 1999 | genres = Horror<br>Science Fiction | agegroup = Young Adult }}
{{InfoBox | title = The Red Crimson | author = Jen Black | genres = Thriller | publisher = Grey Books }}