ModEnc is currently in Maintenance Mode: Changes could occur at any given moment, without advance warning.

Template:Sandbox

From ModEnc
Revision as of 03:40, 24 August 2021 by 桂月August (talk | contribs)
Jump to navigation Jump to search

Official ModEnc Testing Page ("Sandbox")

This is a sandbox - a page for testing stuff. Feel free to test any editing related stuff here. There also exists a Template-Sandbox. Please remove the your content if you no longer need it. Also note that the following content does not contain any useful information.


<!--###  Tabs模板
--><div class="Tabs"<!--
###(默认顶部)设定标签开关的位置,默认为顶部
--> data-label-side="{{#switch:{{{LabelSide|}}}|left|right|bottom|top={{{LabelSide|}}}|top}}"<!--
###设定标签开关的顶边框(开关选中后侧边条)位置,1则颠倒位置
--> data-label-color-side-reverse="{{{LabelColorSideReverse|}}}"<!--
###(不采用)标签开关和显示框之间的距离
--> data-divider-size=""<!--
###自定义style
--> {{#if:{{{style|}}}|style="{{{style|}}}"}}<!--
###默认显示第几个标签开关
--> {{#if:{{{DefaultTab|}}}|data-default-tab="{{{DefaultTab|}}}"|}}<!--
###指定标签开关文字和边框的距离
--> {{#if:{{{LabelPadding|}}}|data-label-padding="{{{LabelPadding|}}}"|}}<!--
###被选中的标签开关与其他标签的边框色,可以通过theme决定,默认与开关被选中后侧边条的颜色相同,否则默认为#6F027C
--> data-label-border-color="{{#if:{{{LabelBorderColor|}}}{{{LabelColor|}}}|{{{LabelBorderColor|{{{LabelColor|}}}}}}|{{#switch:{{{theme|}}}|soviet=#B00041|allied=#004696|epsilon=#800077|foehn=#18696B|neutra=#000000|#6F027C}}}}"<!--
###标签开关被选中后侧边条的颜色,可以通过theme决定,默认与被选中的标签开关与其他标签的边框色相同,否则默认为#6F027C
--> data-label-color="{{#if:{{{LabelColor|}}}{{{LabelBorderColor|}}}|{{{LabelColor|{{{LabelBorderColor|}}}}}}|{{#switch:{{{theme|}}}|soviet=#B00041|allied=#004696|epsilon=#800077|foehn=#18696B|neutra=#000000|#6F027C}}}}"<!--
###显示框的边框色,可以通过theme决定
--> {{#if:{{{TextBorderColor|}}}{{{theme|}}}|data-text-border-color="{{#if:{{{TextBorderColor|}}}|{{{TextBorderColor|}}}|{{#switch:{{{theme|}}}|soviet=#FF0000|allied=#0077FF|epsilon=#7A51A8|foehn=#007D80|neutra=#808080|}}}}"|}}<!--
###显示框内容和边框的距离,分别为上下边距、左右边距,默认为1px 1px
--> data-text-padding="{{#if:{{{TextPadding|}}}|{{{TextPadding|}}}|1px 1px}}"<!--
###设定标签开关被选中后的底色,可以通过theme决定,默认为#C904E0
--> data-label-background-color="{{#if:{{{LabelBackgroundColor|}}}|{{{LabelBackgroundColor|}}}|{{#switch:{{{theme|}}}|soviet=#FF0000|allied=#0077FF|epsilon=#7A51A8|foehn=#007D80|neutra=#808080|#C904E0}}}}"<!--
###显示框的背景色,可以通过theme决定,默认为#EBF2F5
--> data-text-background-color="{{#if:{{{TextBackgroundColor|}}}|{{{TextBackgroundColor|}}}|{{#switch:{{{theme|}}}|soviet=#EFC2C4|allied=#BCD9F7|epsilon=#D4D2E6|foehn=#BCDBDE|neutra=#D6DBDE|#EBF2F5}}}}"<!--
###如果AutoWidth=yes则模板不占满整行,两边有空余
--> {{#ifeq:{{{AutoWidth|}}}|yes|data-auto-width="yes"}}<!--
###如果不占满整行时的左右浮动,默认为左
--> {{#switch:{{#if:{{{Float|}}}|{{{Float|}}}|{{{float|}}}}}|left|right=data-float="{{#if:{{{Float|}}}|{{{Float|}}}|{{{float|}}}}}"}}><!--
#########(正文部分)查找模板内tab开头的参数,找到后将开头的tab去掉,后面剩下部分设为key,val设为key对应的值
####然后按照第三行的格式输出
### bticon(n)定义标签按钮图标,bt(n)定义标签按钮文字,tab(n)定义显示框内容,LabelTextColor定义标签按钮文字预设颜色
-->{{#forargs:tab
| key
| val
|<div class="Tab"><div class="TabLabelText" style="color:{{{LabelTextColor|}}};">{{{bticon{{#var:key}}|}}}{{{bt{{#var:key|}}|}}}</div><div class="TabContentText">{{#var:val}}</div></div>
}}</div>