Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Sidebar: Difference between revisions

Template page
Arin Mara (talk | contribs)
Added comments to heading parts of the Template to make spacing consistent
m Fix code break.
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
<includeonly>{{#CSS:
<includeonly>{{#CSS: Template:Sidebar/styles.css}}
.sbHeading
{{#ifeq:{{{child|}}} |yes
  {
|
  background-color: #4C4C4C;
  | <table class="sidebar {{#switch: {{{float|}}}
  padding: 0.1em;
                          | left= sidebar-floatleft
}
                          | none= sidebar-nofloat
                        }} {{#ifeq: {{{wraplinks|}}} |true
                            |
                            | nowraplinks
                            }} {{{bodyclass|{{{class|}}} }}}" <!--
  -->cellspacing="{{#if:{{{cellspacing|}}} |{{{cellspacing}}} |5}}" <!--
  -->cellpadding="{{#if:{{{cellpadding|}}} |{{{cellpadding}}} |0}}" <!--
  -->style="{{#if:{{{width|}}} |width: {{{width}}}; }}<!--
  -->{{{bodystyle|{{{style|}}} }}}"><!--


.sbContent
-->{{#if: {{{outertitle|}}}
{
    | <caption class="sidebar-outertitle {{{outertitleclass|}}}" style="{{{outertitlestyle|}}}">{{{outertitle}}}</caption><!--
  padding:0 0.1em 0.4em;
-->}}<!--
}
}}
{{#ifeq:{{{child|}}}|yes||<table class="vertical-navbox {{#ifeq:{{{wraplinks|}}}|true||nowraplinks}} {{{bodyclass|{{{class|}}}}}}" <!--
    -->cellspacing="{{#if:{{{cellspacing|}}} |{{{cellspacing}}} |5}}" <!--
    -->cellpadding="{{#if:{{{cellpadding|}}} |{{{cellpadding}}} |0}}" <!--
    -->style="float:{{#if:{{{float|}}} |{{{float}}} |right}};<!--
          -->clear:{{#ifeq:{{{float|}}}|none |both |{{#if:{{{float|}}} |{{{float}}} |right}}}};<!--
          -->width:{{#if:{{{width|}}} |{{{width}}} |16em}};<!--
            (margins:)-->{{#switch:{{{float|}}} |left=margin:0 1.0em 1.0em 0; |none|right|#default=margin:0 0 1.0em 1.0em;}}<!--
          -->border:1px solid #AAAAAA; padding:0.2em;border-spacing:0.4em 0; text-align:center; line-height:1.4em;font-size:88%; {{{bodystyle|{{{style|}}}}}}">}}<!--


-->{{#ifeq:{{{child|}}}|yes||{{#if:{{{outertitle|}}}
-->{{#if: {{{topimage|}}}
    |<caption class="{{{outertitleclass|}}}" style="padding-bottom:0.2em;font-size:125%;line-height:1.2em;font-weight:bold;{{{outertitlestyle|}}}">{{{outertitle}}}</caption><!--
    | <tr>
-->}}}}<!--
      <td class="sidebar-topimage {{{topimageclass|}}}" style="{{{topimagestyle|}}}">{{{topimage}}}<!--
        -->{{#if: {{{topcaption|}}}
            |<div class="sidebar-topcaption" style="{{{topcaptionstyle|}}}">{{{topcaption}}}</div>
            }}
      </td>
    </tr>
  }}<!--


-->{{#ifeq:{{{child|}}}|yes||{{#if:{{{topimage|}}}
-->{{#if:{{{pretitle|}}}
     |<tr><td class="{{{topimageclass|}}}" style="padding:0.4em 0;{{{topimagestyle|}}}">{{{topimage}}}<!--
     | <tr>
          -->{{#if:{{{topcaption|}}} |<div style="padding-top:0.2em;line-height:1.2em;{{{topcaptionstyle|}}}">{{{topcaption}}}</div>}}</td>
        <td class="sidebar-pretitle{{#if: {{{topimage|}}} <!-- NO space between sidebar-pretitle and {{#if because -with-topimage need to be connected to sidebar-pretitle -->
                    | -with-topimage
                  }} {{{pretitleclass|}}}" style="{{{basestyle|}}}; {{{pretitlestyle|}}}"> {{{pretitle}}}
      </td>
       </tr>
       </tr>
    }}}}<!--
  }}
}}<!--


-->{{#ifeq:{{{child|}}}|yes||{{#if:{{{pretitle|}}}
-->{{#if: {{{title|}}}
    |<tr><td class="{{{pretitleclass|}}}" style="{{{basestyle|}}};{{#if:{{{topimage|}}} |padding-top:0.2em |padding-top:0.4em}};line-height:1.2em;{{{pretitlestyle|}}}">{{{pretitle}}}</td>
    | {{#ifeq:{{{child|}}} |yes
      </tr>
      | {{{title}}}
    }}}}<!--
      | <tr>
 
          <th class="sidebar-title{{#if: {{{pretitle|}}}
-->{{#if:{{{title|}}}
                                  | -with-pretitle
    |{{#ifeq:{{{child|}}}|yes||<tr><th class="{{{titleclass|}}}" style="{{{basestyle|}}};padding:0.2em 0.4em 0.2em; background:#101010; {{#if:{{{pretitle|}}} |padding-top:0}};font-size:145%;line-height:1.2em;{{{titlestyle|}}}">}}{{{title}}}</th>
                                  }} {{{titleclass|}}}" style="{{{basestyle|}}}; {{{titlestyle|}}}">
      </tr>
          {{{title}}}</th>
    }}<!--
          </tr>
      }}
  }}<!--


-->{{#if:{{{image|}}}
-->{{#if:{{{image|}}}
    |<tr><td class="{{{imageclass|}}}" style="padding:0.2em 0 0.4em; background:#101010; {{{imagestyle|}}}">{{{image}}}<!--
    | <tr>
          -->{{#if:{{{caption|}}} |<div style="padding-top:0.2em;line-height:1.2em;{{{captionstyle|}}}">{{{caption}}}</div>}}</td>
      <td class="sidebar-image {{{imageclass|}}}" style="{{{imagestyle|}}}">{{{image}}}<!--
      -->{{#if:{{{caption|}}}
          | <div class="sidebar-caption" style="{{{captionstyle|}}}">{{{caption}}}</div>
          }}
      </td>
       </tr>
       </tr>
    }}<!--
  }}<!--


-->{{#if:{{{above|}}}
-->{{#if:{{{above|}}}
    |<tr><td class="{{{aboveclass|}}}" style="padding:0.3em 0.4em 0.3em;font-weight:bold;{{{abovestyle|}}}"><!--newline required for bullet-points to work:-->
    | <tr>
      <td class="sidebar-above {{{aboveclass|}}}" style="{{{abovestyle|}}}"><!--newline required for bullet-points to work:-->
{{{above}}}</td>
{{{above}}}</td>
       </tr>
       </tr>
    }}<!--
  }}<!--


  heading#/content# starts here:
  heading#/content# starts here:


-->{{#if: {{{heading1|}}}|<!--
-->{{#if: {{{heading1|}}}|
--><tr><!--
<tr>
--><th class="sbHeading {{{headingclass|}}}" style="{{{basestyle|}}};{{{headingstyle|}}};{{{heading1style|}}}"><!--
  <th class="sidebar-heading {{{headingclass|}}}" style="{{{basestyle|}}}; {{{headingstyle|}}}; {{{heading1style|}}}">
-->{{{heading1}}}</th><!--
{{{heading1}}}</th>
--></tr><!--
  </tr>
-->}}{{#if:<!--
}}{{#if:
-->{{{content1|}}}|<!--
{{{content1|}}}|
--><tr><!--
<tr>
--><td class="sbContent {{{contentclass|}}}" style="{{{contentstyle|}}};{{{content1style|}}}"><!-- newline required before contents# for bullets to work --><!--
<td class="sidebar-content {{{contentclass|}}}" style="{{{contentstyle|}}}; {{{content1style|}}}"><!-- newline required before contents# for bullets to work -->
-->{{{content1}}}</td><!--
{{{content1}}}</td>
--></tr><!--
</tr>
-->}}{{#if: {{{heading2|}}}|<!--
}}{{#if: {{{heading2|}}}|
--><tr><!--
<tr>
--><th class="sbHeading {{{headingclass|}}}" style="{{{basestyle|}}};{{{headingstyle|}}};{{{heading2style|}}}"><!--
<th class="sidebar-heading {{{headingclass|}}}" style="{{{basestyle|}}};{{{headingstyle|}}};{{{heading2style|}}}">
-->{{{heading2}}}</th><!--
{{{heading2}}}</th>
--></tr><!--
</tr>
-->}}{{#if:
}}{{#if:
{{{content2|}}}|
<tr>
<td class="sidebar-content {{{contentclass|}}}" style="{{{contentstyle|}}};{{{content2style|}}}">
{{{content2}}}</td>
</tr>
}}{{#if: {{{heading3|}}}|
<tr>
<th class="sidebar-heading {{{
</tr>
</tr>
}}<!--
}}<!--


-->{{#if: {{{below|}}}
-->{{#if: {{{below|}}}
    |<tr><td class="{{{belowclass|}}}" style="padding:0.3em 0.4em 0.3em;font-weight:bold;{{{belowstyle|}}}">
    | <tr>
      <td class="sidebar-below {{{belowclass|}}}" style="{{{belowstyle|}}}">
{{{below}}}</td>
{{{below}}}</td>
    </tr>
      </tr>
    }}<!--
  }}<!--


-->{{#ifeq:{{{child|}}}|yes||{{#switch:{{{navbar|{{{tnavbar|<noinclude>off</noinclude>}}}}}}
-->{{#ifeq:{{{child|}}} |yes
     |none |off=
    |
     |#default=<tr><td style="text-align:right;font-size:115%;{{{navbarstyle|{{{tnavbarstyle|}}}}}}">{{navbar|{{{name|{{PAGENAME}}}}}|mini=1|fontstyle={{{navbarfontstyle|{{{tnavbarfontstyle|}}}}}}}}</td></tr><!--
    | {{#switch:{{{navbar|{{{tnavbar|<noinclude>off</noinclude>}}} }}}
-->}}
     | none
</table>}}</includeonly><noinclude>{{documentation}}<!-- Please add categories and interwikis to the bottom of Template:Sidebar/doc, not here --></noinclude>
    | off=
     | #default= <tr>
                  <td class="sidebar-navbar" style="{{{navbarstyle|{{{tnavbarstyle|}}}}}}">
                  {{navbar
                    | {{{name|{{PAGENAME}} }}}<!-- Strange. Omitting the comment markers introduces an extra space between template: and the name in Navbar breaking the link.
                -->| mini=1
                    | fontstyle= {{{navbarfontstyle|{{{tnavbarfontstyle|}}} }}}
                  }}
                  </td>
                </tr><!--
  -->}}
    </table>
  }}</includeonly><noinclude>
{{documentation}}<!-- Please add categories and interwikis to the bottom of the /doc sub-page, not here --></noinclude>