Difference between revisions of "Template:Book"
m |
|||
(5 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
<includeonly>{| | <includeonly><!-- | ||
| | --- If item name is provided as parameter, use the parameter instead of root page. --- | ||
-->{{#vardefine:Page|{{#if:{{{1|}}}|{{{1|}}}|{{ROOTPAGENAME}}}}}}<!-- | |||
--- Load complete datastring into a variable and load content into another variable (due to string size limits) --- | |||
-->{{#vardefine:Datastring|{{:Book_data|{{#var:Page}}}}}}<!-- | |||
-->{{#vardefine:Content|{{:Book_data|{{#var:Page}} Content}}}}<!-- | |||
--- Separate values from datastring into individual variables. --- | |||
-->{{#vardefine:Category|{{#explode: {{#var:Datastring}}|§|0}}}}<!-- | |||
-->{{#vardefine:Subcategory|{{#explode: {{#var:Datastring}}|§|1}}}}<!-- | |||
-->{{#vardefine:Price|{{#explode: {{#var:Datastring}}|§|2}}}}<!-- | |||
-->{{#vardefine:Tags|{{#explode: {{#var:Datastring}}|§|6}}}}<!-- | |||
-->{{#vardefine:Description|{{#explode: {{#var:Datastring}}|§|7}}}}<!-- | |||
-->{{#vardefine:MiddleText|{{#explode: {{#var:Datastring}}|§|8}}}}<!-- | |||
-->{{#vardefine:BookType|{{#explode: {{#var:Datastring}}|§|9}}}}<!-- | |||
-->{{#vardefine:Name|{{#explode: {{#var:Datastring}}|§|10}}}}<!-- | |||
-->{{#vardefine:Image|{{#explode: {{#var:Datastring}}|§|11}}}}<!-- | |||
--- Load translations that are used multiple times into variables. --- | |||
-->{{#vardefine:TranslateName|{{Translate|{{#if:{{#var:Name}}|{{#var:Name}}|{{#var:Page}}}}|Books}}}}<!-- | |||
-->{{#vardefine:TranslatePrice|{{Translate|Price|Properties}}}}<!-- | |||
-->{| width=300px; | |||
|style="text-align:center;"|<span style="font-size: 20px;">{{#var:TranslateName}}</span><br> | |||
<span style="text-align:center;color:#9d9a9a;">{{#var:BookType}}</span>{{Tooltip rule}} | |||
|- | |- | ||
|{{#if: {{#var:MiddleText}}|{{#var:MiddleText}}{{Tooltip rule}}|}} | |||
|- | |- | ||
|style="color:#9d7969;text-align:justify"|{{ | |style="color:#9d7969;text-align:justify"|{{Translate|{{#var:Description}}|Books}}{{#if:{{#var:Price}}|<div style="float: right;">[[File:Gold_Icon.png|18px|alt={{#var:TranslatePrice}}|link=|{{#var:TranslatePrice}}]]{{c|white|{{#var:Price}}}}</div>}}<br> | ||
|- | |- | ||
|style="text-align:center;"|[[File:{{#if:{{: | |style="text-align:center;"|[[File:{{#if:{{#var:Image}}|{{#var:Image}}|{{#var:Page}}.png}}|link=|class=image2x|alt={{Translate|{{ROOTPAGENAME}}|Treatises}}|{{Translate|{{ROOTPAGENAME}}|Treatises}}]]{{#ifeq:{{#var:Page}}|Emissary's Letter|[[File:Emissary's Letter Opened.png|link=|class=image2x|alt={{#var:Page}}|{{#var:Page}}]]|}} | ||
|} | |} | ||
</includeonly><noinclude>{{doc}} | </includeonly><noinclude>{{doc}} | ||
[[Category:Tooltip templates]]</noinclude> | [[Category:Tooltip templates]]</noinclude> |
Latest revision as of 15:17, 19 July 2023
This is treatise template created for use together with the Template:Tooltip hover box template on a specific Books & Notes page or Treatises page.
Usage
The book's data is loaded from Book data. This syntax provides the tooltip look and content loaded via the {{Book}}
template. Use on pages is combined with float CSS, positioning the result to the right.
<div style="float: right">{{ {{{1|Tooltip hover box}}}|title= {{Book}}}}</div>
By default the page name is used as the book name. If you want to load a specific book on any page, you can provide its name as a parameter, for example:
{{ {{{1|Tooltip hover box}}}|title= {{Book|Pyromantic Treatise IV}}}}
Pyromantic Treatise IV Written by Jovar Arno |
"A Tale of the Everflaming, as Told by a Jibean Merchant" Allows you to learn the following Pyromancy abilities: Inferno Excess Heat Pyromania Reading this book grants some Experience. |
An assortment of road notes from a famous traveler, describing the sect of fire-worshipping dervishes. The detailed description of some of their rituals looks particularly promising. 1800 |
Book Content
You can also load the text that's written inside a book or treatise by using this transclusion syntax:
{{:Book data|Pyromantic Treatise IV Content}}
...They surrounded me, and, for a brief moment, I was fearful that I was to share the fate of the poor sod whose charred remains we had stumbled upon at the crossroads. However, they seemed friendly, even if the sight of their eerie masks unnerved me greatly.
( . . . )
After we finished our food, the priest - I could only assume he was a priest - gestured for us to leave the tent. Weighed down by the heavy meal, we reluctantly followed him outside. To our astonishment, we saw a huge crowd, even though just a couple hours ago there was hardly more than a few dozen elves in the entire camp. The blinding light of hundreds of flames was chasing off the pitch-black darkness of the night. The moon, as if terrified of the competition, hid behind the clouds that had gathered all of a sudden. Wasting no time the priest marched onwards, confidently pushing the crowd out of our way...
( . . . )
The song came to a halt, leaving us in thick, oppressive silence. For a few minutes we just stood there, exchanging confused looks, when suddenly the skies opened up, raining fire and flames upon the people sitting in the middle of the circle. The crowd roared, then burst into wild dance, utterly enraptured. The burning dervishes were still sitting in their place, completely unperturbed. I believe I even spotted a faint smile on one of the faces. Terrified, we attempted to flee, vainly trying to get through the rows of spinning nomads as they drew closer and closer...