More actions
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}} | ||
{{#ifeq:{{{child|}}} |yes | |||
{ | | | ||
| <table class="sidebar {{#switch: {{{float|}}} | |||
| 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|}}} }}}"><!-- | |||
-->{{#if: {{{outertitle|}}} | |||
| <caption class="sidebar-outertitle {{{outertitleclass|}}}" style="{{{outertitlestyle|}}}">{{{outertitle}}}</caption><!-- | |||
-->}}<!-- | |||
-->{{#if: {{{topimage|}}} | |||
| <tr> | |||
<td class="sidebar-topimage {{{topimageclass|}}}" style="{{{topimagestyle|}}}">{{{topimage}}}<!-- | |||
-->{{#if: {{{topcaption|}}} | |||
|<div class="sidebar-topcaption" style="{{{topcaptionstyle|}}}">{{{topcaption}}}</div> | |||
}} | |||
</td> | |||
</tr> | |||
}}<!-- | |||
-->{{#if:{{{pretitle|}}} | |||
|<tr><td class="{{ | | <tr> | ||
<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> | ||
}} | |||
}}<!-- | |||
-->{{#if: {{{title|}}} | |||
| {{#ifeq:{{{child|}}} |yes | |||
| {{{title}}} | |||
| <tr> | |||
<th class="sidebar-title{{#if: {{{pretitle|}}} | |||
| -with-pretitle | |||
}} {{{titleclass|}}}" style="{{{basestyle|}}}; {{{titlestyle|}}}"> | |||
{{{title}}}</th> | |||
</tr> | |||
}} | |||
}}<!-- | |||
-->{{#if:{{{image|}}} | |||
| <tr> | |||
<td class="sidebar-image {{{imageclass|}}}" style="{{{imagestyle|}}}">{{{image}}}<!-- | |||
-->{{#if:{{{caption|}}} | |||
| <div class="sidebar-caption" style="{{{captionstyle|}}}">{{{caption}}}</div> | |||
}} | |||
</td> | |||
</tr> | </tr> | ||
}}<!-- | |||
-->{{#if:{{{above|}}} | |||
| <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|}}}| | |||
<tr> | |||
<th class="sidebar-heading {{{headingclass|}}}" style="{{{basestyle|}}}; {{{headingstyle|}}}; {{{heading1style|}}}"> | |||
{{{heading1}}}</th> | |||
</tr> | |||
}}{{#if: | |||
{{{content1|}}}| | |||
<tr> | |||
<td class="sidebar-content {{{contentclass|}}}" style="{{{contentstyle|}}}; {{{content1style|}}}"><!-- newline required before contents# for bullets to work --> | |||
{{{content1}}}</td> | |||
</tr> | |||
}}{{#if: {{{heading2|}}}| | |||
<tr> | |||
<th class="sidebar-heading {{{headingclass|}}}" style="{{{basestyle|}}};{{{headingstyle|}}};{{{heading2style|}}}"> | |||
{{{heading2}}}</th> | |||
</tr> | |||
}}{{#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|}}} | |||
| <tr> | |||
<td class="sidebar-below {{{belowclass|}}}" style="{{{belowstyle|}}}"> | |||
{{{below}}}</td> | {{{below}}}</td> | ||
</tr> | |||
}}<!-- | |||
-->{{#ifeq:{{{child|}}} |yes | |||
|none |off= | | | ||
|#default=<tr><td style=" | | {{#switch:{{{navbar|{{{tnavbar|<noinclude>off</noinclude>}}} }}} | ||
| none | |||
</table>}}</includeonly><noinclude>{{documentation}}<!-- Please add categories and interwikis to the bottom of | | 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> | |||