Difference between revisions of "Template:Compact ToC"

From DMARC Wiki
Jump to navigation Jump to search
(syncing from sandbox: significant improvement in code readaibility, simplicity, and consistency, with the added ability to collapse like a normal TOC. see talk for caveats)
(switch these templates to div layout.)
Line 1: Line 1:
__NOTOC__<table class="toc plainlinks hlist" id="toc" {{#ifeq:{{{center|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|align="center"|{{#ifeq:{{{right|}}}|yes|align=right}}}}>
+
 
<tr>
+
__NOTOC__{{#ifeq:{{{center|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|<div style="text-align:center">}}<div class="toc plainlinks hlist" id="toc" style="{{#ifeq:{{{center|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|margin-left:auto;margin-right:auto;|{{#ifeq:{{{right|}}}|yes|float:right; clear:right;}}}} text-align:{{{align|left}}}" >
<td style="text-align:{{{align|left}}}">
+
{{#ifeq:{{{name|}}}|no||<div id="toctitle" style="text-align: center; {{#ifeq:{{{side|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|display:inline-block}}"><h2>{{{name|{{MediaWiki:Toc}}}}}{{#ifeq:{{{side|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|&#58;}}</h2></div>}}
{{#ifeq:{{{name|}}}|no||<div id="toctitle" style="text-align: center; {{#ifeq:{{{side|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|display:inline-block}}"><span style="font-weight: bold">{{{name|{{MediaWiki:Toc}}}}}{{#ifeq:{{{side|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|&#58;}}</span></div>}}
 
 
<div style="margin: auto; white-space: nowrap;{{#ifeq:{{{side|{{#ifeq:{{{1|}}}|short1|yes}}}}}|yes|display:inline-block;}}">{{#ifeq:{{{top|}}}|yes|
 
<div style="margin: auto; white-space: nowrap;{{#ifeq:{{{side|{{#ifeq:{{{1|}}}|short1|yes}}}}}|yes|display:inline-block;}}">{{#ifeq:{{{top|}}}|yes|
 
* [[#top{{!}}Top]]}} {{#if:{{{pre1|{{{preSec1|}}} }}}|
 
* [[#top{{!}}Top]]}} {{#if:{{{pre1|{{{preSec1|}}} }}}|
Line 57: Line 56:
 
* [[#External links|External links]]}}
 
* [[#External links|External links]]}}
 
</div>
 
</div>
</div>
+
</div>{{#ifeq:{{{center|{{#ifeq:{{{1|}}}|short1|yes|}}}}}|yes|</div>}}<noinclude>
</td>
+
{{documentation}}<!-- please add category and language links to the /doc sub-page, not here --></noinclude>
</tr>
 
</table><noinclude>{{documentation}}<!-- please add category and language links to the /doc sub-page, not here --></noinclude>
 

Revision as of 21:26, 19 July 2013

{{#invoke:documentation|main|_content={{ {{#invoke:documentation|contentTitle}}}}}}