×
Create a new article
Write your page title here:
We currently have 3,036 articles on YumeWiki. Type your article name above or click on one of the titles below and start writing!



YumeWiki
3,036Articles

Template:VersionHistory: Difference between revisions

(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:
<onlyinclude>{{#if:{{#pos:{{{1}}}|.}}|<div style="clear:both;"></div></div></div><h3>{{#switch:{{NAMESPACENUMBER}}|3014|3015=Ver|Version&#32;}}{{{1}}}</h3><div style="border:4px solid #b2af9c; background:#{{#switch:{{NAMESPACENUMBER}}|3002=dfdbc3|ffffff}};>{{#if:{{{2|}}}|<div style="width:min(93%, -20000 * (50% - 450px)); min-width:370px; float:left; padding:8px; background:#{{#switch:{{NAMESPACENUMBER}}|3002=dfdbc3|ffffff}}; padding-right:min(24px, 6%); line-height:270px">{{#arraymaptemplate:{{{2}}}|VersionHistory/Images|,|\n}}</div>}}}}{{#if:{{#pos:{{{1}}}|.}}||</div>}}<div style="padding:6px 10px; padding-left:32px; border-bottom:1px solid #B7B4A2;"><b>{{#if:{{#pos:{{{1}}}|.}}|C|Patch {{{1}}} / C}}ontributing Authors:</b> {{#arraymaptemplate:{{#if:{{#pos:{{{1}}}|.}}|{{{3}}}|{{{2}}}}}|VersionHistory/Category|,|,&nbsp;}}<br>'''Release Date:''' {{#if:{{#pos:{{{1}}}|.}}|{{{4}}}|{{{3}}}}}</div>
<includeonly><!--
<div style="padding:6px 10px; border-bottom: 1px solid #B7B4A2;"></onlyinclude>
-->{{#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&#32;<!--
      -->}}<!-- 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:#|#]]|,&#32;}}<!-- 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

Template:VersionHistory/Images

Template:VersionHistory/Category