Template:Infobox-chapter: Difference between revisions

m Restyle infobox (dark-theme readable) + branch-coloured header via new 'branch' param [TemplateStyles]
m Fix: newline before {| (templatestyles broke table parse); use name param in header; drop redundant Name row
Line 1: Line 1:
<includeonly><templatestyles src="Infobox-chapter/styles.css" />{| class="sidebar tf-cbox"
<includeonly><templatestyles src="Infobox-chapter/styles.css" />
{| class="sidebar tf-cbox"
|-  
|-  
| class="tf-cbox-name tf-b-{{lc:{{{branch|default}}}}}" colspan="2" | '''{{PAGENAME}}'''{{#if:{{{hcn|}}}|<br/><span class="tf-cbox-hcn">{{{hcn}}}</span>}}
| class="tf-cbox-name tf-b-{{lc:{{{branch|default}}}}}" colspan="2" | '''{{#if:{{{name|}}}|{{{name}}}|{{PAGENAME}}}}'''{{#if:{{{hcn|}}}|<br/><span class="tf-cbox-hcn">{{{hcn}}}</span>}}
|-
|-
| class="tf-cbox-img" colspan="2" | {{#if: {{{crest|}}}
| class="tf-cbox-img" colspan="2" | {{#if: {{{crest|}}}
Line 10: Line 11:
{{#if: {{{image|}}}|
{{#if: {{{image|}}}|
{{!}} class="tf-cbox-img" colspan="2" {{!}} {{sidebar image|{{{image}}}}}}}
{{!}} class="tf-cbox-img" colspan="2" {{!}} {{sidebar image|{{{image}}}}}}}
|- valign="top"
{{#if: {{{name|}}}|
{{!}} class="tf-cbox-l" {{!}} '''Name:'''
{{!}} class="tf-cbox-r" {{!}} {{{name}}}}}
|- valign="top"
|- valign="top"
{{#if: {{{city|}}}|
{{#if: {{{city|}}}|