模板

板块:修订间差异

来自卡厄思梦境WIKI

律Rhyme留言 | 贡献
无编辑摘要
律Rhyme留言 | 贡献
无编辑摘要
 
(未显示同一用户的15个中间版本)
第1行: 第1行:
<includeonly>{{#switch: {{{1|}}}
{{#switch: {{{1|}}}
| 开始 = <div class="content-block">
| 开始 = <div class="content-block">
{{#if: {{{标题|}}} | <div class="block-header"><h2>{{{标题}}}</h2></div> | }}
{{#if: {{{标题|}}} | <div class="block-header"><h2>{{{标题}}}</h2></div> | }}
第6行: 第6行:
| 内容结束 = </div>
| 内容结束 = </div>
| 结束 = </div></div>
| 结束 = </div></div>
|文章=<div style="width:100%;overflow:hidden"><span style="float:left;width:36px;height:22px;line-height:22px;background-color:#{{#switch:{{{2}}}|公告=b96f3f|专题=4b69b9|攻略=526398|新手=449bca|科普=294184|视频=444444|角色=ab5356|推图=75a26a|同人=989898|526398}};border-radius: 2px;color: #fff;text-align: center;margin:4px 0px;margin-right:10px;font-size:12px" >{{{2|}}}</span><span style="float:left;width:calc(100% - 46px);height:22px;line-height:22px;margin:4px 0px;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;">[[{{{3|}}}|<font class="BOX-zt" style="color: rgb(255 255 255);
| 文章 = <div class="article-item"><span class="article-tag article-tag-{{#switch:{{{2}}}|公告=notice|专题=special|攻略=guide|新手=newbie|科普=science|视频=video|角色=character|推图=stage|同人=fan|guide}}">{{{2|}}}</span><span class="article-title">[[{{{3|}}}]]</span></div>
font-weight: bold;text-shadow: 1px 1px 5px #fcdd5d;;">{{#ifeq:{{{4|}}}||{{{3|}}}|{{{4|}}}}}</font>]]</span></div>
| {{{1|}}}
| {{{1|}}}
}}</includeonly><noinclude>
}}
== 使用说明 ==
{{#css:
此模板用于创建内容板块。
.content-block {
    background-color: #fff;
    padding: 10px 10px;
    border: 1px solid #dddddd;
    border-radius: 0px;
    box-shadow: 1px 0 3px rgba(0, 0, 0, .1);
}


=== 参数 ===
.block-header {
* '''1''' - 操作类型:开始/内容开始/内容结束/结束
    background: #f8f9fa;
* '''标题''' - 板块标题(仅在"开始"时使用)
    padding: 15px 20px;
    border-bottom: 2px solid #0645ad;
    flex-shrink: 0;
}


=== 示例 ===
.block-header h2 {
<pre>
    margin: 0px;
{{板块|开始|标题=官方公告}}
    font-size: 1.5em;
{{板块|内容开始}}
}
内容区域
{{板块|内容结束}}
{{板块|结束}}
</pre>


[[Category:模板]]
.block-body {
</noinclude>
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}
 
.block-content {
    line-height: 1.8;
    flex-grow: 1;
}
 
.article-item {
    display: flex;
    align-items: center;
    margin: 8px 0;
    width: 100%;
    overflow: hidden;
}
 
.article-tag {
    flex-shrink: 0;
    display: inline-block;
    width: 60px;
    height: 22px;
    line-height: 22px;
    border-radius: 2px;
    color: #fff;
    text-align: center;
    margin-right: 10px;
    font-size: 12px;
}
 
.article-tag-notice { background-color: #b96f3f; }
.article-tag-special { background-color: #4b69b9; }
.article-tag-guide { background-color: #526398; }
.article-tag-newbie { background-color: #449bca; }
.article-tag-science { background-color: #294184; }
.article-tag-video { background-color: #444444; }
.article-tag-character { background-color: #ab5356; }
.article-tag-stage { background-color: #75a26a; }
.article-tag-fan { background-color: #989898; }
 
.article-title {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    height: 22px;
    line-height: 22px;
}
 
.article-title a {
    color: inherit;
    text-decoration: none;
}
 
.article-title a:hover {
    color: #0645ad;
    text-decoration: underline;
}
 
.article-category {
    color: #666;
    font-size: 0.9em;
}
 
.view-more {
    text-align: right;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    flex-shrink: 0;
}
 
.article-info-box {
    float: right;
    margin: 0 0 15px 15px;
    max-width: 300px;
}
 
.article-meta {
    font-size: 0.9em;
}
 
.large-4.columns {
    vertical-align: top;
}
}}

2025年10月14日 (二) 16:20的最新版本