模板:Font:修订间差异

添加1,265字节 、​ 2022年7月13日 (星期三)
无编辑摘要
(创建页面,内容为“<includeonly><span {{{{{|safesubst:}}}#if: {{{class|}}} |class="{{{class|}}}"}} {{{{{|safesubst:}}}#if: {{{title|}}} |title="{{{title|}}}"}} {{{{{|safesubst:}}}#if:…”)
 
无编辑摘要
 
(未显示2个用户的2个中间版本)
第4行: 第4行:
       {{ {{{|safesubst:}}}#ifeq:{{ {{{|safesubst:}}}#invoke:String|sub|{{{size|o}}}|-1|-1}}|%|t|}}
       {{ {{{|safesubst:}}}#ifeq:{{ {{{|safesubst:}}}#invoke:String|sub|{{{size|o}}}|-1|-1}}|%|t|}}
       {{ {{{|safesubst:}}}#ifeq:{{ {{{|safesubst:}}}#ifexpr:{{ {{{|safesubst:}}}#invoke:String|len|{{{size|}}}}} > 3|{{ {{{|safesubst:}}}#invoke:String|sub|{{{size|}}}|1|4}}|}}|calc|t|}}
       {{ {{{|safesubst:}}}#ifeq:{{ {{{|safesubst:}}}#ifexpr:{{ {{{|safesubst:}}}#invoke:String|len|{{{size|}}}}} > 3|{{ {{{|safesubst:}}}#invoke:String|sub|{{{size|}}}|1|4}}|}}|calc|t|}}
     |font-size: {{{size|}}};|font-size: {{{size|}}}px;}}
     |font-size: {{{size|}}};|font-size: {{{size|}}};}}
|}} {{{{{|safesubst:}}}#if: {{{color|}}} |color: {{{color}}};}} {{{{{|safesubst:}}}#if: {{{bgcolor|}}} |background-color:{{{bgcolor}}};}}{{{{{|safesubst:}}}#if: {{{shadowcolor|}}} |text-shadow: {{{shadowcolor|}}} 2px 4px 4px;}}  {{{{{|safesubst:}}}#if: {{{style|{{{css|}}}}}} |{{{style|{{{css}}}}}}|}}"}}>{{ {{{|safesubst:}}}#if: {{{1|}}}|{{{1}}}|<strong class="error">警告:font 模板的参数<code>{{{1}}}</code>未赋值。</strong>}}</span></includeonly><noinclude>
|}} {{{{{|safesubst:}}}#if: {{{color|}}} |color: {{{color}}};}} {{{{{|safesubst:}}}#if: {{{bgcolor|}}} |background-color:{{{bgcolor}}};}}{{{{{|safesubst:}}}#if: {{{shadowcolor|}}} |text-shadow: {{{shadowcolor|}}} 2px 4px 4px;}}  {{{{{|safesubst:}}}#if: {{{style|{{{css|}}}}}} |{{{style|{{{css}}}}}}|}}"}}>{{ {{{|safesubst:}}}#if: {{{1|}}}|{{{1}}}|<strong class="error">警告:font 模板的参数<code>{{{1}}}</code>未赋值。</strong>}}</span></includeonly><noinclude>
{{documentation}}
{{documentation}}
</noinclude>
[[Category:格式模板]]
<templatedata>
{
"params": {
"1": {
"label": "内容",
"description": "目标文字内容。",
"type": "content",
"required": true
},
"class": {
"label": "类名",
"description": "目标文字的 class 属性。",
"type": "string"
},
"title": {
"label": "悬停提示",
"description": "鼠标悬停在文字上时会以“悬浮提示框”的形式显示。",
"type": "string"
},
"font": {
"label": "字体",
"description": "目标文字字体。",
"type": "string",
"default": "14px"
},
"size": {
"label": "尺寸",
"description": "目标文字缩放尺寸。",
"type": "string"
},
"color": {
"label": "颜色",
"description": "目标文字文字颜色。",
"type": "string",
"default": "black"
},
"bgcolor": {
"label": "背景颜色",
"description": "目标文字背景颜色。",
"type": "string"
},
"style": {
"aliases": [
"css"
],
"label": "样式",
"description": "目标文字的 CSS 样式。",
"type": "string"
},
"shadowcolor": {
"label": "阴影颜色",
"description": "目标文字阴影颜色。",
"type": "string"
}
},
"description": "设置字体",
"format": "inline"
}
</templatedata></noinclude>