Template:PortalButton
| This page is currently inactive and is retained for historical reference. Either the page is no longer relevant or consensus on its purpose has become unclear. To revive discussion, seek broader input via a forum such as the village pump. |
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 overridden 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 bold and italics.)
|text= (Add text below image, centered)
To transclude the template, copy and paste the following text:
{{PortalButton
|width=
|float=
|background-c
|border-w=
|border-t
|border-c=
|border-r=
|margin=
|overflow=
|image=
|link=
|image-s=
|text-c=
|font-wt=
|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 |multi=yes.
This will activate the default values for |display= and |adjust=.
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:
{{PortalButton}}
{{PortalButton}}
{{PortalButton}}
{{PortalButton}}
{{PortalButton}}
{{PortalButton}}
Individual button examples
TemplateData
Template to present portal links as buttons
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| multi | multi | no description | Unknown | optional |
| adjust | adjust | no description | Unknown | optional |
| width | width | no description | Unknown | optional |
| float | float | no description | Unknown | optional |
| background-c | background-c | no description | Unknown | optional |
| border-w | border-w | no description | Unknown | optional |
| border-t | border-t | no description | Unknown | optional |
| border-c | border-c | no description | Unknown | optional |
| border-r | border-r | no description | Unknown | optional |
| margin | margin | no description | Unknown | optional |
| overflow | overflow | no description | Unknown | optional |
| image | image | no description | Unknown | optional |
| image-t | image-t | no description | Unknown | optional |
| link | link | no description | Unknown | optional |
| image-s | image-s | no description | Unknown | optional |
| text-c | text-c | no description | Unknown | optional |
| font-wt | font-wt | no description | Unknown | optional |
| text | text | no description | Unknown | optional |
| spacer | spacer | no description | Unknown | optional |
| extextmargin | extextmargin | no description | Unknown | optional |
| extext | extext | no description | Unknown | optional |
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.
