Template:Plainlist: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
(Mock up an old school plainlist template using iterative parser functions, to be replaced with a Lua module when Scribunto extension is finally added to Kodi Wiki)
 
(Syntax refinements)
 
Line 1: Line 1:
<div{{#if:{{{class|}}}|<nowiki /> class="{{{class}}}"}}{{#if:{{{style|}}}|<nowiki /> style="{{{style}}}"}}><!-- div wrapper created, begin list construction with ul tag
<div {{#if:{{{class|}}}|class="{{{class}}}"}} {{#if:{{{style|}}}|style="{{{style}}}"}}><!-- div wrapper created, begin list construction with ul tag
  --><ul style="line-height: inherit; list-style: none; margin: 0; {{#if:{{{indent-all|}}}{{{indent-wrap|}}}|margin-left: {{#expr:{{{indent|{{{in|1}}}}}}*((1+sqrt5)/2)round2}}em;}} padding: 0; {{#if:{{{indent-wrap|}}}|text-indent: -{{#expr:{{{indent|{{{in|1}}}}}}*((1+sqrt5)/2)round2}}em;}}{{{list-style|}}}"><!-- list constructed, format mandatory initial list item
  --><ul style="line-height: inherit; list-style: none; margin: 0; {{#if:{{{indent-all|}}}{{{indent-wrap|}}}|margin-left: {{#expr:{{{indent|{{{in|1}}}}}}*((1+sqrt5)/2)round2}}em;}} padding: 0; {{#if:{{{indent-wrap|}}}|text-indent: -{{#expr:{{{indent|{{{in|1}}}}}}*((1+sqrt5)/2)round2}}em;}}{{{list-style|}}}"><!-- list constructed, format mandatory initial list item
     --><li style="margin: 0; {{#ifeq:{{{indent-wrap|}}}||display: inline;}}{{{item-style|}}}{{{item-style1|}}}">{{{1|<noinclude>Plain list item • item 2…</noinclude><includeonly>'''ERROR:''' ''This list template requires at least one item supplied as an unnamed parameter.''</includeonly>}}}</li><!-- initial list item added, test for presence of more list items
     --><li style="margin: 0; {{#ifeq:{{{indent-wrap|}}}||display: inline;}}{{{item-style|}}}{{{item1-style|}}}">{{{1|<noinclude>Plain list item • item 2…</noinclude><includeonly>'''ERROR:''' ''This list template requires at least one item supplied as an unnamed parameter.''</includeonly>}}}</li><!-- initial list item added, test for presence of more list items
         -->{{#if:{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}{{{7|}}}{{{8|}}}{{{9|}}}{{{10|}}}{{{11|}}}{{{12|}}}{{{13|}}}{{{14|}}}{{{15|}}}{{{16|}}}{{{17|}}}{{{18|}}}{{{19|}}}{{{20|}}}{{{21|}}}{{{22|}}}{{{23|}}}{{{24|}}}{{{25|}}}{{{26|}}}{{{27|}}}{{{28|}}}{{{29|}}}{{{30|}}}{{{31|}}}{{{32|}}}{{{33|}}}{{{34|}}}{{{35|}}}{{{36|}}}{{{37|}}}{{{38|}}}{{{39|}}}{{{40|}}}{{{41|}}}{{{42|}}}{{{43|}}}{{{44|}}}{{{45|}}}{{{46|}}}{{{47|}}}{{{48|}}}{{{49|}}}{{{50|}}}{{{51|}}}{{{52|}}}{{{53|}}}{{{54|}}}{{{55|}}}{{{56|}}}{{{57|}}}{{{58|}}}{{{59|}}}{{{60|}}}<!-- if at least one is found, proceed to test individually -->
         -->{{#if:{{{2|}}}{{{3|}}}{{{4|}}}{{{5|}}}{{{6|}}}{{{7|}}}{{{8|}}}{{{9|}}}{{{10|}}}{{{11|}}}{{{12|}}}{{{13|}}}{{{14|}}}{{{15|}}}{{{16|}}}{{{17|}}}{{{18|}}}{{{19|}}}{{{20|}}}{{{21|}}}{{{22|}}}{{{23|}}}{{{24|}}}{{{25|}}}{{{26|}}}{{{27|}}}{{{28|}}}{{{29|}}}{{{30|}}}{{{31|}}}{{{32|}}}{{{33|}}}{{{34|}}}{{{35|}}}{{{36|}}}{{{37|}}}{{{38|}}}{{{39|}}}{{{40|}}}{{{41|}}}{{{42|}}}{{{43|}}}{{{44|}}}{{{45|}}}{{{46|}}}{{{47|}}}{{{48|}}}{{{49|}}}{{{50|}}}{{{51|}}}{{{52|}}}{{{53|}}}{{{54|}}}{{{55|}}}{{{56|}}}{{{57|}}}{{{58|}}}{{{59|}}}{{{60|}}}<!-- if at least one is found, proceed to test individually -->
     |{{#if:{{{2|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style2|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{2}}}</li>}}<!--
     |{{#if:{{{2|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item2-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{2}}}</li>}}<!--
   -->{{#if:{{{3|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style3|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{3}}}</li>}}<!--
   -->{{#if:{{{3|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item3-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{3}}}</li>}}<!--
   -->{{#if:{{{4|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style4|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{4}}}</li>}}<!--
   -->{{#if:{{{4|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item4-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{4}}}</li>}}<!--
   -->{{#if:{{{5|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style5|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{5}}}</li>}}<!--
   -->{{#if:{{{5|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item5-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{5}}}</li>}}<!--
   -->{{#if:{{{6|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style6|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{6}}}</li>}}<!--
   -->{{#if:{{{6|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item6-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{6}}}</li>}}<!--
   -->{{#if:{{{7|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style7|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{7}}}</li>}}<!--
   -->{{#if:{{{7|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item7-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{7}}}</li>}}<!--
   -->{{#if:{{{8|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style8|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{8}}}</li>}}<!--
   -->{{#if:{{{8|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item8-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{8}}}</li>}}<!--
   -->{{#if:{{{9|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style9|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{9}}}</li>}}<!--
   -->{{#if:{{{9|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item9-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{9}}}</li>}}<!--
-->{{#if:{{{10|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style10|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{10}}}</li>}}<!--
-->{{#if:{{{10|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item10-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{10}}}</li>}}<!--
-->{{#if:{{{11|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style11|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{11}}}</li>}}<!--
-->{{#if:{{{11|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item11-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{11}}}</li>}}<!--
-->{{#if:{{{12|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style12|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{12}}}</li>}}<!--
-->{{#if:{{{12|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item12-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{12}}}</li>}}<!--
-->{{#if:{{{13|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style13|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{13}}}</li>}}<!--
-->{{#if:{{{13|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item13-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{13}}}</li>}}<!--
-->{{#if:{{{14|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style14|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{14}}}</li>}}<!--
-->{{#if:{{{14|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item14-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{14}}}</li>}}<!--
-->{{#if:{{{15|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style15|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{15}}}</li>}}<!--
-->{{#if:{{{15|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item15-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{15}}}</li>}}<!--
-->{{#if:{{{16|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style16|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{16}}}</li>}}<!--
-->{{#if:{{{16|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item16-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{16}}}</li>}}<!--
-->{{#if:{{{17|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style17|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{17}}}</li>}}<!--
-->{{#if:{{{17|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item17-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{17}}}</li>}}<!--
-->{{#if:{{{18|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style18|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{18}}}</li>}}<!--
-->{{#if:{{{18|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item18-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{18}}}</li>}}<!--
-->{{#if:{{{19|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style19|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{19}}}</li>}}<!--
-->{{#if:{{{19|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item19-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{19}}}</li>}}<!--
-->{{#if:{{{20|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style20|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{20}}}</li>}}<!--
-->{{#if:{{{20|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item20-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{20}}}</li>}}<!--
-->{{#if:{{{21|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style21|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{21}}}</li>}}<!--
-->{{#if:{{{21|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item21-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{21}}}</li>}}<!--
-->{{#if:{{{22|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style22|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{22}}}</li>}}<!--
-->{{#if:{{{22|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item22-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{22}}}</li>}}<!--
-->{{#if:{{{23|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style23|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{23}}}</li>}}<!--
-->{{#if:{{{23|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item23-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{23}}}</li>}}<!--
-->{{#if:{{{24|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style24|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{24}}}</li>}}<!--
-->{{#if:{{{24|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item24-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{24}}}</li>}}<!--
-->{{#if:{{{25|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style25|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{25}}}</li>}}<!--
-->{{#if:{{{25|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item25-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{25}}}</li>}}<!--
-->{{#if:{{{26|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style26|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{26}}}</li>}}<!--
-->{{#if:{{{26|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item26-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{26}}}</li>}}<!--
-->{{#if:{{{27|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style27|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{27}}}</li>}}<!--
-->{{#if:{{{27|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item27-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{27}}}</li>}}<!--
-->{{#if:{{{28|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style28|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{28}}}</li>}}<!--
-->{{#if:{{{28|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item28-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{28}}}</li>}}<!--
-->{{#if:{{{29|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style29|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{29}}}</li>}}<!--
-->{{#if:{{{29|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item29-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{29}}}</li>}}<!--
-->{{#if:{{{30|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style30|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{30}}}</li>}}<!--
-->{{#if:{{{30|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item30-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{30}}}</li>}}<!--
-->{{#if:{{{31|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style31|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{31}}}</li>}}<!--
-->{{#if:{{{31|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item31-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{31}}}</li>}}<!--
-->{{#if:{{{32|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style32|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{32}}}</li>}}<!--
-->{{#if:{{{32|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item32-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{32}}}</li>}}<!--
-->{{#if:{{{33|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style33|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{33}}}</li>}}<!--
-->{{#if:{{{33|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item33-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{33}}}</li>}}<!--
-->{{#if:{{{34|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style34|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{34}}}</li>}}<!--
-->{{#if:{{{34|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item34-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{34}}}</li>}}<!--
-->{{#if:{{{35|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style35|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{35}}}</li>}}<!--
-->{{#if:{{{35|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item35-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{35}}}</li>}}<!--
-->{{#if:{{{36|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style36|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{36}}}</li>}}<!--
-->{{#if:{{{36|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item36-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{36}}}</li>}}<!--
-->{{#if:{{{37|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style37|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{37}}}</li>}}<!--
-->{{#if:{{{37|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item37-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{37}}}</li>}}<!--
-->{{#if:{{{38|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style38|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{38}}}</li>}}<!--
-->{{#if:{{{38|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item38-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{38}}}</li>}}<!--
-->{{#if:{{{39|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style39|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{39}}}</li>}}<!--
-->{{#if:{{{39|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item39-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{39}}}</li>}}<!--
-->{{#if:{{{40|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style40|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{40}}}</li>}}<!--
-->{{#if:{{{40|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item40-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{40}}}</li>}}<!--
-->{{#if:{{{41|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style41|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{41}}}</li>}}<!--
-->{{#if:{{{41|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item41-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{41}}}</li>}}<!--
-->{{#if:{{{42|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style42|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{42}}}</li>}}<!--
-->{{#if:{{{42|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item42-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{42}}}</li>}}<!--
-->{{#if:{{{43|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style43|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{43}}}</li>}}<!--
-->{{#if:{{{43|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item43-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{43}}}</li>}}<!--
-->{{#if:{{{44|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style44|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{44}}}</li>}}<!--
-->{{#if:{{{44|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item44-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{44}}}</li>}}<!--
-->{{#if:{{{45|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style45|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{45}}}</li>}}<!--
-->{{#if:{{{45|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item45-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{45}}}</li>}}<!--
-->{{#if:{{{46|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style46|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{46}}}</li>}}<!--
-->{{#if:{{{46|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item46-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{46}}}</li>}}<!--
-->{{#if:{{{47|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style47|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{47}}}</li>}}<!--
-->{{#if:{{{47|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item47-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{47}}}</li>}}<!--
-->{{#if:{{{48|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style48|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{48}}}</li>}}<!--
-->{{#if:{{{48|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item48-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{48}}}</li>}}<!--
-->{{#if:{{{49|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style49|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{49}}}</li>}}<!--
-->{{#if:{{{49|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item49-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{49}}}</li>}}<!--
-->{{#if:{{{50|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style50|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{50}}}</li>}}<!--
-->{{#if:{{{50|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item50-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{50}}}</li>}}<!--
-->{{#if:{{{51|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style51|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{51}}}</li>}}<!--
-->{{#if:{{{51|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item51-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{51}}}</li>}}<!--
-->{{#if:{{{52|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style52|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{52}}}</li>}}<!--
-->{{#if:{{{52|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item52-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{52}}}</li>}}<!--
-->{{#if:{{{53|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style53|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{53}}}</li>}}<!--
-->{{#if:{{{53|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item53-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{53}}}</li>}}<!--
-->{{#if:{{{54|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style54|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{54}}}</li>}}<!--
-->{{#if:{{{54|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item54-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{54}}}</li>}}<!--
-->{{#if:{{{55|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style55|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{55}}}</li>}}<!--
-->{{#if:{{{55|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item55-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{55}}}</li>}}<!--
-->{{#if:{{{56|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style56|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{56}}}</li>}}<!--
-->{{#if:{{{56|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item56-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{56}}}</li>}}<!--
-->{{#if:{{{57|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style57|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{57}}}</li>}}<!--
-->{{#if:{{{57|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item57-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{57}}}</li>}}<!--
-->{{#if:{{{58|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style58|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{58}}}</li>}}<!--
-->{{#if:{{{58|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item58-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{58}}}</li>}}<!--
-->{{#if:{{{59|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style59|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{59}}}</li>}}<!--
-->{{#if:{{{59|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item59-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{59}}}</li>}}<!--
-->{{#if:{{{60|}}}|<li style="margin: 0;{{{item-style|}}}{{{item-style60|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;"> • <nowiki />|">}}{{{60}}}</li>}}<!--
-->{{#if:{{{60|}}}|&#32;•&#32;<li style="margin: 0;{{{item-style|}}}{{{item60-style|}}}{{#ifeq:{{{indent-wrap|}}}||display: inline;">|">}}{{{60}}}</li>}}<!--
   --></ul></div>}}<!-- list with multiple items is now well-constructed, proceed to terminate list correctly in the event of only one entry
   --></ul></div>}}<!-- list with multiple items is now well-constructed, proceed to terminate list correctly in the event of only one entry
       --></ul></div><noinclude>
       --></ul></div><noinclude>
{{Documentation}}</noinclude>
{{Documentation}}</noinclude>

Latest revision as of 14:44, 10 September 2022

  • Plain list item • item 2…
[edit] Template documentation

This template creates plain lists, which retain their semantic distinction as HTML list objects, but without any symbolic prefix visually identifying them as such. The default layout is horizontal and uses bullet characters () as separators, but assigning a value to the |indent-wrap= parameter allows it to be switched to a vertical one (new line-delimited) with a hanging indent for each item instead. The list as a whole or each individual item in it may be styled with CSS3.

Usage

Basic usage

{{Plainlist|Item 1|Item 2|Item 3|…}}

Complete syntax

{{Plainlist|Item 1|Item 2|Item 3|…
 | class       = CSS classes for list box
 | style       = CSS styles for list box
 | list-style  = CSS styles for entire list
 | item-style  = CSS styles for all list items
 | item1-style = CSS styles for first list item only
 | item2-style = CSS styles for second list item
 | …
 | indent-all  = Set to any value to indent all list items from left margin
 | indent-wrap = Set to any value to switch to an unbulleted vertical list where list items that wrap onto multiple lines are indented
 | indent      = Amount of indentation as a number of tab-stops
}}

Parameters

  • |1=, |2=, |3=, … Positional parameters are the list items, they can be most any kind of wikitext or even wikilinks (assign using their number for values containing an equality sign).
  • |class= Custom CSS classes for the <div>...</div> tags surrounding the list.
  • |style= Custom CSS styles for the <div>...</div> tags surrounding the list, e.g. font-size: 0.9em;. When inserting this template with surrounding text, you must add display: inline-block; here.
  • |list-style= Custom CSS styles for the <ul>...</ul> tags around the list. The format is the same as for the |style= parameter.
  • |item-style= Custom CSS styles for all of the list items (all of the <li>...</li> tags). The format is the same as for the |style= parameter.
  • |item1-style=, |item2-style=, |item3-style=, … Custom CSS styles for a single list item. The format is the same as for the |style= parameter.
  • |indent-all= When set to any value, indents the entire list from the left margin by indent tab stops.
  • |indent-wrap= When set to any value, switch list layout to vertical and indent list items that wrap to multiple lines by indent tab stops.
  • |indent= or |in= Amount of indentation from the left margin expressed as tab stops. Default value is 0.

Examples

Wiki markup Output generated
{{Plainlist|Item 1|Item 2|Item 3|Item 4|Item 5|Item 6|Item 7|Item 8|Item 9}}
  • Item 1
  • Item 2
  • Item 3
  • Item 4
  • Item 5
  • Item 6
  • Item 7
  • Item 8
  • Item 9
Giant planets ({{Plainlist|[[w:Jupiter|J]]|[[w:Saturn|S]]|[[w:Uranus|U]]|[[w:Neptune|N]]}}). Giant planets (
).
Giant planets ({{Plainlist|[[w:Jupiter|J]]|[[w:Saturn|S]]|[[w:Uranus|U]]|[[w:Neptune|N]]|style=display: inline-block;}}). Giant planets (
).
{{Plainlist|Winner|Runner-up|Third place|indent-all=yes|indent=2}}
  • Winner
  • Runner-up
  • Third place
{{Plainlist|Winner|Runner-up|Lorem dolum ipsum sit. Lorem dolum ipsum sit. Lorem dolum ipsum sit. Lorem dolum ipsum sit.|indent-wrap=yes}}
  • Winner
  • Runner-up
  • Lorem dolum ipsum sit. Lorem dolum ipsum sit. Lorem dolum ipsum sit. Lorem dolum ipsum sit.
{{Plainlist|Winner|Runner-up|Third place|item-style=color: blue;}}
  • Winner
  • Runner-up
  • Third place
{{Plainlist|Winner|Runner-up|Third place|item1-style=background-color: yellow;|item2-style=text-decoration: underline;}}
  • Winner
  • Runner-up
  • Third place

Avoiding Linter errors

{{Plainlist}} will produce Linter errors if placed inside a template that uses <span>...</span> tags, such as {{Small}}, {{Larger}}, etc. To avoid this, use the style declarations like the ones shown in the table below.

Incorrect markup Correct markup
{{Small|{{Plainlist|…}}}} {{Plainlist|…|style=font-size: 0.85em;}}
{{Resize|{{Plainlist|…}}}} {{Plainlist|…|style=font-size: 0.9em;}}
{{Larger|{{Plainlist|…}}}} {{Plainlist|…|style=font-size: 1.1em;}}
{{Large|{{Plainlist|…}}}} {{Plainlist|…|style=font-size: 1.125em;}}
{{Big|{{Plainlist|…}}}} {{Plainlist|…|style=font-size: 1.2em;}}
{{Huge|{{Plainlist|…}}}} {{Plainlist|…|style=font-size: 1.8em;}}
{{Resize|x%|{{Plainlist|…}}}} {{Plainlist|…|style=font-size: x%;}}
{{Nowrap|{{Plainlist|…}}}} {{Plainlist|…|style=white-space: nowrap;}}