Difference between revisions of "Template:Books"

498 bytes added ,  23:32, 11 February 2022
add TemplateStyles
(add TemplateStyles)
 
(6 intermediate revisions by one other user not shown)
Line 1: Line 1:
<includeonly><!--
<includeonly><!-- -->
--><table class="books">
<templatestyles src="Template:Books/styles.css" />
     <tr><td colspan="2" style="text-align: center; font-size:140%;">'''{{#if: {{{title|}}}|{{{title|}}}|{{PAGENAME}}}}'''</td></tr>
<table class="books">
     {{#if: {{{file|}}}|<tr><td colspan="2">[[File:{{{file|}}}{{!}}250px{{!}}center]]</td></tr>}}
     <tr><th colspan="2" style="text-align: center; font-size:140%;">'''{{PAGENAME}}'''</th></tr>
     <tr><td colspan="2">[[File:{{{file|}}}{{!}}250px{{!}}center]]</td></tr>
         <tr>
         <tr>
         <td class="books-data-title">Year</td>
         <td class="books-data-title">Date</td>
         <td class="books-data">{{{prm1}}}</td>
         <td class="books-data">{{{bk-date}}}</td>
     </tr>
     </tr>
     {{#if: {{{prm2|}}}|<tr>
     <tr>
         <td class="books-data-title">Publisher</td>
         <td class="books-data-title">Publisher</td>
         <td class="books-data">{{{prm2}}}</td>
         <td class="books-data">{{{bk-pub}}}</td>
     </tr>}}
     </tr>
     {{#if: {{{prm3|}}}|<tr>
     <tr>
         <td class="books-data-title">Genre</td>
         <td class="books-data-title">Genre</td>
         <td class="books-data">{{{prm2}}}</td>
         <td class="books-data">{{{bk-genre}}}</td>
     </tr>}}
     </tr>
   </table>{{#ifeq:{{NAMESPACE}}|Template|<!-- do nothing -->|[[Category:Some category]]}}</includeonly><noinclude>{{Books Documentation}}</noinclude>
    <tr>
        <td class="books-data-title">Rating</td>
        <td class="books-data">{{{bk-rating}}}</td>
    </tr>
   </table></includeonly>
 
<noinclude>
 
This template is designed for books outside the setting of the Temple of the White Rat
 
To use, copy the following code and fill in the appropriate fields.
 
<pre><nowiki>
{{books
| title      =
| file        = [e.g. "Example.jpg"]
| bk-date    =
| bk-pub      =
| bk-genre    =
| bk-rating  =
 
}}
</nowiki></pre>
 
<p>The table class still needs to be styled</p>
 
<templatedata>
{
"params": {
"file": {},
"bk-date": {},
"bk-pub": {},
"bk-genre": {},
"bk-rating": {}
}
}
</templatedata></noinclude>