Template:Version nav: Difference between revisions

No edit summary
No edit summary
Tag: Manual revert
 
(14 intermediate revisions by the same user not shown)
Line 1: Line 1:
<includeonly>
<includeonly>
<div style="margin-top:1.5em; border-top:1px solid #ccc; padding-top:0.5em; font-size:90%;">
<templatestyles src="Version nav/styles.css" />
 
<div class="ooo-version-nav">
  <div style="display:flex; justify-content:space-between;">
{{#dpl:
 
| category    = Updates
    <!-- Previous version -->
| namespace  = Main
    <div>
| ordermethod = title
      {{#dpl:
| order      = descending
      | category    = Updates
| count      = 1
      | namespace  = Main
| titlelt    = {{PAGENAME}}
      | ordermethod = title
| mode       = inline
      | order      = descending
| format      = , [[%PAGE%|Previous (%TITLE%)]] · , ,
      | count      = 1
}}[[:Category:Version History|All Versions]]{{#dpl:
      | titlelt    = {{PAGENAME}}
| category    = Updates
       | format      = , [[%PAGE%|Previous: %TITLE%]], ,
| namespace  = Main
      }}
| ordermethod = title
    </div>
| order      = ascending
 
| count      = 1
    <!-- Next version -->
| titlegt    = {{PAGENAME}}
    <div style="text-align:right;">
| mode       = inline
      {{#dpl:
| format      = , · [[%PAGE%|Next (%TITLE%)]] , ,
      | category    = Updates
}}
      | namespace  = Main
      | ordermethod = title
      | order      = ascending
      | count      = 1
      | titlegt    = {{PAGENAME}}
       | format      = , [[%PAGE%|Next: %TITLE% ]], ,
      }}
    </div>
 
  </div>
 
  <!-- Full list of versions, same as you already had -->
  <div style="margin-top:0.4em; text-align:center;">
    <b>Versions:</b>
    <DynamicPageList>
      category    = Updates
      namespace  = Main
      ordermethod = title
      order      = ascending
      mode        = inline
    </DynamicPageList>
  </div>
 
</div>
</div>
</includeonly>
</includeonly><noinclude>
<noinclude>
Usage:
Automatic version navigation bar.
<pre>{{Version nav}}</pre>
 
Shows previous/next version (by page title) and a full inline list
of all pages in [[:Category:Updates]].
 
Usage (at the bottom of a version page):
<pre>
{{Version nav}}
</pre>
</noinclude>
</noinclude>