个人工具

模板:Block

出自Meshal Lite

(修订版本间的差异)
跳转到: 导航, 搜索
(参数)
 
(由1名用户作出的43个中途修订版本未被显示)
第1行: 第1行:
<includeonly>{{#vardefine: lightcolor|{{#switch: {{{preset|rule}}}
+
<includeonly>{{#vardefine: contentTextColor|{{#switch: {{{3|{{{preset|rule}}}}}}
|rule=F2F2F2
+
|rule=inherit
|cmpgntale=E0D4C5
+
|info=inherit
|cmpgntip=E3E7F4
+
|legend=inherit
|#default=F2F2F2}}}}{{#vardefine: darkcolor|{{#switch: {{{preset|rule}}}|
+
|chronicle=inherit
|rule=747D82
+
|datalist=inherit
|cmpgntale=987058
+
|creature=inherit
|cmpgntip=525388
+
|feature=inherit
|#default=747D82}}}}<div class="block" style="background-color: #{{{lightcolor|{{#var:lightcolor}}}}}; border-color: #{{{darkcolor|{{#var:darkcolor}}}}};"><div class="blockTitle" style="background-color: #{{{darkcolor|{{#var:darkcolor}}}}}; color: #FFFFFF; {{{titlestyle|}}}">{{{1|{{{title|}}}}}}</div>
+
|ability=inherit
<div class="blockContent" style="{{{textstyle|}}}">
+
|item=inherit
{{{2|{{{text|}}}}}}</div></div></includeonly><noinclude>[[category:模板]][[category:编辑]]
+
|maplocation=inherit
== 模板说明 ==
+
|cmpgntale=inherit
加入一段文本, 该文本会以框体(标题和正文)的形式呈现.
+
|cmpgntip=inherit
 
+
|code=inherit
== 参数 ==
+
|op= inherit
;1 或 title
+
|#default=inherit}}}}{{#vardefine: contentBgColor|{{#switch: {{{3|{{{preset|rule}}}}}}
:这段文字的标题, 留空则不显示标题.
+
|rule=rgb(242,242,242)
;2 或 text
+
|info=rgb(254,249,227)
:这段文字的具体内容
+
|legend=rgb(238, 237, 233)
;preset
+
|chronicle=rgb(247, 246, 245)
:这段文字的预设配色, 决定了这个段落的配色(会被darkcolor, lightcolor覆盖)
+
|datalist=rgb(255,255,255)
:预设配色包括:
+
|maplocation=rgb(242,242,242)
:-rule(默认): <font style="background-color: #747d82; color: #FFFFFF;">darkcolor/title</font>; <font style="background-color: #F2F2F2;">lightcolor/text</font>
+
|cmpgntale=rgb(224,212,197)
:-cmpgntale: <font style="background-color: #987058; color: #FFFFFF;">darkcolor/title</font>; <font style="background-color: #E0D4C5;">lightcolor/text</font>
+
|cmpgntip=rgb(227,231,244)
:-cmpgntip: <font style="background-color: #525388; color: #FFFFFF;">darkcolor/title</font>; <font style="background-color: #E3E7F4;">lightcolor/text</font>
+
|code=rgb(237, 244, 247)
;darkcolor
+
|op=rgb(255,240,229)
:框体深色部分的色号, 包括标题区的背景色(不用加"#"号), 默认为747D82
+
|#default=rgb(242,242,242)}}}}{{#vardefine: headerTextColor|{{#switch: {{{3|{{{preset|rule}}}}}}
;lightcolor
+
|rule=rgb(255,255,255)
:正文区的背景色(不用加"#"号), 默认为F2F2F2
+
|info=rgb(255,255,255)
;titlestyle
+
|legend=rgb(74, 59, 45)
:标题区追加的css样式
+
|chronicle=initial
;textstyle
+
|datalist=rgb(78, 81, 84)
:正文区追加的css样式
+
|creature=initial
 
+
|feature=initial
== 使用 ==
+
|ability=initial
<source lang="text">
+
|item=initial
{{block
+
|maplocation=rgb(255,255,255)
|title=
+
|cmpgntale=rgb(255,255,255)
|text=
+
|cmpgntip=rgb(255,255,255)
}}
+
|code=rgb(255,255,255)
</source>
+
|op= rgb(255,255,255)
</noinclude>
+
|#default=rgb(255,255,255)}}}}{{#vardefine: headerBgColor|{{#switch: {{{3|{{{preset|rule}}}}}}|
 +
|rule=rgb(116,125,130)
 +
|info=rgb(140,127,104)
 +
|legend=rgb(203, 198, 188)
 +
|chronicle=rgb(235, 230, 221)
 +
|datalist=rgb(242, 242, 242)
 +
|creature=rgba(216, 206, 193, .75)
 +
|feature=rgba(241, 209, 255, .75)
 +
|ability=rgba(255, 227, 157, .75)
 +
|item=rgba(209, 220, 237, .75)
 +
|maplocation=rgb(180, 38, 64)
 +
|cmpgntale=rgb(152,112,88)
 +
|cmpgntip=rgb(82,83,136)
 +
|code=rgb(101, 137, 154)
 +
|op=rgb(146,116,112)
 +
|#default=rgb(116,125,130)}}}}{{#vardefine: containerStyle|{{#switch: {{{3|{{{preset|rule}}}}}}|
 +
|datalist=box-shadow: 0 0 3px rgba(0,0,0,.1);
 +
|#default=}}}}<div class="block" style="background-color: {{{contentBgColor |{{#var: contentBgColor}}}}}; border-color: {{{headerBgColor |{{#var: headerBgColor}}}}}; margin-left: {{{indent|0}}}em;{{#var: containerStyle}};"><div class="blockTitle" style="background-color: {{{headerBgColor |{{#var: headerBgColor}}}}}; color: {{{headerTextColor|{{#var: headerTextColor}}}}}; {{{headerStyle|}}}">{{{1|{{{title|}}}}}}<span style="float:right; font-size:smaller;">{{{tip|}}}</span></div>
 +
<div class="blockContent" style="color: {{{contentTextColor|{{#var:contentTextColor}}}}}; {{{contentStyle|}}}">
 +
{{{2|{{{text|}}}}}}</div></div></includeonly><noinclude>{{tpl_helpdoc}}</noinclude>

在2019年11月25日 (一) 07:55的最新修订版本

编辑简介内容 加入一段含有标题的文本块,它会以框体(标题和正文)的形式呈现。

编辑帮助内容

使用
{{block|
  |[1] title=
  |[2] text=
  |[3] preset= <rule | info | legend | datalist | feature | ability | item | code | ...>
  |tip=
  |headerTextColor=
  |headerBgColor=
  |contentTextColor=
  |contentBgColor=
  |headerStyle=
  |contentStyle=
  |indent=0
}}
1 title

这段文字的标题,留空则不显示标题。

2 text

这段文字的具体内容

3 preset

这段文字的预设配色,决定了这个段落的配色(会被headerTextColorheaderBgColorcontentTextColorcontentBgColor覆盖)

tip

位于文本块右上角的提示文字,留空则不显示。

headerTextColor

标题区的文本颜色。

  • 默认为rgb(255,255,255)
headerBgColor

标题区的背景色。

  • 默认为rgb(116,125,130)
contentTextColor

正文区的文本颜色。

  • 默认为inherit
contentBgColor

正文区的背景色。

  • 默认为rgb(242,242,242)
headerStyle

标题区追加的css样式,可自定义

contentStyle

正文区追加的css样式,可自定义

indent

这个区块的缩进尺寸,单位是em。填写1即等于缩进1em。

  • 默认为0