Template:PortalButton/Documentation

Documentation
 This template is in Alpha-testing. See testcases for latest developments. The Portal Button template is designed to provide a rounded-edge wrapper for intra-wiki linked images; giving the appearance of a 'button' to users. Utilisation of purpose-made graphics can add further semantic meaning. The wrapper incorporates the CSS overflow:hidden attribute, which in combination with the width attribute will crudely 'crop' images. Normal image sizing syntax is optional but will be overidden horizontally by the value in the |width parameter.

Parameters
|width= (Div width, default is 25%) |float= (left or right, default none) |background-c= (color, default #efefef) |border-w= (Border width, default 2px) |border-t= (Border type, default solid) |border-c= (Border color, default #efefef) |border-r= (Border radius, default 20px) |margin= (Margin around div, default 5px) |overflow= (Overflow, default hidden) |image= (File name, default PButton2.jpg) |image-t= (Type, default frameless) |alt= (Description of image or target) |link= (Target, default Portal:Contents/) |image-s= (Image size; pair with |Width) |text-c= (Font color, default #FFFF) |font-wt= (Font weight, default none, options are  and  .) |text= (Add text below image, centered)

 To transclude the template, copy and paste the following text:  Be sure to remove any parameters you don't fill, otherwise rendering will be affected.  Multiple buttons:

For instances where multiple buttons are required to sit together, there exists an extra set of parameters.

These are not enabled by default. If using multiple buttons, enable these parameters using.

This will activate the default values for  and.  The full list of extra parameters: |multi= (default empty) |display= (default is inline-block) |adjust= (sets relative positioning, default 5%)  To create an inline-block grid:  Just place PortalButton templates directly below each other in the markup.  Example:

Individual button examples
   Geography  Religion

TemplateData
{	"params": { "multi": {}, "adjust": {}, "width": {}, "float": {}, "background-c": {}, "border-w": {}, "border-t": {}, "border-c": {}, "border-r": {}, "margin": {}, "overflow": {}, "image": {}, "image-t": {}, "link": {}, "image-s": {}, "text-c": {}, "font-wt": {}, "text": {}, "spacer": {}, "extextmargin": {}, "extext": {} },	"description": "Template to present portal links as buttons", "format": "inline" }