en>Rebecca Zarzycki |
No edit summary |
||
(8 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
{{Books|GH|OR|SL|WS}} | |||
<noinclude>{{documentationpage}}</noinclude> | <noinclude>{{documentationpage}}</noinclude> | ||
This template is used for marking which [[ | This template is used for marking which [[List of Stories|''Everwind'' stories]] the content of an article originates from or relates to. It displays small icons in the top right corner of each page it is used in. | ||
==Usage== | ==Usage== | ||
<pre>{{Books|first abbrevation|second abbreviation|etc}}</pre> | <pre>{{Books|first abbrevation|second abbreviation|etc}}</pre> | ||
Abbreviations should be listed in order of | Abbreviations should be listed in order of [[Everwind canon|canonicity]]. | ||
===Parameters=== | ===Parameters=== | ||
{{Docparam|name=<unnamed 1> >> <unnamed 15>|req=yes|default=|desc= | {{Docparam|name=<unnamed 1> >> <unnamed 15>|req=yes|default=|desc= | ||
Book abbrevation; see [[#Abbreviations]] below for valid inputs. Books should be listed in order of | Book abbrevation; see [[#Abbreviations]] below for valid inputs. Books should be listed in order of [[Everwind canon|canonicity]]. | ||
}} | }} | ||
===Abbreviations=== | ===Abbreviations=== | ||
{{Abb/doc}} | {{Template:Abb/doc|abbrevations}} | ||
==Example== | ==Example== | ||
<pre>{{Books| | <pre>{{Books|GH|SL|OR|WS}}</pre> | ||
results in the icons for ''[[ | results in the icons for ''[[Grimhall (subchapter)|Grimhall]]'', ''[[Snowleaf (subchapter)|Snowleaf]]'', and ''[[Path of the Outrider|Outrider]]'', ''[[Wornspire (subchapter)|Wornspire]]'' being displayed in the upper right corner of a page. | ||
==Technical== | ==Technical== | ||
* Auxiliary template: {{tl|Abb}} (defines | * Auxiliary template: {{tl|Abb}} (defines abbreviation/icon combinations) | ||
* Uses JavaScript located in [[MediaWiki:Common.js]]. | * Uses JavaScript located in [[MediaWiki:Common.js]]. |
Latest revision as of 05:24, 23 July 2021
![]() |
This page contains usage information for [[{{#sub:Template:Books/doc|0|{{#rpos:Template:Books/doc|/doc}}}}]]. |
---|
This template is used for marking which Everwind stories the content of an article originates from or relates to. It displays small icons in the top right corner of each page it is used in.
Usage
{{Books|first abbrevation|second abbreviation|etc}}
Abbreviations should be listed in order of canonicity.
Parameters
{{#replace:{{#replace:{{#replace:{{#replace:<unnamed 1> >> <unnamed 15>|| }}| >> | up to }}| // | or }}| ++ |, }}
Book abbrevation; see #Abbreviations below for valid inputs. Books should be listed in order of canonicity.
Abbreviations
Small template which retrieves the name of an Everwind book for a given user entry.
Auxiliary template for {{Infobox}}.
Usage
{{abb|abbreviation}}
Parameters
{{#replace:{{#replace:{{#replace:{{#replace:<unnamed 1> // abb|| }}| >> | up to }}| // | or }}| ++ |, }}
Book abbrevation; see #Abbreviations below for list of valid inputs.
(default: "text")
{{#replace:{{#replace:{{#replace:{{#replace:mode|| }}| >> | up to }}| // | or }}| ++ |, }}Determines the template output.
Available options:
- icon: Returns the name of the book's icon (without "File:" prefix).
- link: Returns the name of the book's overview article.
- short: Returns a shortened version of the book's name for display in narrow spaces.
- text: Returns the book's name.
Abbreviations
<section begin="abbrevations" />
Abbreviation | text | short | link | icon |
---|---|---|---|---|
AK | Arkaeni | AK | Arkaeni (subchapter) | ![]() |
AUX | Auxiliaries | AUX | List of Auxiliary Short Stories | File:Booktitle-AUX.png |
GH | [[]] | [[File:|x40px]] | ||
OR | Outrider | OUTRIDER | Outrider (book) | File:Booktitle-OR.png |
SL | Snowleaf | SNOW | Snowleaf (subchapter) | ![]() |
WS | [[]] | [[File:|x40px]] | ||
WIKI | About | WIKI | The Verges Wiki:About | File:Booktitle-WIKI.png |
none | mentioned-only | mentioned-only |
<section end="abbrevations" />
Adding new abbrevations
Simply add the following to the template and fill it out:
-->|ABBREVIATION=<!-- -->{{#switch:{{lc:{{{mode|}}}}}<!-- -->|icon =<!-- -->|link =<!-- -->|short =<!-- -->|text|#default =<!-- -->}}<!--
Please note:
- The abbreviation needs to be in all-uppercase.
- Icon file names should be specified without "File:" prefix.
In addition, please try to maintain alphabetical order of abbreviations within the template.
Examples
Input | Result |
---|---|
{{abb|WS}}
|
|
{{abb|mode=short|WS}}
|
|
{{abb|mode=link|WS}}
|
|
{{abb|mode=icon|WS}}
|
Example
{{Books|GH|SL|OR|WS}}
results in the icons for Grimhall, Snowleaf, and Outrider, Wornspire being displayed in the upper right corner of a page.
Technical
- Auxiliary template: {{Abb}} (defines abbreviation/icon combinations)
- Uses JavaScript located in MediaWiki:Common.js.