「テンプレート:折り畳みボックス」の版間の差分
表示
細編集の要約なし |
細 CSS調整 |
||
| 3行目: | 3行目: | ||
<div class="custom-template-expandable-box-header" style="background-color: {{{header_color}}}; display: flex; justify-content: space-between;"> | <div class="custom-template-expandable-box-header" style="background-color: {{{header_color}}}; display: flex; justify-content: space-between;"> | ||
<p style="text-align: center; width: 100%; font-size: 120%; font-weight: bold; margin: 0;">{{{title}}}</p> | <p style="text-align: center; width: 100%; font-size: 120%; font-weight: bold; margin: 0;">{{{title}}}</p> | ||
<p class="custom-template-expandable-box-toggle-label" style="flex-shrink: 0; padding: 0 0.5rem; margin: 0; color: blue; text-decoration: underline; cursor: pointer;"> | <p class="custom-template-expandable-box-toggle-label" style="flex-shrink: 0; padding: 0 0.5rem; margin: 0; color: blue; text-decoration: underline; cursor: pointer; width: 4rem; text-align: right;"></p> | ||
</div> | </div> | ||
<div class="custom-template-expandable-box-contents" style="padding: 0.5rem; background-color: #fcfcfc; "> | <div class="custom-template-expandable-box-contents" style="padding: 0.5rem; background-color: #fcfcfc; "> | ||
2025年12月11日 (木) 13:12時点における版
WikiPediaで使用されているガジェットの表示・非表示を切り替えられるテンプレートを再現しました。100%ではないですがテンプレートとして配置することができます。(現時点作成中)
| パラメーター | 説明 | 型 | 状態 | |
|---|---|---|---|---|
| タイトル | title タイトル | 折り畳みボックスのタイトルを指定します。常時表示されます。
| 文字列 | 必須 |
| 内容 | contents 内容 コンテンツ | 折り畳みボックスに格納するコンテンツを入力します。技術的な制約から、ビジュアルエディターで挿入する場合でもソースコードからコピーして入力してください。中身がなくても作れますが意味がないので入れてください。 | 文字列 | 推奨 |
| デフォルトの開閉 | opened フラグ 開く | Trueに設定すると、デフォルトでこの折り畳みBOXは開いた状態になります。既定値はFalseです。
| ブール値 | 省略可能 |
| ヘッダーの色 | header_color ヘッダーカラー | ヘッダーの色を16進数カラーコードで記載します。CSSに埋め込まれるので認識できればカラーコードじゃなくても構いません。
| 不明 | 省略可能 |