Template:Userbox: Difference between revisions
Herbythyme (talk | contribs) m Reverted changes by Veysel Aral (talk) to last version by Trần Nguyễn Minh Huy |
TheresNoTime (talk | contribs) m 120 revisions imported from w:Template:Userbox |
||
(26 intermediate revisions by 15 users not shown) | |||
Line 1: | Line 1: | ||
<onlyinclude>{{#invoke:userbox|userbox}}</onlyinclude> |
|||
<div style="float:{{{float|left}}}; border:{{{border-s|1}}}px solid {{{1|{{{border-c|{{{id-c|#999}}}}}}}}}; margin:1px; {{{css-box|}}}"> |
|||
{{Documentation}} |
|||
{| cellspacing="0" style="width:238px; background:{{{2|{{{info-c|#EEE}}}}}};" |
|||
<!-- Add categories to the /doc subpage and interwikis in Wikidata, not here! --> |
|||
| style="width:45px; height:45px; background:{{{1|{{{id-c|#DDD}}}}}}; text-align:center; font-size:{{{5|{{{id-s|14}}}}}}pt; color:{{{id-fc|black}}};" | '''{{{3|{{{id|id}}}}}}''' |
|||
| style="font-size:{{{info-s|8}}}pt; padding:{{{info-p|4}}}pt; line-height:1.25em; color:{{{info-fc|#000}}};" | {{{4|{{{info|''info''}}}}}} |
|||
|}</div><noinclude><br clear="all"><br> |
|||
<pre> |
|||
{{Userbox |
|||
| border-s = <!-- border size --> |
|||
| border-c = <!-- border color --> |
|||
| info = <!-- main box text --> |
|||
| info-c = <!-- main box color --> |
|||
| info-s = <!-- main box font size --> |
|||
| info-fc = <!-- main box font color --> |
|||
| id = <!-- left box text or image --> |
|||
| id-c = <!-- left box background color --> |
|||
| id-s = <!-- left box font size --> |
|||
| id-p = <!-- left box padding --> |
|||
| id-fc = <!-- left box font color --> |
|||
| css-box = <!-- other css --> |
|||
}} |
|||
</pre> |
|||
[[Category:Infobox templates|Userbox]] |
|||
[[Category:Userboxes|*]] |
|||
</noinclude> |
Latest revision as of 06:16, 16 January 2022
{{{info}}} |
Uses Lua: |
Usage
{{Userbox | bodyclass = <!--Adds an HTML class attribute to the entire template's HTML table, to allow for styling, emission of microformats, etc.--> | border-c = <!--border color (default=id-c)--> | border-s = <!--border width in pixels (default=1)--> | float = <!--left|right|none (default=left)--> | id = <!--id image or text (standard height=x45px)--> | id-class = <!--Adds an HTML class attribute to the "id" HTML table cell, to allow for styling, emission of microformats, etc.--> | id-a = <!--id horizontal alignment left/center/right/justify (default=center)--> | id-c = <!--id background color (default=#d0d0d0)--> | id-fc = <!--id font color (default=black)--> | id-h = <!--id box height in pixels (default=45)--> | id-lh = <!--id line height (default=1.25em)--> | id-op = <!--id other CSS parameters--> | id-p = <!--id cell padding (default=0 1px 0 0)--> | id-s = <!--id text size in points (default=14)--> | id-w = <!--id box width in pixels (default=45)--> | info-class = <!--Adds an HTML class attribute to the "info" HTML table cell, to allow for styling, emission of microformats, etc.--> | info = <!--info text or image--> | info-a = <!--info horizontal alignment left/center/right/justify (default=left)--> | info-c = <!--info background color (default=#e0e0e0)--> | info-fc = <!--info font color (default=black)--> | info-lh = <!--info line height (default=1.25em)--> | info-op = <!--info other CSS parameters--> | info-p = <!--info padding (default=0 4px 0 4px)--> | info-s = <!--info text size in points (default=8)--> | usercategory = <!--user category (optional)--> | usercategory2 = <!--user category (optional)--> | usercategory3 = <!--user category (optional)--> | nocat = <!--block page category declarations; see [[w:WP:NOCAT]] (default=false)--> }}
- All parameters are optional
- Images should normally be scaled to x45px or less.
TemplateData
TemplateData for Userbox
This template can be used to quickly create a userbox for display on a user's user page without having to know HTML or Wikitable syntax.
Parameter | Description | Type | Status | |
---|---|---|---|---|
Body – Class Attribute | bodyclass | Adds an HTML class attribute to the entire template’s HTML table, to allow for styling, emission of microformats, etc. | String | optional |
Body – Border Color | border-c | border color
| String | optional |
Body – Border Width | border-s | border width in pixels
| Number | optional |
Body – Float | float | left|right|none
| String | optional |
ID | id | id image or text | Line | suggested |
ID – Class Attribute | id-class | Adds an HTML class attribute to the “id” HTML table cell, to allow for styling, emission of microformats, etc. | String | optional |
ID – Background Color | id-c | id background color
| String | optional |
ID – Text Color | id-fc | id font color
| String | optional |
ID – Box Height | id-h | id box height in pixels
| Number | optional |
ID – Box Width | id-w | id box width in pixels
| Number | optional |
ID – Padding | id-p | id cell padding
| String | optional |
ID – Text Size | id-s | id text size in points
| Number | optional |
ID – CSS line-height | id-lh | id line height
| String | optional |
ID – Horizontal Alignment | id-a | id horizontal alignment left/center/right/justify
| String | optional |
ID – Other CSS Parameters | id-op | id other CSS parameters | String | optional |
Info | info | info text or image | Content | required |
Info – Class Attribute | info-class | Adds an HTML class attribute to the “info” HTML table cell, to allow for styling, emission of microformats, etc. | String | optional |
Info – Background Color | info-c | info background color
| String | optional |
Info – Text Color | info-fc | info font color
| String | optional |
Info – Padding | info-p | info padding
| String | optional |
Info – Text Size | info-s | info text size in points
| Number | optional |
Info – CSS line-height | info-lh | info line height
| String | optional |
Info – Horizontal Alignment | info-a | info horizontal alignment left/center/right/justify
| String | optional |
Info – Other CSS Parameters | info-op | info other CSS parameters | String | optional |
User Category 1 | usercategory | user category (optional) | String | optional |
User Category 2 | usercategory2 | user category (optional) | String | optional |
User Category 3 | usercategory3 | user category (optional) | String | optional |
No Category? | nocat | block page category declarations (see WP:NOCAT) | Boolean | optional |