Extension:HeaderSections/ja

Category:MIT licensed extensions/ja
MediaWiki 拡張機能マニュアル
HeaderSections
リリースの状態: 安定Category:Stable extensions/ja
実装 ユーザー インターフェイスCategory:User interface extensions/ja, 外装 Category:Skin extensions/ja
説明 A MediaWiki extension that adds a CSS class to the section of content below a header.
作者 Derf Jaggedトーク
最新バージョン 1.0 (2022-12-30)
MediaWiki 1.25+Category:Extensions with manual MediaWiki version
PHP 5.5+
データベースの変更 いいえ
ライセンス MIT ライセンス
ダウンロード Category:Extensions in GitHub version control/ja
ConsoleMods.org
Category:All extensions/jaCategory:Extensions not in ExtensionJson

HeaderSections is a MediaWiki extension that adds a CSS class to the section of content below a header. This effectively allows for CSS styling to be applied to sections such as different background colors or indent levels for H2 and H3 sections or to target a certain section type using your own custom JavaScript. This extension is based on the HideSection extension.

This extension tags sections hierarchically, meaning a nested element under multiple parent headers will have current section tag (e.g. H3-section) and all parent section tags (e.g. H1-section and H2-section).

For reporting an issue or a bug, please open a GitHub issue.

Installation

Requires MediaWiki 1.25 or higher for wfLoadExtension registration.

  • Downloadして、ファイルをextensions/フォルダー内のHeaderSectionsという名前のディレクトリ内に配置します。
  • 以下のコードを LocalSettings.php ファイルの末尾に追加します:
    wfLoadExtension( 'HeaderSections' );
    
  • Yes 完了 – ウィキの「Special:Version」に移動して、拡張機能が正しくインストールされたことを確認します。

Configuration

ext.headersections.css - Edit contents of stylesheet as desired.

Your CSS rules in ext.headersections.css needs to be in the proper order so that the higher numbered section rules (H4) take precedence over the lower-numbered section rules (H3).

Default configuration is set to indent each section following a header by an increasing amount using these CSS classes:

.H1-section
.H2-section
.H3-section
.H4-section
.H5-section
.H6-section

See also

Category:All extensions/ja Category:BeforePageDisplay extensions/ja Category:Extensions in GitHub version control/ja Category:Extensions not in ExtensionJson Category:Extensions with manual MediaWiki version Category:MIT licensed extensions/ja Category:Skin extensions/ja Category:Stable extensions/ja Category:User interface extensions/ja