Difference between revisions of "Template:InfoBox"

From Book Trigger Warnings
(First full version of InfoBox)
(7 intermediate revisions by 2 users not shown)
Line 10: Line 10:
 
<table>
 
<table>
 
<tr>
 
<tr>
     <th>Author</th>
+
     <th>Author(s)</th>
 
     <td>{{{author|Unknown}}}</td>
 
     <td>{{{author|Unknown}}}</td>
 
</tr>
 
</tr>
 +
{{#if: {{{illustrator|}}}|
 +
<tr>
 +
    <th>Illustrator(s)</th>
 +
    <td>{{{illustrator}}}</td>
 +
</tr>
 +
}}
 
{{#if: {{{published|}}}|
 
{{#if: {{{published|}}}|
 
<tr>
 
<tr>
 
     <th>Published</th>
 
     <th>Published</th>
 
     <td>{{{published}}}</td>
 
     <td>{{{published}}}</td>
 +
</tr>
 +
}}
 +
{{#if: {{{publisher|}}}|
 +
<tr>
 +
    <th>Publisher</th>
 +
    <td>{{{publisher}}}</td>
 
</tr>
 
</tr>
 
}}
 
}}
Line 42: Line 54:
 
| title = The title of the book. Default: the name of the article
 
| title = The title of the book. Default: the name of the article
 
| author = The author of the book. Default: Unknown
 
| author = The author of the book. Default: Unknown
 +
| illustrator = The illustrator(s)/colorist(s) of the book.
 
| image = The name of the cover image of the book. Default: default.png
 
| image = The name of the cover image of the book. Default: default.png
| published = The year of publication.
+
| published = The oldest publication date.
| genres = The genre(s) of this novel. Such as Horror, Science Fiction, Contemporary Fiction, Poetry, etc. If multiple genres are given, they should be separated with a <br> tag.
+
| publisher = The publisher.
 +
| genres = The main genre(s) of this novel such as Horror, Science Fiction, Contemporary Fiction, Poetry, etc. If multiple genres are needed, they should be separated with a <br> tag.
 
| agegroup = The age group of this novel. This should be Adult, New Adult, Young Adult, Middle Grade, Children's Fiction.
 
| agegroup = The age group of this novel. This should be Adult, New Adult, Young Adult, Middle Grade, Children's Fiction.
 
}}
 
}}
 
</pre>
 
</pre>
When no default is mentioned, what happens is that the template does not display an entry for that data.
+
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==
 
==Examples==
Line 54: Line 68:
 
Here are two sample uses of the template. If you would like to see more, most of our articles use this template.
 
Here are two sample uses of the template. If you would like to see more, most of our articles use this template.
  
{{InfoBoxTest
+
{{InfoBox
 
| title = A Song of Foo and Bar
 
| title = A Song of Foo and Bar
 
| author = F. L. Theorem
 
| author = F. L. Theorem
 
| image = default.png
 
| image = default.png
| published = 1999
+
| published = February 28, 1999
 
| genres = Horror<br>Science Fiction
 
| genres = Horror<br>Science Fiction
 
| agegroup = Young Adult
 
| agegroup = Young Adult
 
}}
 
}}
 
<pre style="overflow:auto;">
 
<pre style="overflow:auto;">
{{InfoBoxTest
+
{{InfoBox
 
| title = A Song of Foo and Bar
 
| title = A Song of Foo and Bar
 
| author = F. L. Theorem
 
| author = F. L. Theorem
 
| image = default.png
 
| image = default.png
| published = 1999
+
| published = February 28, 1999
 
| genres = Horror<br>Science Fiction
 
| genres = Horror<br>Science Fiction
 
| agegroup = Young Adult
 
| agegroup = Young Adult
Line 74: Line 88:
 
<div style="clear:both;"></div>
 
<div style="clear:both;"></div>
  
{{InfoBoxTest
+
{{InfoBox
 
| title = The Red Crimson
 
| title = The Red Crimson
 
| author = Jen Black
 
| author = Jen Black
 
| genres = Thriller
 
| genres = Thriller
 +
| publisher = Grey Books
 
}}
 
}}
 
<pre style="overflow:auto;">
 
<pre style="overflow:auto;">
{{InfoBoxTest
+
{{InfoBox
 
| title = The Red Crimson
 
| title = The Red Crimson
 
| author = Jen Black
 
| author = Jen Black
 
| genres = Thriller
 
| genres = Thriller
 +
| publisher = Grey Books
 
}}
 
}}
 
</pre>
 
</pre>
 
<div style="clear:both;"></div>
 
<div style="clear:both;"></div>
 
</noinclude>
 
</noinclude>

Revision as of 18:36, 27 January 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. 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.
| publisher = The publisher.
| genres = The main genre(s) of this novel such as Horror, Science Fiction, Contemporary Fiction, Poetry, etc. If multiple genres are needed, they should be separated with a <br> tag.
| agegroup = The 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
Default.png
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
}}


The Red Crimson
Default.png
Author(s) Jen Black
Publisher Grey Books
Genre(s) Thriller


{{InfoBox
| title = The Red Crimson
| author = Jen Black
| genres = Thriller
| publisher = Grey Books
}}