※ ログインしていません。編集を行うと、あなたのIPアドレスが公開されます。ログインまたはアカウントを作成すれば、あなたの編集はその利用者名とともに表示されるほか、さまざまなメリットもあります。スパム攻撃防止用のチェックです。 決して、ここには、値の入力はしないでください!/** * Auto-number headings * * @source https://www.mediawiki.org/wiki/Snippets/Auto-number_headings * @author Krinkle * @version 2024-04-25 */ /** * Fallback for pages without a TOC. This could in principle work for all pages, * but we want to ensure consistency between the TOC and heading numbers. */ .tpl-autonum .mw-parser-output { counter-reset: autonum-h2 autonum-h3 autonum-h4 autonum-h5 autonum-h6; } .tpl-autonum .mw-parser-output h2 { counter-reset: autonum-h3 autonum-h4 autonum-h5 autonum-h6; } .tpl-autonum .mw-parser-output h3 { counter-reset: autonum-h4 autonum-h5 autonum-h6; } .tpl-autonum .mw-parser-output h4 { counter-reset: autonum-h5 autonum-h6; } .tpl-autonum .mw-parser-output h5 { counter-reset: autonum-h6; } .tpl-autonum .mw-parser-output h2 .mw-headline:before, .tpl-autonum .mw-parser-output .mw-heading h2:before { counter-increment: autonum-h2; content: counter(autonum-h2) " "; } .tpl-autonum .mw-parser-output h3 .mw-headline:before, .tpl-autonum .mw-parser-output .mw-heading h3:before { counter-increment: autonum-h3; content: counter(autonum-h2) "." counter(autonum-h3) " "; } .tpl-autonum .mw-parser-output h4 .mw-headline:before, .tpl-autonum .mw-parser-output .mw-heading h4:before { counter-increment: autonum-h4; content: counter(autonum-h2) "." counter(autonum-h3) "." counter(autonum-h4) " "; } .tpl-autonum .mw-parser-output h5 .mw-headline:before, .tpl-autonum .mw-parser-output .mw-heading h5:before { counter-increment: autonum-h5; content: counter(autonum-h2) "." counter(autonum-h3) "." counter(autonum-h4) "." counter(autonum-h5) " "; } .tpl-autonum .mw-parser-output h6 .mw-headline:before, .tpl-autonum .mw-parser-output .mw-heading h6:before { counter-increment: autonum-h6; content: counter(autonum-h2) "." counter(autonum-h3) "." counter(autonum-h4) "." counter(autonum-h5) "." counter(autonum-h6) " "; } /* CSSモード(TOCなし) */ .tpl-autonum .mw-parser-output .mw-heading h2::before, .tpl-autonum .mw-parser-output .mw-heading h3::before, .tpl-autonum .mw-parser-output .mw-heading h4::before, .tpl-autonum .mw-parser-output .mw-heading h5::before, .tpl-autonum .mw-parser-output .mw-heading h6::before { color: green; /* 緑色 */ } /* JSモード(TOCあり) */ .tpl-autonum-attr .mw-parser-output .mw-headline[data-autonum]::before, .tpl-autonum-attr .mw-parser-output h2[data-autonum]::before, .tpl-autonum-attr .mw-parser-output h3[data-autonum]::before, .tpl-autonum-attr .mw-parser-output h4[data-autonum]::before, .tpl-autonum-attr .mw-parser-output h5[data-autonum]::before, .tpl-autonum-attr .mw-parser-output h6[data-autonum]::before { color: green; /* 緑色 */ } .mw-headline-autonum { color: green; font-weight: bold; } 編集内容の要約: 宇宙wikiへの投稿はすべて、クリエイティブ・コモンズ 表示-継承 (詳細は宇宙wiki:著作権を参照)のもとで公開したと見なされることにご注意ください。 自分が書いたものが他の人に容赦なく編集され、自由に配布されるのを望まない場合は、ここに投稿しないでください。 また、投稿するのは、自分で書いたものか、パブリック ドメインまたはそれに類するフリーな資料からの複製であることを約束してください。 著作権保護されている作品は、許諾なしに投稿しないでください! キャンセル 編集ヘルプ (新しいウィンドウで開きます)