Actions

Template

Difference between revisions of "BookBob"

From Sonic Retro

m
(34 intermediate revisions by 7 users not shown)
Line 1: Line 1:
{|cellpadding="0" cellspacing="0" class="breakout" style="max-width: 300px; padding: 0px; float: right; margin-left: 15px; display: inline; position: relative"
+
<div itemscope itemtype='http://schema.org/Book'>
|style="text-align: center;"|
+
<meta itemprop="name" content="{{PAGENAME}}">
[[Image:{{ #if: {{{cover|}}} | {{{cover}}} | Notavailable.png }}|200px]]
+
{{BobTable|
|-
+
{{BobRow||{{{cover|}}}{{{bookimage|}}}|align=center|default=[[File:Notavailable.svg]]|content=[[File:{{{cover|}}}{{{bookimage|}}}|320x280px]]}}
! '''Fast facts on ''{{ #if: {{{title|}}} | {{{title}}} | {{PAGENAME}} }}'''''
+
{{BobRow||{{{title|}}}|default=''<span itemprop="name">{{PAGENAME}}</span>''|content=''<span itemprop="name">{{{title}}}</span>''|headline=yes|align=center}}
|-
+
{{BobRow|Publisher|{{{publisher|}}}|content=<span itemprop="publisher">{{{publisher}}}</span>}}
|style="padding: 0.3em; line-height: 1.5em; padding-left: 5px;"|
+
{{BobRow|Publication date|{{{date|}}}{{#if:{{{date|}}}|[[Category:Old book field]]}}}}
{{ #if: {{{publisher|}}} | '''Publisher:''' {{{publisher}}}<br> | }}{{
+
{{BobRow|Price|{{{price|}}}{{#if:{{{price|}}}|[[Category:Old book field]]}}}}
#if: {{{date|}}} | '''Publication Date:''' {{{date}}}<br> | }}{{
+
{{BobRow|Country|{{{country|}}}{{#if:{{{country|}}}|[[Category:Old book field]]}}}}
#if: {{{author|}}} | '''Author:''' {{{author}}}<br> | }}{{
+
{{BobRow|Author|{{{author|}}}|content=<span itemprop="author">{{{author}}}</span>}}
#if: {{{illustrator|}}} | '''Illustrator:''' {{{illustrator}}}<br> | }}{{
+
{{BobRow||{{{book_genre|}}}|content='''Genre:''' {{{book_genre}}} {{#if: {{#pos:{{{book_genre}}}|Art book}} | [[Category:Art books]] }}{{#if: {{#pos:{{{book_genre}}}|Guide book}} | [[Category:Guide books]] }}{{#if: {{#pos:{{{book_genre}}}|Comic}} | [[Category:Comics]] }}{{#if: {{#pos:{{{book_genre}}}|Game book}} | [[Category:Game books]] }}{{#if: {{#pos:{{{book_genre}}}|Novel}} | [[Category:Novels]] }}{{#if: {{#pos:{{{book_genre}}}|Misc books}} | [[Category:Miscellaneous books]] }}}}
#if: {{{series|}}} | '''Series:''' {{{series}}}<br> | }}{{
+
{{BobRow|Illustrator|{{{illustrator|}}}|content=<span itemprop="illustrator">{{{illustrator}}}</span>}}
#if: {{{type|}}} | '''Type:''' {{{type}}}<br> | }}{{
+
{{BobRow|Series|{{{series|}}}}}
#if: {{{isbn|}}} | '''ISBN:''' {{{isbn}}}<br> | }}
+
{{BobRow|Type|{{{type|}}}}}
|}<noinclude>
+
{{BobRow|Page count|{{{pages|}}}}}
 +
{{BobRow|ISBN|{{{isbn|}}}|content=<span itemprop="isbn">{{{isbn}}}</span>[[Category:Old ISBN field]]}}
 +
{{BobRow|ISBN-10|{{{isbn10|}}}|content=<span itemprop="isbn">{{{isbn10}}}</span>}}
 +
{{BobRow|ISBN-13|{{{isbn13|}}}|content=<span itemprop="isbn">{{{isbn13}}}</span>}}
 +
{{BobRow||{{{releases|}}}|content={{releasesHeader}}
 +
{{{releases}}}
 +
{{releasesEnd}}}}
 +
{{BobRow||{{{next|}}}{{{previous|}}}|content={{#if: {{{previous|}}} | ''[[{{{previous}}}]]'' }} {{#if:{{{next|}}}|{{#if:{{{previous|}}}|{{!}}|}}|}} {{#if: {{{next|}}} | ''[[{{{next}}}]]'' → }}|align=center}}
 +
}}<includeonly>{{#if:{{{book_genre|}}}||[[Category:Books missing genre]]}}{{#ifeq:{{year|{{{date}}}}}|9999|[[Category:Books missing date]]|[[Category:{{year|{{{date}}}}} books]]}}[[Category:Books]]</includeonly></div><noinclude>
 
==Usage==
 
==Usage==
 
This template is to be used articles about books. Place the following at the top of the page:
 
This template is to be used articles about books. Place the following at the top of the page:
  
 
<pre>
 
<pre>
{{Book
+
{{BookBob
 
| cover=
 
| cover=
 
| title=
 
| title=
 
| publisher=
 
| publisher=
| date=
 
 
| author=
 
| author=
 
| illustrator=
 
| illustrator=
 
| series=
 
| series=
 
| type=
 
| type=
| isbn=
+
| pages=
 +
| isbn10=
 +
| isbn13=
 +
| releases={{releases
 +
 
 +
}}
 +
| previous=
 +
| next=
 
}}
 
}}
 
</pre>
 
</pre>
 
All fields are optional.
 
All fields are optional.
  
[[Category:Breakout Box Templates]]</noinclude>
+
[[Category:Breakout box templates]]</noinclude>

Revision as of 15:26, 18 January 2021

Notavailable.svg
BookBob

Usage

This template is to be used articles about books. Place the following at the top of the page:

{{BookBob
| cover=
| title=
| publisher=
| author=
| illustrator=
| series=
| type=
| pages=
| isbn10=
| isbn13=
| releases={{releases

}}
| previous=
| next=
}}

All fields are optional.