imported>Jaax23 편집 요약 없음 |
imported>Jaax23 m편집 요약 없음 |
||
1번째 줄: | 1번째 줄: | ||
<!-- | |||
HOW THIS WORKS (with 'if' lines being theoretical input, not part of the code) | |||
if {{{1}}} = 'Xin Hua' | |||
$name = 'Xin Hua' | |||
$lcname = 'xin hua' | |||
$color-xin hua = <nil> | |||
$color-xin hua = {{ColorC/characters|$lcname}} // fallback to default colors | |||
if {{{1}}} = 'Xin Hua:orange' | |||
$name = 'Xin Hua' | |||
$lcname = 'xin hua' | |||
$color-xin hua = 'orange' | |||
if {{{1}}} = 'Xin Hua:black' | |||
$name = 'Xin Hua' | |||
$lcname = 'xin hua' | |||
$color-xin hua = 'black' | |||
$color-xin hua = 'inherit' // superior to 'black' for text, and people won't use {{lrc color}} anyway since the default text color IS black | |||
if {{{1}}} = 'Both' | |||
$name = 'Both' | |||
$lcname = 'both' | |||
$color-both = <nil> | |||
$color-both = {{lrc color/defaults|$lcname}} // still <nil> | |||
$color-both = 'inherit' // avoid bad CSS 'color:;' | |||
if {{{2}}} | |||
// i.e. 'n1' ('n2', etc.) was filled in | |||
-->{{#vardefine:name|{{#explode:{{{1|}}}|:|0}}}}<!-- | -->{{#vardefine:name|{{#explode:{{{1|}}}|:|0}}}}<!-- | ||
-->{{#vardefine:lcname|{{lc:{{#var:name}}}}}}<!-- | -->{{#vardefine:lcname|{{lc:{{#var:name}}}}}}<!-- | ||
8번째 줄: | 49번째 줄: | ||
--><!--do nothing--><!-- | --><!--do nothing--><!-- | ||
-->|<!-- | -->|<!-- | ||
-->{{#vardefine:color-{{#var:lcname}}|{{ | -->{{#vardefine:color-{{#var:lcname}}|{{ColorC/characters|{{#var:lcname}}}}}}<!-- | ||
-->}}<!-- | -->}}<!-- | ||
2017년 11월 27일 (월) 06:19 기준 최신판
{{#vardefine:name|}}{{#vardefine:lcname|{{#var:name}}}}{{#vardefine:color-{{#var:lcname}}|}}{{#var:name}}