This is a documentation for Board Game Arena: play board games online !
Template:InfoBox: Difference between revisions
Jump to navigation
Jump to search
Sammy McSam (talk | contribs) m (→Available parameters: titleAlign) |
Sammy McSam (talk | contribs) (infoBoxes & infoBoxes3 documentation, infoBox flex container) |
||
Line 1: | Line 1: | ||
<div style="max-width:{{{maxWidth|600}}}px;display:flex;flex-flow:column wrap;margin:0.5rem;border-radius:{{{corner|0.5}}}rem;background:{{{colour|linear-gradient(to bottom right,{{{topLeftColour|#c00}}},{{{middleColour|#703}}},{{{bottomRightColour|#307}}})}}};"><div style="padding-top:0.5rem;padding-bottom:0.25rem;color:{{{titleColour|#fff}}};text-align:{{{titleAlign|center}}};font-weight:bold;">{{{title}}}</div><div style="margin:0.25rem;border-radius:calc({{{corner|0.5}}}rem / 2);padding:0.25rem;background:{{{bodyBackgroundColour|#fffc}}};"> | <div style="display:flex;"><div style="max-width:{{{maxWidth|600}}}px;display:flex;flex-flow:column wrap;margin:0.5rem;border-radius:{{{corner|0.5}}}rem;background:{{{colour|linear-gradient(to bottom right,{{{topLeftColour|#c00}}},{{{middleColour|#703}}},{{{bottomRightColour|#307}}})}}};"><div style="padding-top:0.5rem;padding-bottom:0.25rem;color:{{{titleColour|#fff}}};text-align:{{{titleAlign|center}}};font-weight:bold;">{{{title}}}</div><div style="margin:0.25rem;border-radius:calc({{{corner|0.5}}}rem / 2);padding:0.25rem;background:{{{bodyBackgroundColour|#fffc}}};">{{{body}}}</div></div></div><noinclude> | ||
{{{body}}} | |||
</div></div><noinclude> | To insert this info box template into a BGA wiki page, simply type <code><nowiki>{{infoBox}}</nowiki></code> when editing the page. | ||
To insert this info box template into a BGA wiki page, simply type <code><nowiki>{{infoBox}}</nowiki></code> | |||
== Available parameters == | == Available parameters == | ||
Line 24: | Line 23: | ||
<div><b><i>Optional:</i></b> specify the maximum width of the infoBox in px units.</div> | <div><b><i>Optional:</i></b> specify the maximum width of the infoBox in px units.</div> | ||
<div><code>topLeftColour</code></div> | <div><code>topLeftColour</code></div> | ||
<div><code># | <div><code>#c00</code></div> | ||
<div><code><nowiki>{{infoBox |topLeftColour=red}}</nowiki></code></div> | <div><code><nowiki>{{infoBox |topLeftColour=red}}</nowiki></code></div> | ||
<div><b><i>Optional:</i></b> specify the top left corner colour gradient of the infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | <div><b><i>Optional:</i></b> specify the top left corner colour gradient of the infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | ||
<div><code>middleColour</code></div> | <div><code>middleColour</code></div> | ||
<div><code># | <div><code>#703</code></div> | ||
<div><code><nowiki>{{infoBox |middleColour=green}}</nowiki></code></div> | <div><code><nowiki>{{infoBox |middleColour=green}}</nowiki></code></div> | ||
<div><b><i>Optional:</i></b> specify the middle colour gradient of the infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | <div><b><i>Optional:</i></b> specify the middle colour gradient of the infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | ||
<div><code>bottomRightColour</code></div> | <div><code>bottomRightColour</code></div> | ||
<div><code># | <div><code>#307</code></div> | ||
<div><code><nowiki>{{infoBox |bottomRightColour=blue}}</nowiki></code></div> | <div><code><nowiki>{{infoBox |bottomRightColour=blue}}</nowiki></code></div> | ||
<div><b><i>Optional:</i></b> specify the bottom right corner colour gradient of the infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | <div><b><i>Optional:</i></b> specify the bottom right corner colour gradient of the infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | ||
Line 46: | Line 45: | ||
<div><code>0.5</code></div> | <div><code>0.5</code></div> | ||
<div><code><nowiki>{{infoBox |corner=1}}</nowiki></code></div> | <div><code><nowiki>{{infoBox |corner=1}}</nowiki></code></div> | ||
<div><b><i>Optional:</i></b> specify the corner radius of the infoBox in rem units.</div> | |||
</div> | |||
---- | |||
{{infoBoxes}} | |||
To insert a pair of info boxes into a BGA wiki page, simply type <code><nowiki>{{infoBoxes}}</nowiki></code> when editing the page. | |||
== Available parameters == | |||
<div style="display:grid;grid-template-columns:repeat(4,max-content);gap:1rem;overflow:hidden;text-overflow:ellipsis;"> | |||
<div style="font-weight:bold;width:8rem;">Parameter</div> | |||
<div style="font-weight:bold;width:8rem;">Default value</div> | |||
<div style="font-weight:bold;width:8rem;">Example</div> | |||
<div style="font-weight:bold;width:8rem;">Description</div> | |||
<div><code>title<b>#</b></code></div> | |||
<div><code>null</code></div> | |||
<div><code><nowiki>{{infoBoxes |title2=Your title text}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify a title for the infoBox.</div> | |||
<div><code>body<b>#</b></code></div> | |||
<div><code>null</code></div> | |||
<div><code><nowiki>{{infoBoxes |body2=Your body content}}</nowiki></code>.</div> | |||
<div><b><i>Optional:</i></b> specify any body content.</div> | |||
<div><code>maxWidth</code></div> | |||
<div><code>600</code></div> | |||
<div><code><nowiki>{{infoBoxes |maxWidth=400}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the maximum width of the infoBox in px units.</div> | |||
<div><code>colour1</code></div> | |||
<div><code>#c00</code></div> | |||
<div><code><nowiki>{{infoBoxes |colour1=red}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the top left corner colour of the first infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | |||
<div><code>colour2</code></div> | |||
<div><code>#703</code></div> | |||
<div><code><nowiki>{{infoBoxes |colour2=green}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the top left colour of the second infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | |||
<div><code>colour3</code></div> | |||
<div><code>#307</code></div> | |||
<div><code><nowiki>{{infoBoxes |colour3=blue}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the middle colour of the second infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | |||
<div><code>colour4</code></div> | |||
<div><code>#00c</code></div> | |||
<div><code><nowiki>{{infoBoxes |colour4=purple}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the bottom right corner colour of the second infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | |||
<div><code>title<b>#</b>Colour</code></div> | |||
<div><code>#fff</code></div> | |||
<div><code><nowiki>{{infoBoxes |title2Colour=black}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the title text colour as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | |||
<div><code>title<b>#</b>Align</code></div> | |||
<div><code>center</code></div> | |||
<div><code><nowiki>{{infoBoxes |title2Align=left}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the title text alignment as <code>left</code> or <code>right</code>.</div> | |||
<div><code>corner</code></div> | |||
<div><code>0.5</code></div> | |||
<div><code><nowiki>{{infoBoxes |corner=1}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the corner radius of the infoBox in rem units.</div> | |||
</div> | |||
---- | |||
{{infoBoxes3}} | |||
To insert three info boxes into a BGA wiki page, simply type <code><nowiki>{{infoBoxes3}}</nowiki></code> when editing the page. | |||
== Available parameters == | |||
<div style="display:grid;grid-template-columns:repeat(4,max-content);gap:1rem;overflow:hidden;text-overflow:ellipsis;"> | |||
<div style="font-weight:bold;width:8rem;">Parameter</div> | |||
<div style="font-weight:bold;width:8rem;">Default value</div> | |||
<div style="font-weight:bold;width:8rem;">Example</div> | |||
<div style="font-weight:bold;width:8rem;">Description</div> | |||
<div><code>title<b>#</b></code></div> | |||
<div><code>null</code></div> | |||
<div><code><nowiki>{{infoBoxes3 |title3=Your title text}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify a title for the infoBox.</div> | |||
<div><code>body<b>#</b></code></div> | |||
<div><code>null</code></div> | |||
<div><code><nowiki>{{infoBoxes3 |body3=Your body content}}</nowiki></code>.</div> | |||
<div><b><i>Optional:</i></b> specify any body content.</div> | |||
<div><code>maxWidth</code></div> | |||
<div><code>600</code></div> | |||
<div><code><nowiki>{{infoBoxes3 |maxWidth=400}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the maximum width of the infoBox in px units.</div> | |||
<div><code>colour1</code></div> | |||
<div><code>#c00</code></div> | |||
<div><code><nowiki>{{infoBoxes3 |colour1=red}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the top left corner colour of the first infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | |||
<div><code>colour2</code></div> | |||
<div><code>#703</code></div> | |||
<div><code><nowiki>{{infoBoxes3 |colour2=green}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the top left colour of the second infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | |||
<div><code>colour3</code></div> | |||
<div><code>#307</code></div> | |||
<div><code><nowiki>{{infoBoxes3 |colour3=blue}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the top left corner colour of the third infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | |||
<div><code>colour4</code></div> | |||
<div><code>#00c</code></div> | |||
<div><code><nowiki>{{infoBoxes3 |colour4=purple}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the middle colour of the third infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | |||
<div><code>colour5</code></div> | |||
<div><code>#037</code></div> | |||
<div><code><nowiki>{{infoBoxes3 |colour5=red}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the bottom right corner colour of the third infoBox as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | |||
<div><code>title<b>#</b>Colour</code></div> | |||
<div><code>#fff</code></div> | |||
<div><code><nowiki>{{infoBoxes3 |title3Colour=black}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the title text colour as a [https://developer.mozilla.org/en-US/docs/Web/CSS/color CSS colour] e.g. <code>blue</code>.</div> | |||
<div><code>title<b>#</b>Align</code></div> | |||
<div><code>center</code></div> | |||
<div><code><nowiki>{{infoBoxes3 |title3Align=left}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the title text alignment as <code>left</code> or <code>right</code>.</div> | |||
<div><code>corner</code></div> | |||
<div><code>0.5</code></div> | |||
<div><code><nowiki>{{infoBoxes3 |corner=1}}</nowiki></code></div> | |||
<div><b><i>Optional:</i></b> specify the corner radius of the infoBox in rem units.</div> | <div><b><i>Optional:</i></b> specify the corner radius of the infoBox in rem units.</div> | ||
</div> | </div> | ||
</noinclude> | </noinclude> |
Revision as of 00:53, 27 April 2022
{{{title}}}
{{{body}}}
To insert this info box template into a BGA wiki page, simply type {{infoBox}}
when editing the page.
Available parameters
{{{title1}}}
{{{body1}}}
{{{title2}}}
{{{body2}}}
To insert a pair of info boxes into a BGA wiki page, simply type {{infoBoxes}}
when editing the page.
Available parameters
{{{title1}}}
{{{body1}}}
{{{title2}}}
{{{body2}}}
{{{title3}}}
{{{body3}}}
To insert three info boxes into a BGA wiki page, simply type {{infoBoxes3}}
when editing the page.
Available parameters