Կաղապար:Userbox/hy
id | ինֆո |
---|
Այս կաղապարի օգնությամբ կարելի է շտապ մասնակցի կաղապար (անգլ.՝ userbox - յուզերբոքս) ստեղծել առանց HTML-ի կամ Վիքի գծանշման որևէ իմացության:
Օգտագործում
{{userbox/hy | մարմնիդասակարգ (bodyclass) = <!-- Adds an HTML class attribute to the entire template's HTML table, to allow for styling, emission of microformats, etc. --> | դիրք (float) = <!--left|right|none (լռելյայն = left)--> | շրջանակի-գույն/շրջանակ-գ (border-c) = <!--շրջանակի գույն (լռելյայն = id-c)--> | շրջանակի-չափ/շրջանակ-չ (border-s) = <!--շրջանակի չափը փիքսելներում (լռելյայն = 1)--> | id (id) = <!--id տեքստ կամ պատկեր--> | id-ֆոնի-գույն/id-ֆգ (id-c) = <!--id ֆոնի գույն--> | id-տառատեսակների-գույն/id-տգ (id-fc) = <!--id տառատեսակների գույն--> | id-տեքստի-չափ/id-տչ (id-s) = <!--id տեքստի չափ--> | id-ավելորդ/id-ա (id-p) = <!--id ավելորդ էլեմենտի տարածություն --> | id-գծի-բարձրություն/id-գբ (id-lh) = <!--id գծի բարձրություն --> | id-ուրիշ-պարամետր/id-ուպ (id-op) = <!--id ուրիշ պարամետր (CSS)--> | id-լայնություն/id-լ (id-w) = <!--id կաղապարի լայնություն --> | id-բարձրություն/id-բ (id-h) = <!--id կաղապարի բարձրություն--> | ինֆո-դասակարգ (info-class) = <!-- Adds an HTML class attribute to the "info" HTML table-row, to allow for styling, emission of microformats, etc. --> | ինֆո (info) = <!--ինֆո տեքստ--> | ինֆո-ֆոնի-գույն/ինֆո-ֆգ (info-c) = <!--ինֆո ֆոնի գույնը --> | ինֆո-տառատեսակի-գույն/ինֆո-տգ (info-fc) = <!--ինֆո տառատեսակի գույնը--> | ինֆո-տեքստի-չափ/ինֆո-տչ (info-s) = <!--ինֆո տեքստի չափը--> | ինֆո-ավելորդ/ինֆո-ա (info-p) = <!--ինֆո ավելորդ (տարածություն շրջանակի (սահմանի) և բովանդակության մեջ տեղը)--> | ինֆո-գծի-բարձրություն/ինֆո-գբ (info-lh) = <!--ինֆո գծի բարձրությունը (կամ տարածությունը տեքսի գծերի մեջ տեղը)--> | ինֆո-ուրիշ-պարամետր/ինֆո-ուպ (info-op) = <!--ինֆո ուրիշ (CSS) պարամետր(մեր) --> | (nocat) = {{{nocat|}}}<!--when 'true', doesn't categorize the user--> | մասնակցիկատեգորիա = <!-- մասնակցի կատեգորիա (ոչ-պարտադիր)--> | մասնակցիկատեգորիա2 = <!-- մասնակցի կատեգորիա (ոչ-պարտադիր)--> | մասնակցիկատեգորիա3 = <!-- մասնակցի կատեգորիա (ոչ-պարտադիր)--> }}
- Ենթադրվում է, որ տեքստի չափը պիտի լինի points
- Բոլոր պարամետրներն էլ պարտադիր չեն:
Deprecated old syntax, for compatibility:
{{userbox/hy | գույն 1 | գույն 2 | id | ինֆո | id չափ }}
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/hy | շրջանակ-գ = | ինֆո-ֆգ = | id-ֆգ = | id-տգ = | id-տչ = | id = | ինֆո-տգ = | ինֆո-գբ = | ինֆո-տչ = | ինֆո = | nocat = {{{nocat|}}} | մասնակցիկատեգորիա = }}
Օրինակներ
Կոդ | Արդյունք | |||||
---|---|---|---|---|---|---|
{{userbox/hy}} |
| |||||
{{userbox/hy | id = foo | id-չ = 20 | id-գ = #ffffee | ինֆո = ''foo bar'' | ինֆո-c = #ffeeff | ինֆո-s = 12 | շրջանակ-գ = #aaffaa | շրջանակ-չ = 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/hy | id = foo logo | id-c = #ffffee | ինֆո = ''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.'' | info-c = #ffeeff | շրջանակ-գ = #aaffaa | շրջանակ-չ = 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/hy | id = foo logo | id-s = 14 | id-c = #ffffee | id-lh = 1.1em | ինֆո = ''We have specified values to lessen the distance in between text lines & padding space in between cell content and its border.'' | ինֆո-c = #ffeeff | ինֆո-s = 8 | ինֆո-p = 1pt | ինֆո-lh = 1.05em | շրջանակ-գ = #aaffaa | շրջանակ-չ = 1 }} |
| |||||
Below example is for advanced users, showing how we can specify other CSS properties, for example, "font-family", to change the font or "text-align" to change the alignment from the default parameters. At below, on the right side are two userboxes: top one is displayed without the "font-family" or "text-align" parameters; and the bottom userbox is displayed by using the below codes, with the help of the "info-op" field. | ||||||
{{userbox/hy | id = foo logo | id-չ = 14 | id-գ = #ffe | id-գբ = 1.1em | ինֆո = foo bar | ինֆո-c = #fef | ինֆո-s = 14 | ինֆո-op = font-family:'Courier New'; text-align:center; | շրջանակ-գ = #afa | շրջանակ-չ = 2 }} |
|
Միկրոֆորմատներ
- մարմնիդասակարգ (bodyclass)՝ This parameter is inserted into the "class" attribute for the userbox as a whole.
- ինֆո-դասակարգ (info-class)՝ This parameter is inserted into the "class" attribute for the info component.
This template supports the addition of microformat information. This is done by adding "class" attributes to various data cells, indicating what kind of information is contained within. To flag a userbox as containing hCard information about a person, for example, add the following parameter:
|մարմնիդասակարգ = vcard
or
|ինֆո-դասակարգ = vcard
then (օրինակ)՝
|title = …the books of <span class="fn">[[Iain Banks]]</span>
...and so forth.
Examples include:
- Կաղապար:Tlu - անձ
{{User Microformats}}
- խումբ (Վիքինախագիծ:Միկրոֆորմատներ){{User Brum}}
- վայր (Բիրմինգհամ)
Տես՝ Վիքիպեդիա:Նախագիծ Միկրոֆորմատներ for more information on adding microformat information to Wikipedia.