Template:ColoredBox: Difference between revisions

From fattwiki
(allow conditional titles)
Tag: 2017 source edit
(Add more styling flexibility)
Tag: 2017 source edit
Line 1: Line 1:
<div class="mw-tpl-colorbox {{{class|}}}" style="{{#if:{{{background-content-color|}}}| background-color: {{{background-content-color|#fff}}}; }} {{{style|}}}">
<templatestyles src="ColoredBox/style.css"/>
<templatestyles src="ColoredBox/style.css"/>
{{#if:{{{title|}}}
<div class="mw-tpl-colorbox {{{class|}}}" style="
|<div class="mw-tpl-colorbox-title" style="{{#if:{{{background-title-color|}}}|background-color:{{{background-title-color|#eaecf0}}};}}">{{#if:{{{icon|}}}|[[File:{{{icon}}}|20px|class=colorbox-title-icon|link=|alt=]]&#32;}}<strong style="{{#if:{{{title-color|}}}| color: {{{title-color|#000000}}}; }}">{{{title}}}</strong>
{{#if:{{{background-content-color|}}} | background-color: {{{background-content-color | #ffffff}}}; }}
{{#if:{{{link|}}}|<div class="mw-tpl-colorbox-title-corner">[[{{{link}}}|<span style="{{#if:{{{link-color|{{{title-color|}}}}}}| color: {{{link-color|{{{title-color|}}}}}}; }}">{{{view-text|view}}}</span>]]</div>}}
{{#if:{{{background-title-color|}}} | border-color:{{{background-title-color}}} | #eaecf0}}  
</div>
{{{colorbox-style|}}}">{{#if:{{{title|}}}|<div class="mw-tpl-colorbox-title" style="
{{#if:{{{background-title-color|}}}|background-color:{{{background-title-color|#eaecf0}}};}}
{{#if:{{{center-title|}}}|text-align:center|}}
{{{colorbox-title-style|}}}
">
{{#if:{{{icon|}}}|[[File:{{{icon}}}|20px|class=colorbox-title-icon|link=|alt=]]&#32;}}
<strong style="{{#if:{{{title-color|}}}| color: {{{title-color|#000000}}}; }}">
{{{title}}}</strong>{{#if:{{{link|}}}|<div class="mw-tpl-colorbox-title-corner">[[{{{link}}}|<span style="{{#if:{{{link-color|{{{title-color|}}}}}}| color: {{{link-color|{{{title-color|}}}}}}; }}">{{{view-text|view}}}</span>]]</div>}}</div>
|
|
}}
}}
<div class="mw-tpl-colorbox-content">
<div class="mw-tpl-colorbox-content" style="{{#if:{{{center-content|}}}|text-align:center|}}{{{colorbox-content-style|}}}">
{{{content}}}
{{{content}}}
</div>
</div>
</div>
</div>

Revision as of 23:45, 8 July 2022

{{{content}}}