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
(remove whitespace)
(reduce the vertical spacing on the title bar)
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:1rem;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="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="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}}}
{{{body}}}
</div></div><noinclude>
</div></div><noinclude>

Revision as of 16:01, 9 April 2022

{{{title}}}

{{{body}}}

To insert this info box template into a BGA wiki page, simply type {{infoBox}} (or {{infoBoxes}} for a pair of info boxes) when editing the page.

Available parameters

Parameter
Default value
Example
Description
title
null
{{infoBox |title=Your title text}}
Optional: specify a title for the infoBox.
body
null
{{infoBox |body=Your body content}}.
Optional: specify any body content.
maxWidth
600
{{infoBox |maxWidth=400}}
Optional: specify the maximum width of the infoBox in px units.
topLeftColour
#c30
{{infoBox |topLeftColour=red}}
Optional: specify the top left corner colour gradient of the infoBox as a CSS colour e.g. blue.
middleColour
#707
{{infoBox |middleColour=green}}
Optional: specify the middle colour gradient of the infoBox as a CSS colour e.g. blue.
bottomRightColour
#70c
{{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.
corner
0.5
{{infoBox |corner=1}}
Optional: specify the corner radius of the infoBox in rem units.