Difference between revisions of "Template:Sidenotes begin"

From Anarchy
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
<div style="position:relative; {{#switch:{{{side|both}}}|left=padding-left:{{#if:{{{2|}}}|{{{2}}}em|-2em}};|right=padding-right:{{#if:{{{2|}}}|{{{2}}}em|-2em}};|both=padding-left:{{#if:{{{2|}}}|{{{2}}}em|-2em}};padding-right:{{#if:{{{2|}}}|{{{2}}}em|-2em}};|}}">}}
+
<includeonly>{{#ifeq:{{NAMESPACE}}|Page|<div <!--
 +
 
 +
Add classes
 +
-->class="_sidenote_container _sidenote_{{{side|both}}}" <!--
 +
 
 +
Add container styles (could use TemplateStyles for most of this)
 +
-->style="position:relative;<!--
 +
 
 +
    Add the padding for the sidenotes on the requested sides
 +
    --> {{#switch:{{{side|both}}}<!--
 +
        -->|left=padding-left:{{{2|11em}}};<!--
 +
        -->|right=padding-right:{{{2|11em}}};<!--
 +
        -->|both=padding-left:{{{2|11em}}}; padding-right:{{{2|11em}}};<!--
 +
    -->|}}<!--
 +
 
 +
End style
 +
-->"><!--
 +
 
 +
Dummy div to match {{sidenotes end}} - can be removed eventually
 +
--><div><!--
 +
 
 +
End if:page-ns
 +
-->}}</includeonly>

Latest revision as of 21:15, 19 March 2021