Template:Font:修订间差异

H萌娘,万物皆可H的百科全书!
跳到导航 跳到搜索
imported>Recital君
(正则表达式)
imported>=海豚=
无编辑摘要
第1行: 第1行:
<includeonly>{{#if:{{{size|}}}|{{#vardefine:size<!--默认单位-->
<includeonly><span {{{{{|safesubst:}}}#if: {{{class|}}} |class="{{{class|}}}"}} {{{{{|safesubst:}}}#if: {{{title|}}} |title="{{{title|}}}"}} {{{{{|safesubst:}}}#if: {{{font|}}}{{{size|}}}{{{color|}}}{{{bgcolor|}}}{{{style|}}}{{{css|}}} |style="{{{{{|safesubst:}}}#if: {{{font|}}} |font-family:{{{font|}}};}} {{ {{{|safesubst:}}}#if:{{{size|}}}|
  |{{#if:{{#switch: {{Str_rightc|{{{size|}}}|2}} 
   {{ {{{|safesubst:}}}#if:
      |px
    {{ {{{|safesubst:}}}#switch:{{ {{{|safesubst:}}}#ifexpr:{{ {{{|safesubst:}}}#invoke:String|len|{{{size|}}}}} > 1|{{ {{{|safesubst:}}}#invoke:String|sub|{{{size|}}}|-2|-1}}|}}|px|em|pt|ch=t|#default=}}
      |em
    {{ {{{|safesubst:}}}#ifeq:{{ {{{|safesubst:}}}#invoke:String|sub|{{{size|o}}}|-1|-1}}|%|t|}}
      |pt
    {{ {{{|safesubst:}}}#ifeq:{{ {{{|safesubst:}}}#ifexpr:{{ {{{|safesubst:}}}#invoke:String|len|{{{size|}}}}} > 3|{{ {{{|safesubst:}}}#invoke:String|sub|{{{size|}}}|1|4}}|}}|calc|t|}}
      |ch
   |font-size: {{{size|}}};|font-size: {{{size|}}}px;}}
      = true }}{{#ifeq:{{Str_rightc|{{{size|}}}|1}}|%|true|}}
|}} {{{{{|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>
   |{{{size|}}}
{{ 萌百:Font}}
   |{{#ifeq:{{Str_left|{{{size|}}}|4}}|calc|{{{size|}}}|{{{size|}}}px}}
</noinclude>
   }}
}}|{{#vardefine:size|}}}}<span {{#if: {{{class|}}} |class="{{{class|}}}"}} {{#if: {{{title|}}} |title="{{{title|}}}"}} {{#if: {{{font|}}}{{{size|}}}{{{color|}}}{{{bgcolor|}}}{{{style|}}}{{{css|}}} |style="{{#if: {{{font|}}} |font-family:{{{font|}}};}} {{#if: {{#var:size}} |font-size:{{#var:size}};}} {{#if: {{{color|}}} |color: {{{color}}};}} {{#if: {{{bgcolor|}}} |background-color:{{{bgcolor}}};}}{{#if: {{{shadowcolor|}}} |text-shadow: {{{shadowcolor|}}} 2px 4px 4px;}}  {{#if: {{{style|{{{css|}}}}}} |{{{style|{{{css}}}}}}|}}"}}>{{#if: {{{1|}}} |{{{1}}}}}</span></includeonly><noinclude>
{{documentation}}
</noinclude><noinclude>[[分类:格式模板]]</noinclude>

2021年3月31日 (三) 15:41的版本

[跨wiki嵌入功能被禁用]