MediaWiki:Common.css:修订间差异
来自勿忘草与永远的少女
跳到导航跳到搜索
无编辑摘要 |
无编辑摘要 |
||
| 第1行: | 第1行: | ||
/* ========== 自定义首页样式 ========== */ | /* ========== 自定义首页样式 ========== */ | ||
| 第302行: | 第7行: | ||
} | } | ||
/* | /* 全站通知样式 */ | ||
.custom-homepage .notice { | |||
background: #f8f9fa; | |||
border-left: 4px solid #36c; | |||
padding: 10px 15px; | |||
margin: 10px 0; | |||
font-size: 14px; | |||
} | |||
/* 顶部行布局 - 横幅 + 更新公告并排 */ | /* 顶部行布局 - 横幅 + 更新公告并排 */ | ||
| 第311行: | 第23行: | ||
margin-bottom: 30px; | margin-bottom: 30px; | ||
} | } | ||
/* 横幅容器 | |||
/* 横幅容器 */ | |||
.custom-homepage .hero-banner { | .custom-homepage .hero-banner { | ||
flex: 2; | flex: 2; | ||
| 第324行: | 第37行: | ||
width: 100% !important; | width: 100% !important; | ||
height: auto !important; | height: auto !important; | ||
object-fit: contain; | object-fit: contain; | ||
border-radius: 12px; | border-radius: 12px; | ||
} | } | ||
| 第345行: | 第58行: | ||
} | } | ||
/* 四个自定义卡片 */ | /* ========== 四个自定义卡片 ========== */ | ||
.custom-homepage .feature-cards { | .custom-homepage .feature-cards { | ||
display: grid; | display: grid; | ||
grid-template-columns: repeat( | grid-template-columns: repeat(4, 1fr); /* 固定四列,宽度均分 */ | ||
gap: 20px; | gap: 20px; | ||
margin-bottom: 40px; | margin-bottom: 40px; | ||
| 第354行: | 第67行: | ||
.custom-homepage .feature-card { | .custom-homepage .feature-card { | ||
padding: | padding: 20px 15px; | ||
border-radius: 16px; | border-radius: 16px; | ||
text-align: center; | text-align: center; | ||
transition: transform 0.2s, box-shadow 0.2s; | transition: transform 0.2s, box-shadow 0.2s; | ||
cursor: pointer; | cursor: pointer; | ||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
align-items: center; | |||
min-height: 180px; /* 与兑换码卡片高度匹配 */ | |||
} | } | ||
| 第366行: | 第84行: | ||
} | } | ||
.custom-homepage .feature-card .icon { | /* 卡片图标 - MediaWiki 图片样式 */ | ||
.custom-homepage .feature-card .card-icon { | |||
margin-bottom: 12px; | margin-bottom: 12px; | ||
line-height: 1; | |||
} | } | ||
.custom-homepage .feature-card .card-icon img { | |||
width: 60px; | |||
height: 60px; | |||
object-fit: contain; | |||
display: block; | |||
margin: 0 auto; | |||
} | |||
/* 卡片文字链接 */ | |||
.custom-homepage .feature-card a { | .custom-homepage .feature-card a { | ||
color: white; | color: white; | ||
| 第377行: | 第105行: | ||
font-weight: bold; | font-weight: bold; | ||
display: block; | display: block; | ||
margin-top: 8px; | |||
} | } | ||
| 第402行: | 第131行: | ||
} | } | ||
/* 角色一览区域 */ | /* ========== 角色一览区域 ========== */ | ||
.custom-homepage .character-section { | .custom-homepage .character-section { | ||
margin-top: 30px; | margin-top: 30px; | ||
| 第470行: | 第199行: | ||
} | } | ||
/* | /* ========== 更新公告卡片 ========== */ | ||
.custom-homepage .update-card { | .custom-homepage .update-card { | ||
flex: 1; | flex: 1; | ||
| 第481行: | 第210行: | ||
} | } | ||
.custom-homepage .update-card h3 { | .custom-homepage .update-card h3 { | ||
margin-top: 0; | margin-top: 0; | ||
| 第507行: | 第235行: | ||
} | } | ||
/* 兑换码卡片 */ | /* ========== 兑换码卡片 ========== */ | ||
.custom-homepage .redeem-card { | .custom-homepage .redeem-card { | ||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); | ||
| 第513行: | 第241行: | ||
padding: 20px; | padding: 20px; | ||
color: white; | color: white; | ||
min-height: 180px; /* 与卡片高度一致 */ | |||
display: flex; | |||
flex-direction: column; | |||
justify-content: center; | |||
} | } | ||
| 第546行: | 第278行: | ||
margin-top: 15px; | margin-top: 15px; | ||
transition: transform 0.2s; | transition: transform 0.2s; | ||
text-align: center; | |||
} | } | ||
| 第552行: | 第285行: | ||
} | } | ||
/* 响应式布局 */ | /* ========== 响应式布局 ========== */ | ||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.custom-homepage .feature-cards { | .custom-homepage .feature-cards { | ||
| 第560行: | 第293行: | ||
.custom-homepage .feature-card { | .custom-homepage .feature-card { | ||
min-height: 150px; | |||
padding: 15px 10px !important; | padding: 15px 10px !important; | ||
} | } | ||
.custom-homepage .feature-card .icon { | .custom-homepage .feature-card .card-icon img { | ||
width: 45px; | |||
height: 45px; | |||
} | } | ||
| 第570行: | 第305行: | ||
grid-template-columns: repeat(2, 1fr) !important; | grid-template-columns: repeat(2, 1fr) !important; | ||
gap: 12px !important; | gap: 12px !important; | ||
} | |||
.custom-homepage .redeem-card { | |||
min-height: auto; | |||
} | } | ||
} | } | ||
2026年3月28日 (六) 22:25的版本
/* ========== 自定义首页样式 ========== */
/* 首页容器 */
.custom-homepage {
max-width: 1400px;
margin: 0 auto;
}
/* 全站通知样式 */
.custom-homepage .notice {
background: #f8f9fa;
border-left: 4px solid #36c;
padding: 10px 15px;
margin: 10px 0;
font-size: 14px;
}
/* 顶部行布局 - 横幅 + 更新公告并排 */
.custom-homepage .top-row {
display: flex;
gap: 25px;
flex-wrap: wrap;
margin-bottom: 30px;
}
/* 横幅容器 */
.custom-homepage .hero-banner {
flex: 2;
min-width: 250px;
text-align: center;
overflow: hidden;
margin-bottom: 0;
}
/* 横幅图片 */
.custom-homepage .hero-banner img {
width: 100% !important;
height: auto !important;
object-fit: contain;
border-radius: 12px;
}
/* 两栏布局 */
.custom-homepage .two-columns {
display: flex;
gap: 25px;
flex-wrap: wrap;
}
.custom-homepage .left-column {
flex: 2;
min-width: 250px;
}
.custom-homepage .right-column {
flex: 1;
min-width: 280px;
}
/* ========== 四个自定义卡片 ========== */
.custom-homepage .feature-cards {
display: grid;
grid-template-columns: repeat(4, 1fr); /* 固定四列,宽度均分 */
gap: 20px;
margin-bottom: 40px;
}
.custom-homepage .feature-card {
padding: 20px 15px;
border-radius: 16px;
text-align: center;
transition: transform 0.2s, box-shadow 0.2s;
cursor: pointer;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
min-height: 180px; /* 与兑换码卡片高度匹配 */
}
.custom-homepage .feature-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}
/* 卡片图标 - MediaWiki 图片样式 */
.custom-homepage .feature-card .card-icon {
margin-bottom: 12px;
line-height: 1;
}
.custom-homepage .feature-card .card-icon img {
width: 60px;
height: 60px;
object-fit: contain;
display: block;
margin: 0 auto;
}
/* 卡片文字链接 */
.custom-homepage .feature-card a {
color: white;
text-decoration: none;
font-size: 18px;
font-weight: bold;
display: block;
margin-top: 8px;
}
.custom-homepage .feature-card .desc {
color: rgba(255, 255, 255, 0.8);
font-size: 12px;
margin-top: 8px;
}
/* 卡片颜色主题 */
.custom-homepage .card-purple {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.custom-homepage .card-pink {
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}
.custom-homepage .card-blue {
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}
.custom-homepage .card-green {
background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}
/* ========== 角色一览区域 ========== */
.custom-homepage .character-section {
margin-top: 30px;
}
.custom-homepage .character-section h2 {
border-left: 4px solid #36c;
padding-left: 15px;
margin-bottom: 20px;
}
.custom-homepage .character-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
gap: 20px;
}
.custom-homepage .character-card {
background: #fff;
border-radius: 12px;
padding: 15px;
text-align: center;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
transition: transform 0.2s, box-shadow 0.2s;
}
.custom-homepage .character-card:hover {
transform: translateY(-3px);
box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}
.custom-homepage .character-card .avatar {
font-size: 64px;
margin-bottom: 8px;
}
.custom-homepage .character-card a {
font-weight: bold;
text-decoration: none;
color: #333;
display: block;
}
.custom-homepage .character-card .rarity {
font-size: 12px;
color: #666;
margin-top: 5px;
}
.custom-homepage .view-all {
text-align: center;
margin-top: 20px;
}
.custom-homepage .view-all a {
display: inline-block;
padding: 8px 24px;
background: #36c;
color: white;
border-radius: 20px;
text-decoration: none;
transition: background 0.2s;
}
.custom-homepage .view-all a:hover {
background: #2a4ca6;
}
/* ========== 更新公告卡片 ========== */
.custom-homepage .update-card {
flex: 1;
min-width: 280px;
background: #f8f9fa;
border-radius: 12px;
padding: 20px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
margin-bottom: 0;
}
.custom-homepage .update-card h3 {
margin-top: 0;
padding-bottom: 8px;
border-bottom: 2px solid #36c;
}
.custom-homepage .update-item {
margin: 12px 0;
padding: 8px 0;
border-bottom: 1px solid #eee;
}
.custom-homepage .update-link {
margin-top: 12px;
}
.custom-homepage .update-link a {
color: #36c;
text-decoration: none;
}
.custom-homepage .update-link a:hover {
text-decoration: underline;
}
/* ========== 兑换码卡片 ========== */
.custom-homepage .redeem-card {
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
border-radius: 12px;
padding: 20px;
color: white;
min-height: 180px; /* 与卡片高度一致 */
display: flex;
flex-direction: column;
justify-content: center;
}
.custom-homepage .redeem-card h3 {
margin-top: 0;
color: white;
}
.custom-homepage .code-box {
background: rgba(255, 255, 255, 0.2);
border-radius: 8px;
padding: 12px;
margin: 15px 0;
text-align: center;
font-family: monospace;
font-size: 16px;
letter-spacing: 2px;
}
.custom-homepage .redeem-info {
font-size: 13px;
opacity: 0.9;
}
.custom-homepage .redeem-btn {
display: inline-block;
background: white;
color: #667eea;
padding: 6px 20px;
border-radius: 20px;
text-decoration: none;
font-weight: bold;
margin-top: 15px;
transition: transform 0.2s;
text-align: center;
}
.custom-homepage .redeem-btn:hover {
transform: scale(1.02);
}
/* ========== 响应式布局 ========== */
@media (max-width: 768px) {
.custom-homepage .feature-cards {
grid-template-columns: repeat(2, 1fr) !important;
gap: 12px !important;
}
.custom-homepage .feature-card {
min-height: 150px;
padding: 15px 10px !important;
}
.custom-homepage .feature-card .card-icon img {
width: 45px;
height: 45px;
}
.custom-homepage .character-grid {
grid-template-columns: repeat(2, 1fr) !important;
gap: 12px !important;
}
.custom-homepage .redeem-card {
min-height: auto;
}
}