LLWiki正在建設中,歡迎加入我們!
「Template:Tracklist」修訂間的差異
跳至導覽
跳至搜尋
小 |
|||
第1行: | 第1行: | ||
<includeonly>{{#vardefine:info |
<includeonly>{{#vardefine:info |
||
|{{#if: {{{all_writing|}}}|全碟-{zh-hans:作词;zh-hant:填詞;zh-tw:作詞;}-及作曲:{{{all_writing}}} |
|{{#if: {{{all_writing|}}}|全碟-{zh-hans:作词;zh-hant:填詞;zh-tw:作詞;}-及作曲:{{{all_writing}}} |{{#if: {{{all_music|}}}|全碟作曲:{{{all_music|}}} |}}{{#if: {{{all_lyrics|}}}|全碟-{zh-hans:作词;zh-hant:填詞;zh-tw:作詞;}-:{{{all_lyrics}}} |}}}}{{#if: {{{all_arranger|}}}|全碟编曲:{{{all_arranger}}} |}}{{#if: {{{all_singer|}}}|全碟演唱:{{{all_singer}}} |}}{{#if: {{{all_producer|}}}|全碟监制:{{{all_producer}}} |}}{{#switch: {{{all_note}}} | except | yes = <small>(下面注明例外曲目)</small> | {{{all_note|}}} }}{{#if: {{{all_note2}}} | {{{all_note2|}}} }} |
||
}}<!-- |
}}<!-- |
||
--><div class="tracklist {{#if:{{{length|}}}|tracklist-length|}}" style="min-width: calc(100% - {{{reserve_width|300px}}}); {{#switch: {{{collapsed}}}|open|closed|yes = border: #aaa 1px solid; }}"> |
|||
-->{{#vardefine:length_check<!-- 是否至少一个长度值不为空的检测参数 --> |
|||
{| class="{{#switch: {{{collapsed}}}|closed|yes = mw-collapsible mw-collapsed|open = mw-collapsible }}"> |
|||
|0 |
|||
! colspan="10" | {{#if: {{{headline|}}} | {{{headline|}}} | 曲目列表 }}<!-- 左边是headline,右边是全碟参数 -->{{#if: {{#var:info|}} | <div style="font-weight: normal; ">{{#var:info}}</div>}} |
|||
}}<!-- |
|||
|-{{#vardefine:ncols|1}} |
|||
-->{{#forargs:length |
|||
! 曲序 !! 曲目 |
|||
{{ #if: {{{lyrics_credits|}}}|{{#vardefine:ncols|{{#expr: {{#var:ncols}} + 1 }}}} ! -{zh-hans:作词;zh-hant:填詞;zh-tw:作詞;}-}} |
|||
{{ #if: {{{music_credits|}}}|{{#vardefine:ncols|{{#expr: {{#var:ncols}} + 1 }}}} ! 作曲}} |
|||
{{#if: {{{arranger_credits|}}}|{{#vardefine:ncols|{{#expr: {{#var:ncols}} + 1 }}}} ! 编曲}} |
|||
{{#if: {{{singer_credits|}}}|{{#vardefine:ncols|{{#expr: {{#var:ncols}} + 1 }}}} ! 演唱}} |
|||
{{#if: {{{producer_credits|}}}|{{#vardefine:ncols|{{#expr: {{#var:ncols}} + 1 }}}} ! 监制}} |
|||
{{#if: {{{extra_column|}}} |{{#vardefine:ncols|{{#expr: {{#var:ncols}} + 1 }}}} ! {{{extra_column}}}}} |
|||
{{#if: {{{longnote_column|}}}|{{#vardefine:ncols|{{#expr: {{#var:ncols}} + 1 }}}} ! 备注}} |
|||
{{#if:{{{length|}}} |{{#vardefine:ncols|{{#expr: {{#var:ncols}} + 1 }}}} ! style="width:3em" {{!}} 时长}} |
|||
{{#fornumargs: |
|||
| key |
| key |
||
| val |
| val |
||
| |
|{{#switch:{{#expr:{{#var:key}} mod {{#var:ncols}}}} |
||
| 1=-{}- |
|||
-->{{#ifeq:{{#var:length_check}} | 0 | {{#vardefine:length_check |1 }} | }} }}<!-- 是否至少一个长度值不为空,若是则设置检测参数为1 --> |
|||
{{!-}} |
|||
}}<!-- |
|||
{{!}} {{#var:key}}. {{!!}} {{#var:val}} |
|||
--><div class="tracklist" style="margin: -1px {{{reserve_width|300px}}} 0 0; min-width: 340px; {{#switch: {{{collapsed}}}|open|closed|yes = border: #aaa 1px solid; padding: 3px|padding: 4px}}"> |
|||
| #default={{!!}} {{#var:val}} |
|||
<table class="{{#switch: {{{collapsed}}}|closed|yes = mw-collapsible mw-collapsed|open = mw-collapsible }}" cellpadding="0" style="width: 100%;"> |
|||
<tr> |
|||
<th class="tlheadline" colspan="10" style="{{#switch: {{{headline_align|<!--/* 根据是否有全碟参数提出不同默认值 -->{{#if: {{#var:info}} | center | left }}<!-- */-->}}} | center = text-align: center; | right = text-align: right; padding-right: 3em; | #default = text-align: left; padding-left: 3em; }} background-color: #fff;">{{#if: {{{headline|}}}{{{1|}}} | {{{headline|}}}{{{1|}}} | 曲目列表 }}<!-- 左边是headline,右边是全碟参数 -->{{#if: {{#var:info|}} | <div style="font-weight: normal; ">{{#var:info}}</div>}}</th> |
|||
</tr> |
|||
{{#ifeq: {{{hidden}}} | yes |
|||
| <!-- 如果要求隐藏 --><tr> |
|||
<th colspan="10" style="text-align: left; background-color: #fff"> |
|||
<div style="padding-left: 2em">{{nobold|{{{hidden_note|}}} }}</div> |
|||
</th> |
|||
</tr> |
|||
| <!-- 否则 --><tr style="background-color: #eee"> |
|||
<th class="tlheader" scope="col" style="width: 3em;"><span style="white-space:nowrap;">曲序</span></th> |
|||
<th class="tlheader" style="text-align: left;">曲目</th> |
|||
{{ #ifeq: {{{writing_credits|}}}|yes| |
|||
<th class="tlheader" style="text-align: left;">-{zh-hans:作词;zh-hant:填詞;zh-tw:作詞;}-及作曲</th> |
|||
|{{ #ifeq: {{{lyrics_credits|}}}|yes| |
|||
<th class="tlheader" style="text-align: left;">-{zh-hans:作词;zh-hant:填詞;zh-tw:作詞;}-</th> |
|||
}}{{ #ifeq: {{{music_credits|}}}|yes| |
|||
<th class="tlheader" style="text-align: left;">作曲</th> |
|||
}} |
|||
}}{{#ifeq: {{{arranger_credits|}}}|yes| |
|||
<th class="tlheader" style="text-align: left;">编曲</th> |
|||
}}{{#ifeq: {{{singer_credits|}}}|yes| |
|||
<th class="tlheader" style="text-align: left;">演唱</th> |
|||
}}{{#ifeq: {{{producer_credits|}}}|yes| |
|||
<th class="tlheader" style="text-align: left;">监制</th> |
|||
}}{{#if: {{{extra_column|}}} | |
|||
<th class="tlheader" style="text-align: left;">{{{extra_column}}}</th> |
|||
}}{{#ifeq: {{{longnote_column}}}|yes| |
|||
<th class="tlheader" style="text-align: left;">备注</th> |
|||
}}{{#ifeq:{{#var:length_check}} | 0 | | |
|||
<th class="tlheader" style="padding-right: 10px; text-align: right; width: 3em;"><span style="white-space:nowrap;">时长</span></th> |
|||
}} |
|||
</tr> |
|||
{{#forargs:title |
|||
| key |
|||
| val |
|||
|{{Tracklist/Track |
|||
|switch_colour={{{switch_colour|}}} |
|||
|lyrics_credits={{{lyrics_credits|}}} |
|||
|music_credits={{{music_credits|}}} |
|||
|writing_credits={{{writing_credits|}}} |
|||
|arranger_credits={{{arranger_credits|}}} |
|||
|singer_credits={{{singer_credits|}}} |
|||
|producer_credits={{{producer_credits|}}} |
|||
|extra_column={{{extra_column|}}} |
|||
|longnote_column={{{longnote_column|}}} |
|||
|1={{#var:key|}} |
|||
|2={{#var:val|}} |
|||
|3={{{note{{#var:key|}}|}}} |
|||
|4={{{length{{#var:key|}}|}}} |
|||
|5={{{lyrics{{#var:key|}}|}}} |
|||
|6={{{music{{#var:key|}}|}}} |
|||
|7={{{writer{{#var:key|}}|}}} |
|||
|8={{{arranger{{#var:key|}}|}}} |
|||
|9={{{singer{{#var:key|}}|}}} |
|||
|10={{{producer{{#var:key|}}|}}} |
|||
|11={{{extra{{#var:key|}}|}}} |
|||
|12={{{longnote{{#var:key|}}|}}} |
|||
}} |
}} |
||
}}{{#if:{{{length|}}}|-{}- |
|||
{{!-}} |
|||
{{!}} colspan="{{#var:ncols}}" style="text-align: right;" {{!}} '''总时长:''' |
|||
{{!}} class="total_length" {{!}} 计算中 |
|||
}}{{#if:{{{more|}}}|-{}- |
|||
{{!-}} |
|||
{{!}} colspan="10" {{!}} {{{more|}}} |
|||
}} |
}} |
||
|} |
|||
{{#ifeq: {{#var:length_check}} | 0 | | {{#widget:TracklistSongLengthCalc}} |
|||
</div></includeonly><noinclude> |
|||
<tr style="text-align: right; background-color: #fff"> |
|||
<td colspan="{{#expr: (2 |
|||
{{#ifeq: {{{writing_credits}}}|yes|+1| |
|||
{{#ifeq: {{{lyrics_credits}}}|yes|+1}} |
|||
{{#ifeq: {{{music_credits}}}|yes|+1}} |
|||
}} |
|||
{{#ifeq: {{{arranger_credits}}}|yes|+1}} |
|||
{{#ifeq: {{{singer_credits}}}|yes|+1}} |
|||
{{#ifeq: {{{producer_credits}}}|yes|+1}} |
|||
{{#if: {{{extra_column|}}}|+1}} |
|||
{{#ifeq: {{{longnote_column}}}|yes|+1}} |
|||
) }}"><div style="text-align: right; padding: 5px 0 5px 10px; margin: 0">'''总时长:'''</div></td> |
|||
<td style="text-align: right; padding: 5px 10px" class="total_length"> - </td> |
|||
</tr> |
|||
}} }} |
|||
<tr style="background-color: #fff"><td colspan="10">{{{more|}}}</td></tr> |
|||
</table></div></includeonly><noinclude> |
|||
{{Documentation}} |
{{Documentation}} |
||
</noinclude> |
</noinclude> |
於 2020年8月25日 (二) 09:24 的修訂
模板文檔
這個文檔嵌入自Template:Tracklist/doc。