「MediaWiki:Gadget-StyleGuide.js」の版間の差分

挿入しやすく
(基本情報テンプレートを挿入できるように)
(挿入しやすく)
7行目: 7行目:
                 deferLoad: true,
                 deferLoad: true,
                 pages: {
                 pages: {
                     'infoboxes': {
                     'headers': {
                         'layout': 'characters',
                         'layout': 'characters',
                         'label': '基本情報テンプレート',
                         'label': 'ヘッダ要素',
                         'characters': [
                         'characters': [
                            {
                                label: '{{グループ情報}}',
                                action: {
                                    type: 'encapsulate',
                                    options: {
                                        pre: '{{グループ情報\n| グループ名 = \n| 画像 = \n| 関連ページ = \n| 活動期間 = \n| チーム = \n| レーベル = \n| 総合プロデューサー = \n| 公式サイト = \n}}',
                                        ownline: true
                                    }
                                }
                            },
                            {
                                label: '{{ユニット情報}}',
                                action: {
                                    type: 'encapsulate',
                                    options: {
                                        pre: '{{ユニット情報\n| 名前 = \n| 画像 = \n| 活動期間 = \n| レーベル = \n| 事務所 = \n| 公式サイト = \n| メンバー = \n| 旧メンバー = \n}}',
                                        ownline: true
                                    }
                                }
                            },
                             {
                             {
                                 label: '{{メンバー情報}}',
                                 label: '{{メンバー情報}}',
16行目: 36行目:
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{メンバー情報\n| グループ = \n| チーム = \n| 名前 = \n| 読み = \n| 画像 = \n| 公式ニックネーム = \n| 所属事務所 = \n| 生年月日 = \n| 出身地 = \n| 血液型 = \n| 身長 = \n| 体重 = \n| スリーサイズ = \n| 靴のサイズ = \n| 合格期 = \n| 所属ユニット = \n| 選抜回数 = \n| サイリウム = \n| 第○回総選挙 = \n| 第○回じゃんけん大会 = \n}}'
                                         pre: '{{メンバー情報\n| グループ = \n| チーム = \n| 名前 = \n| 読み = \n| 画像 = \n| 公式ニックネーム = \n| 所属事務所 = \n| 生年月日 = \n| 出身地 = \n| 血液型 = \n| 身長 = \n| 体重 = \n| スリーサイズ = \n| 靴のサイズ = \n| 合格期 = \n| 所属ユニット = \n| 選抜回数 = \n| サイリウム = \n}}',
                                        ownline: true
                                    }
                                }
                            },
                            {
                                label: '{{関係者情報}}',
                                action: {
                                    type: 'encapsulate',
                                    options: {
                                        pre: '{{関係者情報\n| 名前 = \n| 読み = \n| 役職 = \n| bgcolor = \n| 画像 = \n| ニックネーム = \n| 所属事務所 = \n| 生年月日 = \n| 出身地 = \n| 血液型 = \n| 身長 = \n| 体重 = \n}}',
                                        ownline: true
                                     }
                                     }
                                 }
                                 }
25行目: 56行目:
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{シングル情報\n| タイトル = \n| アーティスト = \n| 通算枚数 = \n| 区分 = シングル\n| 画像 = \n| 発売日 = \n| レーベル = \n| 選抜人数 = \n| 販売形態 = \n| 週間ランキング = \n| 初週売上 = \n| 月間ランキング = \n| 初月売上 = \n| 年間ランキング = \n| 売上枚数 = \n| 前作 = \n| 次作 = \n}}'
                                         pre: '{{シングル情報\n| タイトル = \n| アーティスト = \n| 通算枚数 = \n| 区分 = シングル\n| 画像 = \n| 発売日 = \n| レーベル = \n| 選抜人数 = \n| 販売形態 = \n| 週間ランキング = \n| 初週売上 = \n| 月間ランキング = \n| 初月売上 = \n| 年間ランキング = \n| 売上枚数 = \n| 前作 = \n| 次作 = \n}}',
                                        ownline: true
                                     }
                                     }
                                 }
                                 }
                             },
                             },
                             {
                             {
                                 label: '{{楽曲情報}}',
                                 label: '{{アルバム情報}}',
                                 action: {
                                 action: {
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{楽曲情報\n| タイトル = \n| 名義 = \n| 画像 = \n| 作詞 = \n| 作曲 = \n| 編曲 = \n| YouTube = \n| MV監督 = \n| タイアップ = \n}}'
                                         pre: '{{アルバム情報\n| タイトル = \n| アーティスト = \n| 通算枚数 = \n| 区分 = シングル\n| 画像 = \n| 発売日 = \n| レーベル = \n| 選抜人数 = \n| 販売形態 = \n| 週間ランキング = \n| 初週売上 = \n| 月間ランキング = \n| 初月売上 = \n| 年間ランキング = \n| 売上枚数 = \n| 前作 = \n| 次作 = \n}}',
                                        ownline: true
                                     }
                                     }
                                 }
                                 }
                             },
                             },
                        ]
                    },
                    'templates': {
                        'layout': 'characters',
                        'label': '編集用テンプレート',
                        'characters': [
                             {
                             {
                                 label: '{{注釈}}',
                                 label: '{{楽曲情報}}',
                                 action: {
                                 action: {
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{注釈|',
                                         pre: '{{楽曲情報\n| タイトル = \n| 名義 = \n| 画像 = \n| 作詞 = \n| 作曲 = \n| 編曲 = \n| YouTube = \n| MV監督 = \n| タイアップ = \n}}',
                                         post: '}}'
                                         ownline: true
                                     }
                                     }
                                 }
                                 }
                             },
                             },
                             {
                             {
                                 label: '<ref></ref>',
                                 label: '[[ファイル:<ファイル名>|250px]]',
                                 action: {
                                 action: {
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '<ref>',
                                         pre: '[[ファイル:',
                                         post: '</ref>'
                                         post: '|250px]]'
                                     }
                                     }
                                 }
                                 }
                             },
                             },
                             {
                             {
                                 label: '<ref name=""></ref>',
                                 label: '{{書きかけ}}',
                                 action: {
                                 action: {
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '<ref name="">',
                                         pre: '{{書きかけ}}',
                                         post: '</ref>'
                                         ownline: true
                                     }
                                     }
                                 }
                                 }
                             },
                             },
                             {
                             {
                                 label: '{{要出典}}',
                                 label: '{{編集者希望}}',
                                 action: {
                                 action: {
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{要出典|範囲=',
                                         pre: '{{編集者希望}}',
                                         post: '}}'
                                         ownline: true
                                     }
                                     }
                                 }
                                 }
                             },
                             },
                             {
                             {
                                 label: '{{出典 Google+}}',
                                 label: '{{情報希望}}',
                                 action: {
                                 action: {
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{出典 Google+|url=',
                                         pre: '{{情報希望|',
                                         post: '|by=|date=}}'
                                         post: '}}',
                                        ownline: true
                                     }
                                     }
                                 }
                                 }
                             },
                             },
                             {
                             {
                                 label: '{{編集合戦}}',
                                 label: '{{更新}}',
                                 action: {
                                 action: {
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{編集合戦|text=',
                                         pre: '{{更新}}',
                                        post: '}}',
                                         ownline: true
                                         ownline: true
                                     }
                                     }
106行目: 133行目:
                             },
                             },
                             {
                             {
                                 label: '{{書きかけ}}',
                                 label: '{{雑多}}',
                                 action: {
                                 action: {
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{書きかけ|text=',
                                         pre: '{{雑多}}',
                                        post: '}}',
                                         ownline: true
                                         ownline: true
                                     }
                                     }
121行目: 147行目:
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{発売前|text=',
                                         pre: '{{発売前|',
                                         post: '}}',
                                         post: '}}',
                                         ownline: true
                                         ownline: true
132行目: 158行目:
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{予定|date=',
                                         pre: '{{予定}}',
                                         post: '|text=}}',
                                         ownline: true
                                    }
                                }
                            },
                            {
                                label: '{{最新の出来事}}',
                                action: {
                                    type: 'encapsulate',
                                    options: {
                                        pre: '{{最新の出来事}}',
                                        ownline: true
                                    }
                                }
                            },
                            {
                                label: '{{最終更新}}',
                                action: {
                                    type: 'encapsulate',
                                    options: {
                                        pre: '{{最終更新}}',
                                         ownline: true
                                         ownline: true
                                     }
                                     }
143行目: 188行目:
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{出典明記|text=',
                                         pre: '{{出典明記}}',
                                        ownline: true
                                    }
                                }
                            },
                            {
                                label: '{{編集合戦}}',
                                action: {
                                    type: 'encapsulate',
                                    options: {
                                        pre: '{{編集合戦}}',
                                        ownline: true
                                    }
                                }
                            },
                            {
                                label: '{{保護中}}',
                                action: {
                                    type: 'encapsulate',
                                    options: {
                                        pre: '{{保護中|reason=',
                                         post: '}}',
                                         post: '}}',
                                         ownline: true
                                         ownline: true
149行目: 214行目:
                                 }
                                 }
                             },
                             },
                        ]
                    },
                    'templates': {
                        'layout': 'characters',
                        'label': '編集用テンプレート',
                        'characters': [
                            {
                                label: '{{要出典}}',
                                action: {
                                    type: 'encapsulate',
                                    options: {
                                        pre: '{{要出典}}'
                                    }
                                }
                            },
                            {
                                label: '{{要出典|}}',
                                action: {
                                    type: 'encapsulate',
                                    options: {
                                        pre: '{{要出典|',
                                        post: '}}'
                                    }
                                }
                            },
                            {
                                label: '<ref></ref>',
                                action: {
                                    type: 'encapsulate',
                                    options: {
                                        pre: '<ref>',
                                        post: '</ref>'
                                    }
                                }
                            },
                            {
                                label: '<ref name=""></ref>',
                                action: {
                                    type: 'encapsulate',
                                    options: {
                                        pre: '<ref name="">',
                                        post: '</ref>'
                                    }
                                }
                            },
                            {
                                label: '{{出典 Google+|url= |by= |date= }}',
                                action: {
                                    type: 'encapsulate',
                                    options: {
                                        pre: '{{出典 Google+|url=',
                                        post: '|by=|date=}}'
                                    }
                                }
                            },
                            {
                                label: '{{注釈}}',
                                action: {
                                    type: 'encapsulate',
                                    options: {
                                        pre: '{{注釈|',
                                        post: '}}'
                                    }
                                }
                            },
                        ]
                    },
                    'footers': {
                        'layout': 'characters',
                        'label': 'フッタ要素',
                        'characters': [
                             {
                             {
                                 label: '{{編集者希望}}',
                                 label: '== 注釈 ==',
                                 action: {
                                 action: {
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{編集者希望|text=',
                                         pre: '== 注釈 ==\n<references group="注釈" />',
                                        post: '}}',
                                         ownline: true
                                         ownline: true
                                     }
                                     }
161行目: 296行目:
                             },
                             },
                             {
                             {
                                 label: '{{情報希望}}',
                                 label: '== 出典 ==',
                                 action: {
                                 action: {
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{情報希望|text=',
                                         pre: '== 出典 ==\n<references />',
                                        post: '}}',
                                         ownline: true
                                         ownline: true
                                     }
                                     }
172行目: 306行目:
                             },
                             },
                             {
                             {
                                 label: '{{更新}}',
                                 label: '{{DEFAULTSORT:}}',
                                 action: {
                                 action: {
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{更新|text=',
                                         pre: '{{DEFAULTSORT:',
                                         post: '}}',
                                         post: '}}',
                                         ownline: true
                                         ownline: true
183行目: 317行目:
                             },
                             },
                             {
                             {
                                 label: '{{雑多}}',
                                 label: '[[カテゴリ:]]',
                                 action: {
                                 action: {
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{雑多|text=',
                                         pre: '[[カテゴリ:',
                                         post: '}}',
                                         post: ']]',
                                         ownline: true
                                         ownline: true
                                     }
                                     }
194行目: 328行目:
                             },
                             },
                             {
                             {
                                 label: '{{最終更新}}',
                                 label: '[[jawp:]]',
                                 action: {
                                 action: {
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{最終更新|text=',
                                         pre: '[[jawp:',
                                         post: '}}',
                                         post: ']]',
                                         ownline: true
                                         ownline: true
                                     }
                                     }
205行目: 339行目:
                             },
                             },
                             {
                             {
                                 label: '{{最新の出来事}}',
                                 label: '[[akb49:]]',
                                 action: {
                                 action: {
                                     type: 'encapsulate',
                                     type: 'encapsulate',
                                     options: {
                                     options: {
                                         pre: '{{最新の出来事|date=',
                                         pre: '[[akb49:',
                                         post: '|text=}}',
                                         post: ']]',
                                         ownline: true
                                         ownline: true
                                     }
                                     }
                                 }
                                 }
                             },
                             },
                        ]
                    },
                    footer: {
                        layout: 'table',
                        label: 'フッタ要素',
                        headings: [
                            { text: '解説' },
                            { text: '入力例' },
                            { text: '出力結果' }
                        ],
                        rows: [
                             {
                             {
                                 description: { html: '脚注の表示' },
                                 label: '[[stage48:]]',
                                syntax: { html: '<span style="cursor:pointer;" onclick="insertTags(\'== 注釈 ==\\n&lt;references group=&quot;注釈&quot; /&gt;\')">== 注釈 ==<br>&lt;references group=&quot;注釈&quot; /&gt;</span><br><span style="cursor:pointer;" onclick="insertTags(\'== 出典 ==\\n&lt;references /&gt;\')">== 出典 ==<br>&lt;references /&gt;</span>' },
                                action: {
                                 result: { html: '<h2>注釈</h2><ol class="references"><li id="cite_note-test-0"><span class="mw-cite-backlink"><a href="#">^</a></span> <span class="reference-text">注釈テキスト</span></li></ol><h2>出典</h2><ol class="references"><li id="cite_note-test-0"><span class="mw-cite-backlink"><a href="#">^</a></span> <span class="reference-text">出典テキスト</span></li></ol>' }
                                    type: 'encapsulate',
                                    options: {
                                        pre: '[[stage48:',
                                        post: ']]',
                                        ownline: true
                                    }
                                 }
                             },
                             },
                             {
                             {
                                 description: { html: 'DEFAULTSORT' },
                                 label: '[[akb48wikia:]]',
                                 syntax: { html: '<span style="cursor:pointer;" onclick="insertTags(\'{{DEFAULTSORT:\',\'}}\\n\')">{{DEFAULTSORT:まついしゆりな}}</span>' },
                                 action: {
                                 result: { html: '<span style="color:#999;">DEFUALTSORTは、表示されません</span>' }
                                    type: 'encapsulate',
                                    options: {
                                        pre: '[[akb48wikia:',
                                        post: ']]',
                                        ownline: true
                                    }
                                 }
                             },
                             },
                             {
                             {
                                 description: { html: '言語間リンク' },
                                 label: '[[nogipedia:]]',
                                syntax: { html: '<span style="cursor:pointer;" onclick="insertTags(\'[[jawp:\',\']]\\n\')">[[jawp:乃木坂46]]</span><br><span style="cursor:pointer;" onclick="insertTags(\'[[akb49:\',\']]\\n\')">[[akb49:乃木坂46]]</span><br><span style="cursor:pointer;" onclick="insertTags(\'[[stage48:\',\']]\\n\')">[[stage48:Nogizaka46]]</span><br><span style="cursor:pointer;" onclick="insertTags(\'[[akb48wikia:\',\']]\\n\')">[[akb48wikia:Nogizaka46]]</span><br><span style="cursor:pointer;" onclick="insertTags(\'[[nogipedia:\',\']]\\n\')">[[nogipedia:乃木坂46]]</span>' },
                                action: {
                                 result: { html: '<span style="color:#999;">言語間リンクは、表示されません</span>' }
                                    type: 'encapsulate',
                                    options: {
                                        pre: '[[nogipedia:',
                                        post: ']]',
                                        ownline: true
                                    }
                                 }
                             },
                             },
                         ]
                         ]
255行目: 396行目:
                                 name: { html: 'グループ<br>グループ<i>n</i>' },
                                 name: { html: 'グループ<br>グループ<i>n</i>' },
                                 example: { html: 'AKB48' },
                                 example: { html: 'AKB48' },
                                 description: { html: '所属グループ、もしくは過去の所属グループ' }
                                 description: { html: '所属グループ' }
                             },
                             },
                             {
                             {
                                 name: { html: 'チーム<br>チーム<i>n</i>' },
                                 name: { html: 'チーム<br>チーム<i>n</i>' },
                                 example: { html: 'チームA、研究生、<br>卒業生、元メンバー、兼任終了' },
                                 example: { html: 'チームA、研究生' },
                                 description: { html: '「グループ」に対応する所属チーム<br>過去の所属は入力せず「卒業生」などとする' }
                                 description: { html: '「グループ」に対応する所属チーム' }
                             },
                             },
                             {
                             {
                                 name: { html: '新グループ' },
                                 name: { html: '元グループ<br>元グループ<i>n</i>' },
                                 example: { html: '' },
                                 example: { html: 'AKB48' },
                                 description: { html: '組閣などで異動予定のグループ' }
                                 description: { html: '過去の所属グループ<br>現在48・46グループに所属している場合は入力しない' }
                            },
                            {
                                name: { html: '新チーム' },
                                example: { html: '' },
                                description: { html: '組閣などで異動予定のチーム' }
                             },
                             },
                             {
                             {
6,514

回編集