28,594
edits
(Created page with "{{Code from Wikipedia}} {{Uses TemplateStyles|Template:Hlist/styles.css}}") |
No edit summary |
||
| Line 1: | Line 1: | ||
{{Code from Wikipedia}} | {{Code from Wikipedia}} | ||
{{Uses TemplateStyles|Template:Hlist/styles.css}} | {{Uses TemplateStyles|Template:Hlist/styles.css}} | ||
This template provides a [[wikipedia:Web Content Accessibility Guidelines|WCAG]]/ISO-standards-compliant accessible alternative to comma- or dash- (or other single character-) separated lists, per [[wikipedia:Wikipedia:Manual_of_Style/Lists#Horizontal_lists|WP:FLATLIST]] and [[wikipedia:Wikipedia:Manual_of_Style/Accessibility#Horizontal_lists|MOS:HLIST]]. | |||
Lists output by {{tl|Flatlist}} and {{tl|Hlist}} are semantically and visually identical, and differ only in the wiki-markup used to create the lists. | |||
== Usage == | |||
{{tl|flatlist}} starts a horizontal list, such as: | |||
{{flatlist| | |||
* cat | |||
* dog | |||
* horse | |||
* cow | |||
* sheep | |||
* pig | |||
}} | |||
For navigation boxes using {{tl|navbox}}, one can set {{para|listclass|hlist}}, and achieve the same styling without using this template. For image captions, list (i.e. asterisk) markup does not work, so consider using {{tl|hlist}} instead. | |||
== Examples == | |||
<syntaxhighlight lang="wikitext"> | |||
{{flatlist| | |||
* cat | |||
* dog | |||
* horse | |||
* cow | |||
* sheep | |||
* pig | |||
}} | |||
</syntaxhighlight> | |||
produces: | |||
{{flatlist| | |||
* cat | |||
* dog | |||
* horse | |||
* cow | |||
* sheep | |||
* pig | |||
}} | |||
=== Syntax for ordered lists === | |||
<syntaxhighlight lang="wikitext"> | |||
{{flatlist| | |||
# first | |||
# second | |||
# third | |||
# fourth | |||
# fifth | |||
# sixth | |||
}} | |||
</syntaxhighlight> | |||
produces: | |||
{{flatlist| | |||
# first | |||
# second | |||
# third | |||
# fourth | |||
# fifth | |||
# sixth | |||
}} | |||
=== Using optional parameters === | |||
<syntaxhighlight lang="wikitext"> | |||
{{flatlist |indent=2 | |||
|style=border:solid 1px silver; background:lightyellow; | |||
|class=nowraplinks | | |||
*''[[Alone: The Home Recordings of Rivers Cuomo]]'' (2007) | |||
*''[[Alone II: The Home Recordings of Rivers Cuomo]]'' (2008) | |||
*''[[Not Alone: Rivers Cuomo & Friends Live at Fingerprints]]'' (2009) | |||
*''[[Alone III: The Pinkerton Years]]'' (2011) | |||
*''[[Alone IV: The Blue-Pinkerton Years]]'' (2020) | |||
*''[[Alone V: Before Weezer]]'' (2020) | |||
*''[[Alone VI: The Black Room]]'' (2020) | |||
*''[[Alone VII: The Green Years]]'' (2020) | |||
*''[[Alone VIII: The Maladroit Years]]'' (2020) | |||
*''[[Alone IX: The Make Believe Years]]'' (2020) | |||
*''[[Alone X: The Red-Raditude-Hurley Years]]''* (2020) | |||
*''[[Alone XI: The EWBAITE Years]]'' (2020) | |||
*''[[Alone XII: The White Year]]'' (2020) | |||
*''[[Alone XIII: The Pacific Daydream Black Years]]'' (2021) | |||
*''[[Alone XIV: The Pandemic Years]] | |||
}} | |||
</syntaxhighlight> | |||
produces: | |||
{{flatlist |indent=2 |style=border:solid 1px silver; background:lightyellow; |class=nowraplinks | | |||
*''[[Alone: The Home Recordings of Rivers Cuomo]]'' (2007) | |||
*''[[Alone II: The Home Recordings of Rivers Cuomo]]'' (2008) | |||
*''[[Not Alone: Rivers Cuomo & Friends Live at Fingerprints]]'' (2009) | |||
*''[[Alone III: The Pinkerton Years]]'' (2011) | |||
*''[[Alone IV: The Blue-Pinkerton Years]]'' (2020) | |||
*''[[Alone V: Before Weezer]]'' (2020) | |||
*''[[Alone VI: The Black Room]]'' (2020) | |||
*''[[Alone VII: The Green Years]]'' (2020) | |||
*''[[Alone VIII: The Maladroit Years]]'' (2020) | |||
*''[[Alone IX: The Make Believe Years]]'' (2020) | |||
*''[[Alone X: The Red-Raditude-Hurley Years]]''* (2020) | |||
*''[[Alone XI: The EWBAITE Years]]'' (2020) | |||
*''[[Alone XII: The White Year]]'' (2020) | |||
*''[[Alone XIII: The Pacific Daydream Black Years]]'' (2021) | |||
*''[[Alone XIV: The Pandemic Years]] | |||
}} | |||