本站文本内容除另有声明外,转载时均必须注明出处,并遵守CC BY-NC-SA 3.0协议。(转载须知
本站是中文Terraria Wiki的镜像站,与Re-Logic、Gamepedia没有从属关系。(免责声明
由于镜像同步脚本的问题,本镜像站暂停更新。请前往中文Terraria Wiki源站访问最新信息。

全站通知:

模板:Dotlist/doc

来自Terraria Wiki
跳到导航 跳到搜索

A helper template to generate dot-seperated list.

You can use {{dotlist/options}} to change default value for some parameters.

Usage

Describe usage instructions here.

Unnamed Parameters

Every unnamed parameter will output as an item of list.

title =

(Optional) An extra title before list.

bold = n

(Optional) If set, title will display in normal weight (not in bold).

paren = y/yes

(Optional) The list itself(excluding title) will be in parentheses. See examples below.

inline = y/yes

(Optional) If set, dotlist will output as a <span> element. By default it's <div>

space = l/xl/xxl/xxxl/xxxxl

(Optional) You can use them to increase the space between items.

class =

(Optional) Custom css class(es). You can use css = l/xl/xxl/xxxl/xxxxl to increase the space between items.

css or style =

(Optional) Custom css rules. Note: if you set default css with {{dotlist/options}}(by css= or style=), then css= will override default css, but style= will not(appended instead).

For example:

  • {{dotlist/options|css=color:red; padding:1em;}} {{dotlist|css=margin:1em;}}, the resulting css is: margin:1em;.
  • {{dotlist/options|css=color:red; padding:1em;}} {{dotlist|style=text-align:center;}}, the resulting css is: color:red; padding:1em; text-align:center;.
  • {{dotlist/options|css=color:red; padding:1em;}} {{dotlist|css=margin:1em;|style=text-align:center;}}, the resulting css is: margin:1em; text-align:center;.

Examples

before {{dotlist|item1|item2|item3}} after before
  • item1
  • item2
  • item3
after

before {{dotlist|title=list:|item1|item2|item3}} after

before
list:
  • item1
  • item2
  • item3
after

before {{dotlist|inline=y|title=list:|item1|item2|item3}} after

before
list:
  • item1
  • item2
  • item3
after

before {{dotlist|inline=y|space=xxxl|title=list:|item1|item2|item3}} after

before
list:
  • item1
  • item2
  • item3
after

before {{dotlist|inline=y|css=background:yellow|title=list:|item1|item2|item3}} after

before
list:
  • item1
  • item2
  • item3
after

Dotlists can be nested.

before {{dotlist|title=list:|item1|{{dotlist|inline=y|title=item2:|item2-1|item2-2|item2-3}}|item3}} after

before
list:
  • item1
  • item2:
    • item2-1
    • item2-2
    • item2-3
  • item3
after

parentheses for sub-dotlist, and with no bold title.

before {{dotlist|title=list:|item1|{{dotlist|inline=y|paren=y|bold=n|title=item2:|item2-1|item2-2|item2-3}}|item3}} after

before
list:
  • item1
  • item2:(
    • item2-1
    • item2-2
    • item2-3
    )
  • item3
after