This is a documentation for Board Game Arena: play board games online !

Template:InfoBox: Difference between revisions

From Board Game Arena
Jump to navigation Jump to search
(class="mw-collapsible" id="mw-customcollapsible-title" mw-{{{state|}}}, margins)
(class="mw-collapsible mw-{{{state|}}}" class="mw-collapsible-toggle" class="mw-collapsible-content")
Line 1: Line 1:
<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 class="mw-customtoggle-title" style="padding:0.5rem;color:{{{titleColour|#fff}}};text-align:{{{titleAlign|center}}};font-weight:bold;">{{{title}}}</div><div class="mw-collapsible mw-{{{state|}}}" id="mw-customcollapsible-title" style="margin:0 0.25rem 0.25rem;border-radius:calc({{{corner|0.5}}}rem / 2);padding:0.25rem;background:{{{bodyBackgroundColour|#fffc}}};">{{{body}}}</div></div></div><noinclude>
<div style="display:flex;"><div class="mw-collapsible mw-{{{state|}}}" 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 class="mw-collapsible-toggle" style="padding:0.5rem;color:{{{titleColour|#fff}}};text-align:{{{titleAlign|center}}};font-weight:bold;">{{{title}}}</div><div class="mw-collapsible-content" style="margin:0 0.25rem 0.25rem;border-radius:calc({{{corner|0.5}}}rem / 2);padding:0.25rem;background:{{{bodyBackgroundColour|#fffc}}};">{{{body}}}</div></div></div><noinclude>
 
{{infoBox |state=collapsed}}
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> when editing the page.


Line 21: Line 21:
   <div><code>null</code></div>
   <div><code>null</code></div>
   <div><code><nowiki>{{infoBox |state=collapsed}}</nowiki></code></div>
   <div><code><nowiki>{{infoBox |state=collapsed}}</nowiki></code></div>
   <div>'''''Optional:''''' collapse by default.</div>
   <div>'''''Optional:''''' collapsed by default.</div>
   <div><code>maxWidth</code></div>
   <div><code>maxWidth</code></div>
   <div><code>600</code></div>
   <div><code>600</code></div>
Line 74: Line 74:
   <div><code>null</code></div>
   <div><code>null</code></div>
   <div><code><nowiki>{{infoBoxes |state=collapsed}}</nowiki></code></div>
   <div><code><nowiki>{{infoBoxes |state=collapsed}}</nowiki></code></div>
   <div>'''''Optional:''''' collapse by default.</div>
   <div>'''''Optional:''''' collapsed by default.</div>
   <div><code>maxWidth</code></div>
   <div><code>maxWidth</code></div>
   <div><code>600</code></div>
   <div><code>600</code></div>
Line 132: Line 132:
   <div><code>null</code></div>
   <div><code>null</code></div>
   <div><code><nowiki>{{infoBoxes3 |state=collapsed}}</nowiki></code></div>
   <div><code><nowiki>{{infoBoxes3 |state=collapsed}}</nowiki></code></div>
   <div>'''''Optional:''''' collapse by default.</div>
   <div>'''''Optional:''''' collapsed by default.</div>
   <div><code>maxWidth</code></div>
   <div><code>maxWidth</code></div>
   <div><code>600</code></div>
   <div><code>600</code></div>

Revision as of 16:02, 26 October 2023

{{{title}}}
{{{body}}}
{{{title}}}
{{{body}}}

To insert this info box template into a BGA wiki page, simply type {{infoBox}} when editing the page.

Available parameters

Parameter
Default value
Example
Description
title
null
{{infoBox |title=Your title text}}
Optional: specify a title.
body
null
{{infoBox |body=Your body content}}
Optional: specify any body content.
state
null
{{infoBox |state=collapsed}}
Optional: collapsed by default.
maxWidth
600
{{infoBox |maxWidth=400}}
Optional: specify the maximum width in px units.
topLeftColour
#c00
{{infoBox |topLeftColour=red}}
Optional: specify the top left corner colour gradient of the infoBox as a CSS colour e.g. blue.
middleColour
#703
{{infoBox |middleColour=green}}
Optional: specify the middle colour gradient of the infoBox as a CSS colour e.g. blue.
bottomRightColour
#307
{{infoBox |bottomRightColour=blue}}
Optional: specify the bottom right corner colour gradient of the infoBox as a CSS colour e.g. blue.
titleColour
#fff
{{infoBox |titleColour=black}}
Optional: specify the title text colour as a CSS colour e.g. blue.
titleAlign
center
{{infoBox |titleAlign=left}}
Optional: specify the title text alignment as left or right.
corner
0.5
{{infoBox |corner=1}}
Optional: specify the corner radius in rem units.

{{{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

Parameter
Default value
Example
Description
title#
null
{{infoBoxes |title2=Your title text}}
Optional: specify a title.
body#
null
{{infoBoxes |body2=Your body content}}
Optional: specify any body content.
state
null
{{infoBoxes |state=collapsed}}
Optional: collapsed by default.
maxWidth
600
{{infoBoxes |maxWidth=400}}
Optional: specify the maximum width in px units.
colour1
#c00
{{infoBoxes |colour1=red}}
Optional: specify the top left corner colour of the first infoBox as a CSS colour e.g. blue.
colour2
#703
{{infoBoxes |colour2=green}}
Optional: specify the top left colour of the second infoBox as a CSS colour e.g. blue.
colour3
#307
{{infoBoxes |colour3=blue}}
Optional: specify the middle colour of the second infoBox as a CSS colour e.g. blue.
colour4
#00c
{{infoBoxes |colour4=purple}}
Optional: specify the bottom right corner colour of the second infoBox as a CSS colour e.g. blue.
title#Colour
#fff
{{infoBoxes |title2Colour=black}}
Optional: specify the title text colour as a CSS colour e.g. blue.
title#Align
center
{{infoBoxes |title2Align=left}}
Optional: specify the title text alignment as left or right.
corner
0.5
{{infoBoxes |corner=1}}
Optional: specify the corner radius in rem units.

{{{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

Parameter
Default value
Example
Description
title#
null
{{infoBoxes3 |title3=Your title text}}
Optional: specify a title.
body#
null
{{infoBoxes3 |body3=Your body content}}
Optional: specify any body content.
state
null
{{infoBoxes3 |state=collapsed}}
Optional: collapsed by default.
maxWidth
600
{{infoBoxes3 |maxWidth=400}}
Optional: specify the maximum width in px units.
colour1
#c00
{{infoBoxes3 |colour1=red}}
Optional: specify the top left corner colour of the first infoBox as a CSS colour e.g. blue.
colour2
#703
{{infoBoxes3 |colour2=green}}
Optional: specify the top left colour of the second infoBox as a CSS colour e.g. blue.
colour3
#307
{{infoBoxes3 |colour3=blue}}
Optional: specify the top left corner colour of the third infoBox as a CSS colour e.g. blue.
colour4
#00c
{{infoBoxes3 |colour4=purple}}
Optional: specify the middle colour of the third infoBox as a CSS colour e.g. blue.
colour5
#037
{{infoBoxes3 |colour5=red}}
Optional: specify the bottom right corner colour of the third infoBox as a CSS colour e.g. blue.
title#Colour
#fff
{{infoBoxes3 |title3Colour=black}}
Optional: specify the title text colour as a CSS colour e.g. blue.
title#Align
center
{{infoBoxes3 |title3Align=left}}
Optional: specify the title text alignment as left or right.
corner
0.5
{{infoBoxes3 |corner=1}}
Optional: specify the corner radius in rem units.