打开/关闭菜单
打开/关闭外观设置菜单
打开/关闭个人菜单
未登录
未登录用户的IP地址会在进行任意编辑后公开展示。

模板:Homepage/styles.css:修订间差异

来自Blockland Wiki
无编辑摘要
无编辑摘要
 
第1行: 第1行:
/* ===== 首页全局样式 ===== */
/* 首页容器 */
.homepage-container {
.hp-container {
     max-width: 1400px;
     max-width: 1200px;
     margin: 0 auto;
     margin: 0 auto;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
}


/* ===== 欢迎横幅 ===== */
/* 欢迎横幅 */
.homepage-banner {
.hp-banner {
     background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
     background: linear-gradient(135deg, #2c3e50, #3498db);
     color: #ffffff;
     color: #fff;
     padding: 50px 40px;
     padding: 30px;
     border-radius: 16px;
     border-radius: 8px;
     text-align: center;
     text-align: center;
     margin-bottom: 24px;
     margin-bottom: 20px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}
}


.homepage-banner::before {
.hp-banner h1 {
     content: '';
     margin: 0 0 10px 0;
    position: absolute;
     font-size: 1.8em;
    top: 0;
    left: 0;
    right: 0;
     bottom: 0;
    opacity: 0.5;
}
}


.homepage-banner-title {
.hp-banner p {
    font-size: 2.8em;
     margin: 0;
    font-weight: 700;
     margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}
 
.homepage-banner-subtitle {
    font-size: 1.3em;
     opacity: 0.9;
     opacity: 0.9;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}
}


.homepage-banner-stats {
/* 两栏布局 */
.hp-row {
     display: flex;
     display: flex;
    justify-content: center;
     gap: 20px;
     gap: 40px;
     margin-bottom: 20px;
    flex-wrap: wrap;
    position: relative;
     z-index: 1;
}
}


.banner-stat-item {
.hp-col {
    text-align: center;
}
 
.banner-stat-number {
    font-size: 2em;
    font-weight: 700;
    color: #e94560;
}
 
.banner-stat-label {
    font-size: 0.9em;
    opacity: 0.8;
}
 
/* ===== 网格布局 ===== */
.homepage-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
 
.homepage-grid-full {
    grid-column: 1 / -1;
}
 
.homepage-grid-triple {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 24px;
}
 
@media (max-width: 900px) {
    .homepage-grid {
        grid-template-columns: 1fr;
    }
    .homepage-grid-triple {
        grid-template-columns: 1fr;
    }
}
 
/* ===== 卡片样式 ===== */
.homepage-card {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
 
.homepage-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}
 
.homepage-card-header {
    padding: 18px 24px;
    font-size: 1.25em;
    font-weight: 600;
    border-bottom: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 10px;
}
 
.homepage-card-header-icon {
    font-size: 1.2em;
}
 
.homepage-card-body {
    padding: 24px;
}
 
.homepage-card-footer {
    padding: 12px 24px;
    background: #f8f9fa;
    text-align: right;
    font-size: 0.9em;
}
 
/* ===== 特色条目卡片 ===== */
.featured-card {
    border-left: 4px solid #e94560;
}
 
.featured-card .homepage-card-header {
    background: linear-gradient(90deg, #fff5f7 0%, #ffffff 100%);
    color: #c73e5a;
}
 
.featured-image {
    float: right;
    margin: 0 0 15px 20px;
    max-width: 280px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
 
.featured-content {
    line-height: 1.8;
    color: #333;
}
 
.featured-content p {
    margin-bottom: 12px;
}
 
/* ===== 历史上的今天 ===== */
.today-history-card {
    border-left: 4px solid #3498db;
}
 
.today-history-card .homepage-card-header {
    background: linear-gradient(90deg, #ebf5fb 0%, #ffffff 100%);
    color: #2980b9;
}
 
.today-date {
    font-size: 1.1em;
    color: #2980b9;
    font-weight: 600;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px dashed #d5e8f7;
}
 
.today-history-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
 
.today-history-list li {
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}
 
.today-history-list li:last-child {
    border-bottom: none;
}
 
.history-year {
    background: #3498db;
    color: #fff;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    white-space: nowrap;
}
 
.history-event {
     flex: 1;
     flex: 1;
    line-height: 1.6;
}
}


/* ===== 新闻动态 ===== */
@media (max-width: 768px) {
.news-card {
    .hp-row { flex-direction: column; }
    border-left: 4px solid #27ae60;
}
}


.news-card .homepage-card-header {
/* 卡片 */
    background: linear-gradient(90deg, #e8f8f0 0%, #ffffff 100%);
.hp-card {
    color: #1e8449;
     background: #fff;
}
     border: 1px solid #ddd;
 
     border-radius: 6px;
.news-list {
     margin-bottom: 20px;
    list-style: none;
    padding: 0;
    margin: 0;
}
 
.news-list li {
    padding: 14px 0;
    border-bottom: 1px solid #f0f0f0;
    line-height: 1.7;
}
 
.news-list li:last-child {
    border-bottom: none;
}
 
.news-date {
    color: #888;
    font-size: 0.85em;
    margin-right: 10px;
}
 
.news-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    margin-right: 8px;
}
 
.news-tag-politics { background: #e74c3c; color: #fff; }
.news-tag-economy { background: #f39c12; color: #fff; }
.news-tag-culture { background: #9b59b6; color: #fff; }
.news-tag-tech { background: #3498db; color: #fff; }
.news-tag-military { background: #34495e; color: #fff; }
 
/* ===== 分类导航 ===== */
.nav-card {
    border-left: 4px solid #9b59b6;
}
 
.nav-card .homepage-card-header {
     background: linear-gradient(90deg, #f5eef8 0%, #ffffff 100%);
     color: #7d3c98;
}
 
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}
 
.category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
     border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    text-align: center;
}
 
.category-item:hover {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    transform: scale(1.05);
}
 
.category-icon {
    font-size: 2em;
     margin-bottom: 8px;
}
}


.category-name {
.hp-card-header {
     font-weight: 600;
    background: #f5f5f5;
     font-size: 0.95em;
    padding: 12px 16px;
     font-weight: bold;
    border-bottom: 1px solid #ddd;
     border-radius: 6px 6px 0 0;
}
}


.category-count {
.hp-card-body {
     font-size: 0.8em;
     padding: 16px;
    opacity: 0.7;
    margin-top: 4px;
}
}


/* ===== 快速入口 ===== */
/* 不同颜色的卡片 */
.quicklinks-card {
.hp-card.blue .hp-card-header { background: #ebf5fb; color: #2980b9; }
    border-left: 4px solid #f39c12;
.hp-card.green .hp-card-header { background: #e8f8f0; color: #27ae60; }
}
.hp-card.orange .hp-card-header { background: #fef5e7; color: #e67e22; }
.hp-card.purple .hp-card-header { background: #f4ecf7; color: #8e44ad; }
.hp-card.red .hp-card-header { background: #fdedec; color: #c0392b; }


.quicklinks-card .homepage-card-header {
/* 导航格子 */
    background: linear-gradient(90deg, #fef9e7 0%, #ffffff 100%);
.hp-nav {
    color: #d68910;
}
 
.quicklinks-grid {
     display: grid;
     display: grid;
     grid-template-columns: repeat(2, 1fr);
     grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
     gap: 10px;
     gap: 10px;
}
}


.quicklink-item {
.hp-nav a {
     display: flex;
     display: block;
    align-items: center;
     padding: 15px 10px;
    gap: 10px;
     padding: 12px 15px;
     background: #f8f9fa;
     background: #f8f9fa;
     border-radius: 8px;
     border-radius: 6px;
    text-align: center;
     text-decoration: none;
     text-decoration: none;
     color: #333;
     color: #333;
    transition: all 0.3s ease;
}
}


.quicklink-item:hover {
.hp-nav a:hover {
     background: #f39c12;
     background: #3498db;
     color: #fff;
     color: #fff;
}
}


.quicklink-icon {
.hp-nav-icon {
     font-size: 1.2em;
     font-size: 1.5em;
    display: block;
    margin-bottom: 5px;
}
}


/* ===== 随机推荐 ===== */
/* 历史今天列表 */
.random-card {
.hp-history-list li {
    border-left: 4px solid #1abc9c;
}
 
.random-card .homepage-card-header {
    background: linear-gradient(90deg, #e8f8f5 0%, #ffffff 100%);
    color: #148f77;
}
 
.random-articles {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}
 
.random-article-item {
    padding: 15px;
    background: linear-gradient(135deg, #f0fff4 0%, #e8f8f5 100%);
    border-radius: 8px;
    border: 1px solid #d5f5e3;
}
 
.random-article-title {
    font-weight: 600;
    color: #148f77;
    margin-bottom: 6px;
}
 
.random-article-excerpt {
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}
 
/* ===== 社区公告 ===== */
.community-card {
    border-left: 4px solid #e67e22;
}
 
.community-card .homepage-card-header {
    background: linear-gradient(90deg, #fdf2e9 0%, #ffffff 100%);
    color: #ca6f1e;
}
 
.announcement-item {
    padding: 15px;
    background: #fffbf5;
    border-radius: 8px;
    margin-bottom: 12px;
    border: 1px solid #fdebd0;
}
 
.announcement-item:last-child {
    margin-bottom: 0;
}
 
.announcement-title {
    font-weight: 600;
    color: #ca6f1e;
     margin-bottom: 8px;
     margin-bottom: 8px;
}
.announcement-content {
    font-size: 0.95em;
    color: #666;
     line-height: 1.6;
     line-height: 1.6;
}
}


/* ===== 统计信息 ===== */
.hp-year {
.stats-bar {
     background: #3498db;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    padding: 25px;
     background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    margin-bottom: 24px;
}
 
@media (max-width: 768px) {
    .stats-bar {
        grid-template-columns: repeat(2, 1fr);
    }
}
 
.stats-item {
    text-align: center;
     color: #fff;
     color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
    margin-right: 8px;
}
}


.stats-number {
/* 新闻列表 */
     font-size: 1.8em;
.hp-news li {
    font-weight: 700;
     padding: 10px 0;
     margin-bottom: 5px;
     border-bottom: 1px dashed #eee;
}
}


.stats-label {
.hp-news li:last-child {
     font-size: 0.9em;
     border-bottom: none;
    opacity: 0.9;
}
}


/* ===== 页脚信息 ===== */
/* 统计栏 */
.homepage-footer {
.hp-stats {
    display: flex;
    justify-content: space-around;
     text-align: center;
     text-align: center;
     padding: 30px;
     padding: 15px;
     background: #f8f9fa;
     background: #f8f9fa;
     border-radius: 12px;
     border-radius: 6px;
    color: #666;
    margin-top: 24px;
}
 
.homepage-footer-links {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}
 
.homepage-footer-links a {
    color: #667eea;
    text-decoration: none;
}
 
.homepage-footer-links a:hover {
    text-decoration: underline;
}
 
/* ===== 地图区域 ===== */
.map-card {
    border-left: 4px solid #2c3e50;
}
 
.map-card .homepage-card-header {
    background: linear-gradient(90deg, #ebedef 0%, #ffffff 100%);
    color: #2c3e50;
}
 
.world-map-container {
    background: #1a1a2e;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}
 
/* ===== 时间线 ===== */
.timeline-card {
    border-left: 4px solid #8e44ad;
}
 
.timeline-card .homepage-card-header {
    background: linear-gradient(90deg, #f4ecf7 0%, #ffffff 100%);
    color: #7d3c98;
}
 
.timeline-container {
    position: relative;
    padding-left: 30px;
}
 
.timeline-container::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, #8e44ad, #3498db);
    border-radius: 3px;
}
 
.timeline-item {
    position: relative;
     margin-bottom: 20px;
     margin-bottom: 20px;
    padding-left: 20px;
}
}


.timeline-item::before {
.hp-stat-num {
     content: '';
     font-size: 1.5em;
    position: absolute;
     font-weight: bold;
    left: -26px;
     color: #3498db;
    top: 5px;
    width: 12px;
     height: 12px;
    background: #8e44ad;
    border-radius: 50%;
    border: 3px solid #fff;
     box-shadow: 0 0 0 3px #8e44ad;
}
}


.timeline-era {
.hp-stat-label {
     font-weight: 700;
     font-size: 0.9em;
    color: #8e44ad;
    margin-bottom: 5px;
}
 
.timeline-desc {
     color: #666;
     color: #666;
    font-size: 0.95em;
    line-height: 1.5;
}
/* ===== 深色模式支持 ===== */
@media (prefers-color-scheme: dark) {
    .homepage-card {
        background: #1e1e2e;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
    }
   
    .homepage-card-header {
        border-bottom-color: #333;
    }
   
    .featured-content,
    .history-event,
    .news-list li,
    .announcement-content,
    .random-article-excerpt,
    .timeline-desc {
        color: #ccc;
    }
}
}

2026年1月29日 (四) 15:14的最新版本

/* 首页容器 */
.hp-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* 欢迎横幅 */
.hp-banner {
    background: linear-gradient(135deg, #2c3e50, #3498db);
    color: #fff;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 20px;
}

.hp-banner h1 {
    margin: 0 0 10px 0;
    font-size: 1.8em;
}

.hp-banner p {
    margin: 0;
    opacity: 0.9;
}

/* 两栏布局 */
.hp-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.hp-col {
    flex: 1;
}

@media (max-width: 768px) {
    .hp-row { flex-direction: column; }
}

/* 卡片 */
.hp-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    margin-bottom: 20px;
}

.hp-card-header {
    background: #f5f5f5;
    padding: 12px 16px;
    font-weight: bold;
    border-bottom: 1px solid #ddd;
    border-radius: 6px 6px 0 0;
}

.hp-card-body {
    padding: 16px;
}

/* 不同颜色的卡片 */
.hp-card.blue .hp-card-header { background: #ebf5fb; color: #2980b9; }
.hp-card.green .hp-card-header { background: #e8f8f0; color: #27ae60; }
.hp-card.orange .hp-card-header { background: #fef5e7; color: #e67e22; }
.hp-card.purple .hp-card-header { background: #f4ecf7; color: #8e44ad; }
.hp-card.red .hp-card-header { background: #fdedec; color: #c0392b; }

/* 导航格子 */
.hp-nav {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
}

.hp-nav a {
    display: block;
    padding: 15px 10px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
    text-decoration: none;
    color: #333;
}

.hp-nav a:hover {
    background: #3498db;
    color: #fff;
}

.hp-nav-icon {
    font-size: 1.5em;
    display: block;
    margin-bottom: 5px;
}

/* 历史今天列表 */
.hp-history-list li {
    margin-bottom: 8px;
    line-height: 1.6;
}

.hp-year {
    background: #3498db;
    color: #fff;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.85em;
    margin-right: 8px;
}

/* 新闻列表 */
.hp-news li {
    padding: 10px 0;
    border-bottom: 1px dashed #eee;
}

.hp-news li:last-child {
    border-bottom: none;
}

/* 统计栏 */
.hp-stats {
    display: flex;
    justify-content: space-around;
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 20px;
}

.hp-stat-num {
    font-size: 1.5em;
    font-weight: bold;
    color: #3498db;
}

.hp-stat-label {
    font-size: 0.9em;
    color: #666;
}