板块:修订间差异
来自卡厄思梦境WIKI
创建页面,内容为“<includeonly>{{#switch: {{{1|}}} | 开始 = <div class="content-block"> {{#if: {{{标题|}}} | <div class="block-header"><h2>{{{标题}}}</h2></div> | }} <div class="block-body"> | 内容开始 = <div class="block-content"> | 内容结束 = </div> | 结束 = </div></div> | {{{1|}}} }}</includeonly><noinclude> == 使用说明 == 此模板用于创建内容板块。 === 参数 === * '''1''' - 操作类型:开始/内容开始/内容结束/结束 * '''标题…” |
小无编辑摘要 |
||
| (未显示同一用户的16个中间版本) | |||
| 第1行: | 第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> | }} | ||
<div class="block-body"> | <div class="block-body"> | ||
| 内容开始 = <div class="block-content"> | |||
| 内容结束 = </div> | |||
| 结束 = </div></div> | |||
| 文章 = <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> | |||
| {{{1|}}} | |||
}} | |||
{{#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 { | |||
background: #f8f9fa; | |||
padding: 15px 20px; | |||
border-bottom: 2px solid #0645ad; | |||
flex-shrink: 0; | |||
} | |||
.block-header h2 { | |||
margin: 0px; | |||
font-size: 1.5em; | |||
} | |||
.block-body { | |||
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的最新版本