模板:Quarter
出自Meshal Lite
(修订版本间的差异)
(由1名用户作出的8个中途修订版本未被显示) | |||
第1行: | 第1行: | ||
− | <includeonly>{{#vardefine: iconSymbol|{{{2|{{{preset|}}}}}} | + | <includeonly>{{#vardefine: iconSymbol|{{#switch:{{{2|{{{preset|}}}}}} |
|quest=quest | |quest=quest | ||
|info=info | |info=info | ||
第6行: | 第6行: | ||
|secret=secret | |secret=secret | ||
|treasure=treasure | |treasure=treasure | ||
+ | |creature=creature | ||
+ | |feature=feature | ||
+ | |ability=ability | ||
+ | |item=item | ||
|file=file | |file=file | ||
|sys=sys | |sys=sys | ||
− | |#default= | + | |tpl=tpl |
+ | |#default=sys}}}}{{#vardefine: contentTextColor|{{#switch: {{{2|{{{preset|}}}}}} | ||
|quest=inherit | |quest=inherit | ||
|info=inherit | |info=inherit | ||
第15行: | 第20行: | ||
|secret=rgb(238, 238, 238) | |secret=rgb(238, 238, 238) | ||
|treasure=inherit | |treasure=inherit | ||
+ | |creature=inherit | ||
+ | |feature=inherit | ||
+ | |ability=inherit | ||
+ | |item=inherit | ||
|file=inherit | |file=inherit | ||
|sys=inherit | |sys=inherit | ||
+ | |tpl=inherit | ||
|#default=inherit}}}}{{#vardefine: contentBgColor|{{#switch: {{{2|{{{preset|}}}}}} | |#default=inherit}}}}{{#vardefine: contentBgColor|{{#switch: {{{2|{{{preset|}}}}}} | ||
|quest=rgb(240, 243, 246) | |quest=rgb(240, 243, 246) | ||
第24行: | 第34行: | ||
|secret=rgb(81, 64, 71) | |secret=rgb(81, 64, 71) | ||
|treasure=rgb(227,231,244) | |treasure=rgb(227,231,244) | ||
+ | |creature=rgba(216, 206, 193, .75) | ||
+ | |feature=rgba(241, 209, 255, .75) | ||
+ | |ability=rgba(255, 227, 157, .75) | ||
+ | |item=rgba(209, 220, 237, .75) | ||
|file=rgb(245, 245, 245) | |file=rgb(245, 245, 245) | ||
|sys=rgb(245, 245, 245) | |sys=rgb(245, 245, 245) | ||
+ | |tpl=rgb(245, 245, 245) | ||
|#default=rgb(242,242,242)}}}}{{#vardefine: borderColor|{{#switch: {{{2|{{{preset|}}}}}} | |#default=rgb(242,242,242)}}}}{{#vardefine: borderColor|{{#switch: {{{2|{{{preset|}}}}}} | ||
|quest=rgb(228, 236, 242) | |quest=rgb(228, 236, 242) | ||
第33行: | 第48行: | ||
|secret=rgb(76, 61, 75) | |secret=rgb(76, 61, 75) | ||
|treasure=rgb(82,83,136) | |treasure=rgb(82,83,136) | ||
+ | |creature=rgba(216, 206, 193, .75) | ||
|file=rgb(222, 222, 222) | |file=rgb(222, 222, 222) | ||
|sys=rgb(222, 222, 222) | |sys=rgb(222, 222, 222) | ||
− | |#default=rgb(116,125,130)}}}}<div class="quarter" style="background-color: {{{contentBgColor |{{#var: contentBgColor}}}}}; border-color: {{{borderColor |{{#var: borderColor}}}}};width: calc(100% - | + | |tpl=rgb(222, 222, 222) |
+ | |#default=rgb(116,125,130)}}}}<div class="quarter" style="background-color: {{{contentBgColor |{{#var: contentBgColor}}}}}; border-color: {{{borderColor |{{#var: borderColor}}}}};width: calc(100% - 2px - {{{indent|0}}}em); margin: 1px 1px 1em calc(1px + {{{indent|0}}}em);"> | ||
{|width=100% | {|width=100% | ||
− | |style="font-size:1.5em; padding: 8px; width: 40px;"|{{symbol|{{#var:iconSymbol}}}} | + | |style="font-size:1.5em; padding: 8px; width: 40px;"|{{symbol|{{#ifeq:{{{symbol|}}}||{{#var:iconSymbol}}|{{{symbol|}}}}}}} |
|class="quarterText" style="padding: .5em .5em .5em 0; color: {{{contentTextColor|{{#var:contentTextColor}}}}}; {{{contentStyle|}}}"|<span style="float:right; font-size:smaller;">{{{tip|}}}</span>{{{1|{{{text|}}}}}} | |class="quarterText" style="padding: .5em .5em .5em 0; color: {{{contentTextColor|{{#var:contentTextColor}}}}}; {{{contentStyle|}}}"|<span style="float:right; font-size:smaller;">{{{tip|}}}</span>{{{1|{{{text|}}}}}} | ||
|} | |} | ||
− | </div></includeonly><noinclude> | + | </div></includeonly><noinclude>{{tpl_helpdoc}}</noinclude> |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | {{ | + | |
− | + | ||
− | }} | + | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | </noinclude> | + |
在2019年11月25日 (一) 16:03的最新修订版本
编辑简介内容 加入一段含有图标样式的文本块,它会以卡片的形式呈现。
使用
{{quarter|
|[1] text=
|[2] preset= <rule | info | legend | datalist | feature | ability | item | code | ...> //枚举值的写法
|tip=
|contentTextColor=
|contentBgColor=
|borderColor=
|contentStyle=
|symbol=
|indent=0
}}
|[1] text=
|[2] preset= <rule | info | legend | datalist | feature | ability | item | code | ...> //枚举值的写法
|tip=
|contentTextColor=
|contentBgColor=
|borderColor=
|contentStyle=
|symbol=
|indent=0
}}
1
text这段文字的具体内容
2
preset这段文字的预设配色,决定了这个段落的配色和图标(会被contentBgColor
、borderColor
、contentTextColor
覆盖)
- 你可以参考Template:Quarter/模板样式查看预设样式。
tip
位于文本快右上角的提示文字,留空则不显示。
contentTextColor
正文区的文本颜色。
- 默认为inherit
contentBgColor
正文区的背景色。
- 默认为rgb(242,242,242)
borderColor
文本块的边框颜色。
- 默认为rgb(116,125,130)
contentStyle
正文区追加的css样式,可自定义
symbol
自定义使用的符号,可参考symbol
模板。
indent
这个区块的缩进尺寸,单位是em。填写1即等于缩进1em。
- 默认为0