Template:Userbox: Difference between revisions
From PWI Wiki
Jump to navigationJump to search
PWpedia>Sangodoc Created Userbox template |
PWpedia>Sangodoc Example fixes for readability, table fix |
||
| Line 75: | Line 75: | ||
| id = foo | | id = foo | ||
| id-s = 20 | | id-s = 20 | ||
| info = ''foo bar'' | | info = ''foo bar'' | ||
| info-s = 12 | | info-s = 12 | ||
| border-s = 2 | | border-s = 2 | ||
}}</pre> || {{userbox|id=foo|id-s=20 | }}</pre> || {{userbox|id=foo|id-s=20|info=''foo bar''|info-s=12|border-s=2}} | ||
|- | |- | ||
| colspan="2"| Below example shows the default appearance of a userbox, which is (much) higher than the 45px. Compare the height of the one below with the above userbox. | | colspan="2"| Below example shows the default appearance of a userbox, which is (much) higher than the 45px. Compare the height of the one below with the above userbox. | ||
| Line 87: | Line 84: | ||
| <pre>{{userbox | | <pre>{{userbox | ||
| id = foo logo | | id = foo logo | ||
| info = ''We are trying to see | | info = ''We are trying to see | ||
default distance in between text | default distance in between text | ||
| Line 93: | Line 89: | ||
between cell content and its border | between cell content and its border | ||
and also see total height.'' | and also see total height.'' | ||
| border-s = 2 | | border-s = 2 | ||
}}</pre> || {{userbox|id=foo logo | }}</pre> || {{userbox|id=foo logo|info=''We are trying to see default distance in between text lines, and, see the distance in between cell content and its border and also see total height.''|border-s=2}} | ||
|- | |- | ||
| colspan="2"| Below example shows how we can change that userbox and further specify parameters to bring down the overall height of the userbox to the recommended height of 45px, even with four text lines. Cell padding parameter "''info-p''" can also be set at "''1pt 1pt 1pt 2pt''", or "''1pt 2pt''" for better appearance, when there are 4 text lines. | | colspan="2"| Below example shows how we can change that userbox and further specify parameters to bring down the overall height of the userbox to the recommended height of 45px, even with four text lines. Cell padding parameter "''info-p''" can also be set at "''1pt 1pt 1pt 2pt''", or "''1pt 2pt''" for better appearance, when there are 4 text lines. | ||
| Line 103: | Line 97: | ||
| id = foo logo | | id = foo logo | ||
| id-s = 14 | | id-s = 14 | ||
| id-lh = 1.1em | | id-lh = 1.1em | ||
| info = ''We have specified values | | info = ''We have specified values | ||
| Line 109: | Line 102: | ||
text lines & padding space in between | text lines & padding space in between | ||
cell content and its border.'' | cell content and its border.'' | ||
| info-s = 8 | | info-s = 8 | ||
| info-p = 1pt | | info-p = 1pt | ||
| info-lh = 1.05em | | info-lh = 1.05em | ||
| border-s = 1 | | border-s = 1 | ||
}}</pre> || {{userbox|id=foo logo|id-s=14|id-lh=1.1em | }}</pre> || {{userbox|id=foo logo|id-s=14|id-lh=1.1em|info=''We have specified values to lessen the distance in between text lines & padding space in between cell content and its border.''|info-s=8|info-p=1pt|info-lh=1.05em|border-s=1}} | ||
|} | |||
</noinclude> | </noinclude> | ||
Revision as of 03:34, 25 March 2011
| id | info |
|---|
Documentation
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.
This is a slightly simplified and modified version of the Wikipedia Userbox template.
Usage
{{userbox
| float = <!--left|right|none (default = left)-->
| border-c = <!--border color (default = #b49b50)-->
| border-s = <!--border width in pixels (default = 1)-->
| id = <!--id image and/or text-->
| id-a = <!--id horizontal alignment left/center/right/justify (default = center)-->
| id-c = <!--id background color (default = #3D2B1F)-->
| id-fc = <!--id font color (default = #b49b50)-->
| id-s = <!--id text size in points (default = 14)-->
| id-p = <!--id cell padding (default = 0 1px 0 0)-->
| id-lh = <!--id line height (default = 1.25em)-->
| id-op = <!--id other CSS parameters-->
| id-w = <!--id box width in pixels (default = 45)-->
| id-h = <!--id box height in pixels (default = 45)-->
| info = <!--info text and/or image-->
| info-a = <!--info horizontal alignment left/center/right/justify (default = left)-->
| info-c = <!--info background color (default = #291a0e)-->
| info-fc = <!--info font color (default = #b49b50)-->
| info-s = <!--info text size in points (default = 8)-->
| info-p = <!--info padding (default = 0 4px 0 4px)-->
| info-lh = <!--info line height (default = 1.25em)-->
| info-op = <!--info other CSS parameters-->
}}
- All parameters are optional
- Images should normally be scaled to x45px or less.
Most HTML-based tables use only a handful of these attributes. The following subset can be used to quickly convert an HTML userbox into the format used here:
{{userbox
| border-c = <!--your border color-->
| id = <!--your icon or short text ID-->
| id-c = <!--background color for ID-->
| id-fc = <!--font color for ID-->
| info = <!--your text-->
| info-c = <!--background color for text-->
| info-fc = <!--font color for text-->
}}
Standard colors:
- Blue: #1e90ff
- Red: #b22222
- Orange: #f28500
- Yellow: #f4c430
- Purple: #9932cc
- Gold: #b49b50
Examples
| Code | Result | ||
|---|---|---|---|
{{userbox}} |
| ||
{{userbox
| id = foo
| id-s = 20
| info = ''foo bar''
| info-s = 12
| border-s = 2
}} |
| ||
| Below example shows the default appearance of a userbox, which is (much) higher than the 45px. Compare the height of the one below with the above userbox. | |||
{{userbox
| id = foo logo
| info = ''We are trying to see
default distance in between text
lines, and, see the distance in
between cell content and its border
and also see total height.''
| border-s = 2
}} |
| ||
| Below example shows how we can change that userbox and further specify parameters to bring down the overall height of the userbox to the recommended height of 45px, even with four text lines. Cell padding parameter "info-p" can also be set at "1pt 1pt 1pt 2pt", or "1pt 2pt" for better appearance, when there are 4 text lines. | |||
{{userbox
| id = foo logo
| id-s = 14
| id-lh = 1.1em
| info = ''We have specified values
to lessen the distance in between
text lines & padding space in between
cell content and its border.''
| info-s = 8
| info-p = 1pt
| info-lh = 1.05em
| border-s = 1
}} |
| ||