Difference between revisions of "Хев:Ordered list/doc"

Айдать на коробушку Айдать на сыскальник
Content deleted Content added
No edit summary
Tags: Mobile edit Mobile web edit
No edit summary
Tags: Mobile edit Mobile web edit
 
Line 1: Line 1:
{{docpage}}
{{onLua|List}}
{{днш|ol}}

== Syntax ==
== Syntax ==
;Simple:<code><nowiki>{{</nowiki>Ordered list |''entry1'' |''entry2''| ... <nowiki>}}</nowiki></code>
;Simple
: <code><nowiki>{{</nowiki>Ordered list |''entry1'' |''entry2''&nbsp;... }}</code>
;Offset starting value:<code><nowiki>{{</nowiki>Ordered list |start=''start''|''entry1'' |''entry2'' |... |item1_style=''CSS1'' |item2_style=''CSS2''| ... <nowiki>}}</nowiki></code>
;Changing the symbol style:<code><nowiki>{{</nowiki>Ordered list |list_style_type=''type'' |''entry1'' |''entry2'' |... <nowiki>}}</nowiki></code>
;Offset starting value
: <code><nowiki>{{</nowiki>Ordered list |start=''start''|''entry1'' |''entry2'' ... |item1_style=''CSS1'' |item2_style=''CSS2'' ... }}</code>
;With CSS style:<code><nowiki>{{</nowiki>Ordered list |item_style=''CSS-all'' |''entry1'' |''entry2'' |... <nowiki>}}</nowiki></code>
;With separate CSS styles for each item:<code><nowiki>{{</nowiki>Ordered list |''entry1'' |item1_style=''CSS1'' |''entry2'' |item2_style=''CSS2'' |... <nowiki>}}</nowiki></code>
;Changing the symbol style
: <code><nowiki>{{</nowiki>Ordered list |list_style_type=''type'' |''entry1'' |''entry2'' ... }}</code>
;With custom values for each item:<code><nowiki>{{</nowiki>Ordered list |item1_value=''value1'' |''entry1'' |item2_value=''value2'' |''entry2'' |... <nowiki>}}</nowiki></code>
;With CSS style
: <code><nowiki>{{</nowiki>Ordered list |item_style=''CSS-all'' |''entry1'' |''entry2'' ... }}</code>
;With separate CSS styles for each item
: <code><nowiki>{{</nowiki>Ordered list |''entry1'' |item1_style=''CSS1'' |''entry2'' |item2_style=''CSS2'' ... }}</code>
;With custom values for each item
: <code><nowiki>{{</nowiki>Ordered list |item1_value=''value1'' |''entry1'' |item2_value=''value2'' |''entry2'' ... }}</code>


{| class="wikitable"
{| class="wikitable"
Line 22: Line 12:
! Parameter !! Description
! Parameter !! Description
|-
|-
| <code>list_style_type</code> or<br /><code>type</code>
| type
| This parameter indicates the list style type. Popular acceptable parameters include:
| This parameter indicates the list style type. Popular acceptable parameters include:


Line 30: Line 20:
* <code>lower-alpha (a, b, c, d, ...)</code>
* <code>lower-alpha (a, b, c, d, ...)</code>
* <code>upper-alpha (A, B, C, D, ...)</code>
* <code>upper-alpha (A, B, C, D, ...)</code>
For a full list, see the [https://developer.mozilla.org/en-US/docs/Web/CSS/list-style-type#values documentation at MDN Web Docs].

For a full list, see the following section.
|-
|-
| Positional parameters
| start
{{nowrap|entry1 entry2 ...}}
| The number for the first item, formatted as a positive integer (default is 1)
| The contents of each list item, as unnamed or positional parameters. There is no restriction on content, except equal signs (=) must be escaped or replaced with <code><nowiki>{{=}}</nowiki></code>, lest it will be interpreted a named parameter.
|-
|-
| <code>item''n''_value</code>
| {{nowrap|entry1 entry2 ...}}
{{nowrap|value1 value2 ...}}
| These unnamed parameters are individual list items that appear as separate lines. They can be words or full sentences. However, all instance of equal sign (=) must be replaced with «<nowiki>{{=}}</nowiki>»; otherwise, the affected line will not appear.
| Ordinal or label for a specific list item; a positive integer.
|-
|-
| <code>start</code>
| {{nowrap|value1 value2 ...}}
| Value for list items, formatted as a positive integer
| Ordinal or label for the first item in the list; a positive integer (default is 1).
|-
|-
| <code>item''n''_style</code>
| {{nowrap|CSS1 CSS2 ...}}
{{nowrap|CSS1 CSS2 ...}}
| Standard [[Cascading Style Sheet]] (CSS) styles that change the look of each line. (User must know CSS syntax.)
| [[Cascading Style Sheet]] (CSS) styles that are set on a specific list item. (User must know CSS syntax.) For example, individual labels can be hidden by setting <code>item''n''_style=list-style-type:none;</code>
|-
|-
| <code>item_style</code>
| CSS-all
CSS-all
| Standard CSS styles that change the look of all entries. (User must know CSS syntax.) When present, ''CSS1'' through ''CSS5'' are disregarded.
| CSS styles that are set on each list item. (User must know CSS syntax.) When present, any <code>item''n''_style</code> are disregarded.
|}
|}

<includeonly>
== References ==
</includeonly>
{{Reflist}}

<includeonly>{{Sandbox other||
<!-- Categories and interwikis go here: -->
[[Category:List formatting and function templates]]
}}</includeonly>
<templatedata>
{
"params": {
"1": {
"required": true,
"label": "First item to list"
},
"2": {
"label": "Second item to list"
},
"3": {
"label": "Third item to list"
},
"4": {
"label": "Fourth item to list"
},
"5": {
"label": "Fifth item to list"
},
"6": {
"label": "Sixth item to list"
},
"7": {
"label": "Seventh item to list"
},
"8": {
"label": "Eighth item to list"
},
"9": {
"label": "Ninth item to list"
},
"10": {
"label": "Tenth item to list"
},
"list_style_type": {
"aliases": [ "type" ],
"suggestedvalues": [
"none",
"disc",
"circle",
"square",
"decimal",
"decimal-leading-zero",
"lower-roman",
"upper-roman",
"lower-alpha",
"lower-latin",
"upper-alpha",
"upper-latin",
"lower-greek",
"armenian",
"georgian",
"hebrew",
"ethiopic-numeric",
"cjk-decimal",
"cjk-ideographic",
"hiragana",
"katakana",
"hiragana-iroha",
"katakana-iroha",
"korean-hangul-formal"
],
"default": "decimal",
"label": "Type of list"
},
"start": {
"label": "Starting value"
},
"item_style": {
"label": "CSS style"
}
},
"description": "Make an ordered list. The default is a numbered list, but you can change it to a list with roman numbers or letters of the English, Greek, Armenian or Georgian alphabets, instead of the decimal enumerator.",
"format": "block",
"paramOrder": [
"1",
"2",
"3",
"4",
"5",
"6",
"7",
"8",
"9",
"10",
"list_style_type",
"start",
"item_style"
]
}
</templatedata>