(namespace switch for version header) |
(lighter, faster, no subpage dependencies, better image presentation (also on mobile), better image links, ensures headers dont get fragmented, better wiki support, i forgot what else) |
||
Line 1: | Line 1: | ||
< | <includeonly><!-- | ||
<div style="padding:6px 10px; border-bottom: 1px solid # | -->{{#if:{{{4|}}}<!-- If it has a fourth parameter it's a version | ||
-->|<!-- If version: | |||
--><div style="clear:both;"></div></div></div><!-- Clear, remove bottom border div, remove main box div | |||
--><h3><!-- Open header | |||
-->{{#switch:{{NAMESPACENUMBER}}<!-- Switch for version label | |||
-->|3014=Ver<!-- Uneven Dream | |||
-->|Version <!-- | |||
-->}}<!-- End switch for version label | |||
-->{{{1}}}</h3><!-- Close header | |||
--><div style="border:4px solid #b2af9c;><!-- Open main box div | |||
-->{{#if:{{{2|}}}<!-- Check for images | |||
-->|<div id="mw-content" class="floatleft" style="padding:12px;padding-bottom:1px;margin-right:2%;font-size:1px;"><!-- Open image div | |||
-->{{#arraymap:{{{2}}}|,|?|[[File:{{#sub:?|0|{{#pos:?|(}}}}{{!}}left{{!}}border{{!}}370x370px{{!}}link={{#if:{{#pos:?|(}}|{{NAMESPACE}}:{{#replace:{{#sub:?|{{#expr:1 + {{#pos:?|(}}}}}}|)|}}}}]]|\n}}<!-- Array for images and their annotations | |||
--></div><!-- Close image div | |||
-->}}<!-- End image check | |||
-->|</div><!-- If patch, close div of border bottom from previous template use | |||
-->}}<!-- End check for dot | |||
The below is common to every template usage | |||
--><div style="display:table-cell;padding:6px 10px;"><!-- Div for author and date info | |||
--><b><!-- | |||
-->{{#if:{{{4|}}}<!-- Check if version | |||
-->|<!-- If version, place nothing | |||
-->|{{#tag:nowiki|Patch {{{1|}}} / }}<!-- If patch, prepend text using the patch number | |||
-->}}<!-- End version check | |||
-->Contributing Authors:</b> <!-- Space here | |||
-->{{#arraymap:<!-- Array categories | |||
-->{{#if:{{{4|}}}<!-- Check if version | |||
-->|{{{3}}}<!-- Versions have author as third field | |||
-->|{{{2}}}<!-- Patches have author as second field | |||
-->}}<!-- End version check | |||
-->|,|#|[[:Category:#|#]]|, }}<!-- End array usage | |||
--><br><!-- Separate author list and date with newline | |||
-->'''Release Date:''' {{{4|{{{3|}}}}}}<!-- | |||
--></div><!-- Close div of author and date info | |||
--><div style="padding:6px 10px;border-bottom:1px solid #a2a9b1;border-top:1px solid #a2a9b1;"><!-- Open div for bottom border of box, above text | |||
--></includeonly><noinclude> | |||
use in a version history page like this | use in a version history page like this | ||
Line 29: | Line 65: | ||
[[Category:Formatting templates]] | [[Category:Formatting templates]] | ||
</noinclude> |
Revision as of 13:33, 3 July 2024
use in a version history page like this
{{vh |0.100a |example.png (Example World), two.png (Another World) |author1, author2 |1999/09/19}} *text *text ...
or for patches like this
{{vh |2 |author1, author2 |1999/09/29}} *text *text ...
If there is normal page content below a usage of this template, put a couple </div> in there to stop the css from bleeding onto it