Template:Reference page/superscript: Difference between revisions
From Tardis Wiki, the free Doctor Who reference
(reworked based on superscript of {{ r }} template, refactored for easier maintenance and to support anticipated style parameter, added wrapping and translation) |
(-typo) |
||
Line 1: | Line 1: | ||
<!-- |wrap=n[o]/f[orced] |leadin=value |prefix=value |pp=value |where=value |quote=value |translation=value |suffix=value -->{{#if:{{{where|}}}|<sup class="reference {{#switch:{{{wrap|}}}|f|forced=|no}}wrap"<!-- style="white-space:{{#switch:{{{wrap|}}}|f|forced=|no}}wrap;"-->>{{{prefix|}}}<span title="{{{leadin|}}}: {{#invoke:String|replace|{{#invoke:Plain text|main|1={{{where|}}}|encode=false}}|"|"}}{{#if:{{{quote|}}}| Quotation: "{{#invoke:String|replace|{{#invoke:Plain text|main|1={{trim quotes|s={{{quote|}}}}}|encode=false}}|"|"}}"{{#if:{{{translation|}}}| Translation: "{{#invoke:String|replace|{{#invoke:Plain text|main|1={{trim quotes|s={{{translation}}}}}|encode=false}}|"|"}}"}}" class="tooltip tooltip-dashed" style="border-bottom: 1px dashed;}}">{{pp|}}{{{where|}}}</span>{{{suffix|}}}</sup>{{#switch:{{{wrap|}}}|n|no=|​}}}}<noinclude> | <!-- |wrap=n[o]/f[orced] |leadin=value |prefix=value |pp=value |where=value |quote=value |translation=value |suffix=value -->{{#if:{{{where|}}}|<sup class="reference {{#switch:{{{wrap|}}}|f|forced=|no}}wrap"<!-- style="white-space:{{#switch:{{{wrap|}}}|f|forced=|no}}wrap;"-->>{{{prefix|}}}<span title="{{{leadin|}}}: {{#invoke:String|replace|{{#invoke:Plain text|main|1={{{where|}}}|encode=false}}|"|"}}{{#if:{{{quote|}}}| Quotation: "{{#invoke:String|replace|{{#invoke:Plain text|main|1={{trim quotes|s={{{quote|}}}}}|encode=false}}|"|"}}"{{#if:{{{translation|}}}| Translation: "{{#invoke:String|replace|{{#invoke:Plain text|main|1={{trim quotes|s={{{translation}}}}}|encode=false}}|"|"}}"}}" class="tooltip tooltip-dashed" style="border-bottom: 1px dashed;}}">{{{pp|}}}{{{where|}}}</span>{{{suffix|}}}</sup>{{#switch:{{{wrap|}}}|n|no=|​}}}}<noinclude> | ||
{{Documentation}} | {{Documentation}} | ||
</noinclude> | </noinclude> |
Revision as of 15:28, 4 September 2021
Instructions for {{Reference page/superscript}}
This is a subtemplate, implementing the wikipedia:superscript info piece of Template:Rp for a single ref name.
Usage
For internal use only:
|wrap=n[o]/y[es]/f[orced]
, |leadin=value
, |prefix=value
, |pp=value
, |where=value
, |sup-where=value
, |quote-where=value
, |quote=value
, |suffix=value
See also
- Module:DecodeEncode.encode()
- Module:Plain text.main()