「テンプレート:折り畳みボックス」の版間の差分

WikiPediaで使用されている折り畳み式ボックスのテンプレートを自前で作成(テスト)
 
ダークモード対応テスト
 
(同じ利用者による、間の12版が非表示)
1行目: 1行目:
<!-- 折り畳み式テンプレート -->
<!-- 折り畳み式テンプレート -->
<div class="custom-template-expandable-box">
<div class="custom-template-expandable-box" style="border: 1px solid gray;"  data-opened="{{{opened|False}}}">
    <div class="custom-template-expandable-box-header">
<div class="custom-template-expandable-box-header" style="background-color:light-dark( {{{header_color|white}}}, #0b0b00); display: flex; justify-content: space-between;">
        <p>{{{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"></p>
<p class="custom-template-expandable-box-toggle-label" style="flex-shrink: 0; padding: 0; margin: 0; color: blue; text-decoration: underline; cursor: pointer; width: 4rem; text-align: right;"></p>
    </div>
</div>
    <div class="custom-template-expandable-box-contents">
<div class="custom-template-expandable-box-contents" style="padding: 0rem; background-color: light-dark(#fcfcfc, black) !important; ">
        {{{contents}}}
{{{contents}}}
    </div>
</div>
</div>
</div>
<!-- ここまで -->
<!-- ここまで -->
 
<noinclude>
{{documentation}}
</noinclude>
<noinclude>
<noinclude>
<templatedata>
<templatedata>
45行目: 47行目:
"type": "boolean",
"type": "boolean",
"default": "False"
"default": "False"
},
"header_color": {
"aliases": [
"ヘッダーカラー"
],
"label": "ヘッダーの色",
"description": "ヘッダーの色を16進数カラーコードで記載します。CSSに埋め込まれるので認識できればカラーコードじゃなくても構いません。",
"example": "#000000 / gray / rgb(255, 128, 0) など",
"default": "silver"
}
}
},
},
"description": "WikiPediaで使用されているガジェットの表示・非表示を切り替えられるテンプレートを再現しました。100%ではないですがテンプレートとして配置することができます。",
"description": "WikiPediaで使用されているガジェットの表示・非表示を切り替えられるテンプレートを再現しました。再現率は100%ではないですがテンプレートとして配置することができます。",
"format": "block"
"format": "block"
}
}
</templatedata>
</templatedata>
</noinclude>
</noinclude>