Template:Hlist-comma
[Wikipedia|▼Menu]
.mw-parser-output .hlist ul,.mw-parser-output .hlist ol{padding-left:0}.mw-parser-output .hlist li,.mw-parser-output .hlist dd,.mw-parser-output .hlist dt{margin-right:0;display:inline-block;white-space:nowrap}.mw-parser-output .hlist dt:after,.mw-parser-output .hlist dd:after,.mw-parser-output .hlist li:after{white-space:normal}.mw-parser-output .hlist li:after,.mw-parser-output .hlist dd:after{content:" ・\a0 ";font-weight:bold}.mw-parser-output .hlist dt:after{content:": "}.mw-parser-output .hlist-pipe dd:after,.mw-parser-output .hlist-pipe li:after{content:" |\a0 ";font-weight:normal}.mw-parser-output .hlist-hyphen dd:after,.mw-parser-output .hlist-hyphen li:after{content:" -\a0 ";font-weight:normal}.mw-parser-output .hlist-comma dd:after,.mw-parser-output .hlist-comma li:after{content:"、";font-weight:normal}.mw-parser-output .hlist-slash dd:after,.mw-parser-output .hlist-slash li:after{content:" /\a0 ";font-weight:normal}.mw-parser-output .hlist dd:last-child:after,.mw-parser-output .hlist dt:last-child:after,.mw-parser-output .hlist li:last-child:after{content:none}.mw-parser-output .hlist dd dd:first-child:before,.mw-parser-output .hlist dd dt:first-child:before,.mw-parser-output .hlist dd li:first-child:before,.mw-parser-output .hlist dt dd:first-child:before,.mw-parser-output .hlist dt dt:first-child:before,.mw-parser-output .hlist dt li:first-child:before,.mw-parser-output .hlist li dd:first-child:before,.mw-parser-output .hlist li dt:first-child:before,.mw-parser-output .hlist li li:first-child:before{content:" (";font-weight:normal}.mw-parser-output .hlist dd dd:last-child:after,.mw-parser-output .hlist dd dt:last-child:after,.mw-parser-output .hlist dd li:last-child:after,.mw-parser-output .hlist dt dd:last-child:after,.mw-parser-output .hlist dt dt:last-child:after,.mw-parser-output .hlist dt li:last-child:after,.mw-parser-output .hlist li dd:last-child:after,.mw-parser-output .hlist li dt:last-child:after,.mw-parser-output .hlist li li:last-child:after{content:")\a0 ";font-weight:normal}.mw-parser-output .hlist ol{counter-reset:listitem}.mw-parser-output .hlist ol>li{counter-increment:listitem}.mw-parser-output .hlist ol>li:before{content:" "counter(listitem)" ";white-space:nowrap}.mw-parser-output .hlist dd ol>li:first-child:before,.mw-parser-output .hlist dt ol>li:first-child:before,.mw-parser-output .hlist li ol>li:first-child:before{content:" ("counter(listitem)" "}.mw-parser-output .documentation,.mw-parser-output .documentation-metadata{border:1px solid #a2a9b1;background-color:#ecfcf4;clear:both}.mw-parser-output .documentation{margin:1em 0 0 0;padding:1em}.mw-parser-output .documentation-metadata{margin:0.2em 0;font-style:italic;padding:0.4em 1em}.mw-parser-output .documentation-startbox{padding-bottom:3px;border-bottom:1px solid #aaa;margin-bottom:1ex}.mw-parser-output .documentation-heading{font-weight:bold;font-size:125%}.mw-parser-output .documentation-clear{clear:both}.mw-parser-output .documentation-toolbar{font-style:normal;font-size:85%} テンプレートの解説[表示] [編集] [履歴] [キャッシュを破棄].mw-parser-output .ombox{margin:4px 0;border-collapse:collapse;border:1px solid #a2a9b1;background-color:#f8f9fa;box-sizing:border-box}.mw-parser-output .ombox.mbox-small{font-size:88%;line-height:1.25em}.mw-parser-output .ombox-speedy{border:2px solid #b32424;background-color:#fee7e6}.mw-parser-output .ombox-delete{border:2px solid #b32424}.mw-parser-output .ombox-content{border:1px solid #f28500}.mw-parser-output .ombox-style{border:1px solid #fc3}.mw-parser-output .ombox-move{border:1px solid #9932cc}.mw-parser-output .ombox-protection{border:2px solid #a2a9b1}.mw-parser-output .ombox .mbox-text{border:none;padding:0.25em 0.9em;width:100%;font-size:90%}.mw-parser-output .ombox .mbox-image{border:none;padding:2px 0 2px 0.9em;text-align:center}.mw-parser-output .ombox .mbox-imageright{border:none;padding:2px 0.9em 2px 0;text-align:center}.mw-parser-output .ombox .mbox-empty-cell{border:none;padding:0;width:1px}.mw-parser-output .ombox .mbox-invalid-type{text-align:center}@media(min-width:720px){.mw-parser-output .ombox{margin:4px 10%}.mw-parser-output .ombox.mbox-small{clear:right;float:right;margin:4px 0 4px 1em;width:238px}}

Luaモジュールを使用しています:

Module:List

このテンプレートはテンプレートスタイルを使用しています:

Template:Hlist/styles.css

{{hlist}}は、横並べのリストを生成するテンプレートで、パラメータ指定することでリストの項目ごと含めて追加のCSS指定が可能です。{{hlist-comma}}を使用すると区切り文字が読点「、」になります。
使用法
基本的{{hlist|1項目目|2項目目|3項目目|...}}
全パラメータ{{hlist|1項目目|2項目目|3項目目|...|class = クラス指定|style = 全体のCSS指定|list_style = ulタグのCSS指定|item_style = 全liタグのCSS指定|item1_style = 最初のliタグに対するCSS指定 |item2_style = 2番目のliタグに対するCSS指定 |...|indent = リストのインデント}}
パラメータ

名前なしパラメータ (1, 2, 3...) - リストの項目。指定がない箇所は表示されない。

class - リスト全体で適用される<div>...</div>タグのカスタムクラス。例としてplainlinksなど。

style - リスト全体で適用される<div>...</div>タグのカスタムCSS。例としてfont-size: 90%;など。

list_style - リストで適用される<ul>...</ul>タグのカスタムCSS。|style=パラメータと指定方法は同じ。

item_style - リストの全項目部(<li>...</li>タグ)で適用されるカスタムCSS。|style=パラメータと指定方法は同じ。

item1_style, item2_style, item3_style... - リストの各項目に適用されるカスタムCSS。|style=パラメータと指定方法は同じ。

indent - リストのインデントを指定。入力例は2など。em単位かつ指定された値の1.6倍で計算される。指定がない場合既定値として0となる。

使用例

入力表示
{{hlist|entry1|entry2|entry3|entry4|entry5|entry6|entry7|entry8|entry9}}

entry1

entry2

entry3

entry4

entry5

entry6

entry7

entry8

entry9

{{hlist|優勝|準優勝|第3位|item_style=color:blue;}}

優勝

準優勝

第3位

{{hlist|優勝|準優勝|第3位|item_style=color:blue;|indent=2}}

優勝

準優勝

第3位

{{hlist|優勝|準優勝|第3位|item1_style=background-color:yellow;|item2_style=background-color:silver;}}

優勝

準優勝

第3位


関連項目

Listテンプレート関連ページの一覧

{{リスト}}  · {{番号付きリスト}}  · {{定義リスト}} - Wiki記法の代替

{{Bulleted list}} - ビュレット付きのリスト

{{Unbulleted list}}  · {{Plainlist}}  · {{Indented plainlist}}  · {{Unbulleted indent list}} - 装飾のない縦並びのリスト

{{Hlist}}  · {{Flatlist}} - 中黒で項目が分割される横並びのリスト

{{Hlist-comma}} - 読点 ( 、 ) で項目が分割される横並びのリスト


次ページ
記事の検索
おまかせリスト
▼オプションを表示
ブックマーク登録
mixiチェック!
Twitterに投稿
オプション/リンク一覧
話題のニュース
列車運行情報
暇つぶしWikipedia

Size:10 KB
出典: フリー百科事典『ウィキペディア(Wikipedia)
担当:undef