Template:PageRef/doc: Difference between revisions

Sur (talk | contribs)
mNo edit summary
Sur (talk | contribs)
m fleshed out ideal format
Line 1: Line 1:
Example
=Overview=
Outputs an icon in svg and a link to the given page with an optional alternate display name.


Output should be:<br>
<icon> <pagename>
* Both icon and page name should be hyperlinked to first parameter as the pagename
* Icon should be <pre style="width: fit-content>[[File:<pagename>.svg]]</pre> if the svg file exists, otherwise the .png.
* The .svg should be both light and dark theme compatible
* The .png should be default theme compatible (light)
=Examples=
(not yet working)
{{PageRef|Lash}}
{{PageRef|Lash}}


Line 12: Line 23:


{{PageRef|The Curiosity Shop|alt=Shop|size=100}}
{{PageRef|The Curiosity Shop|alt=Shop|size=100}}
Below is a fake example. Ideally, the template is called like:
<pre style="width: fit-content">{{PageRef|Lash|alt=Jacob}}</pre>
In wikitext it would look be outputted as:
<pre style="width: fit-content">[[File:Lash.svg|class=dark_or_light|link=Lash|size=15]] [[Lash|Jacob]]</pre>
Which would appear in visual as
{{HeroIcon|Lash|Jacob}}


<templatedata>
<templatedata>