357 lines
8.4 KiB
PHP
357 lines
8.4 KiB
PHP
{include file="component/head" /}
|
|
{include file="component/header-simple" /}
|
|
|
|
<!-- 简约现代资源中心 -->
|
|
<div class="modern-resources-page">
|
|
<!-- 简约标题区 -->
|
|
<div class="modern-header">
|
|
<div class="container">
|
|
<h1 class="modern-title">资源中心</h1>
|
|
<p class="modern-subtitle">网络天下资源,一站式搜索</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 主要内容区 -->
|
|
<div class="container">
|
|
{volist name="categories" id="category"}
|
|
<div class="category-section">
|
|
<div class="category-header">
|
|
<div class="category-info">
|
|
<h2 class="category-title">{$category.parent.name}</h2>
|
|
</div>
|
|
<div class="category-count">
|
|
<span class="count-badge">{$category.subCategories|count} 个分类</span>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="resource-grid">
|
|
{volist name="category.subCategories" id="subCategory"}
|
|
<a href="/index/resources/list?cid={$subCategory.id}" class="resource-card">
|
|
<div class="card-image">
|
|
<img src="{$subCategory.icon|default='/static/images/default-resource.jpg'}" alt="{$subCategory.name}">
|
|
<div class="image-overlay"></div>
|
|
</div>
|
|
<div class="card-content">
|
|
<div class="meta-info">
|
|
</div>
|
|
<h3 class="resource-title">{$subCategory.name}</h3>
|
|
<div class="card-footer">
|
|
<div class="resource-stats">
|
|
<span class="stat-item">
|
|
<i class="layui-icon layui-icon-template-1"></i>
|
|
<span>{$subCategory.resource_count} 个资源</span>
|
|
</span>
|
|
</div>
|
|
<div class="view-more">
|
|
<span>查看资源</span>
|
|
<i class="layui-icon layui-icon-right"></i>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</a>
|
|
{/volist}
|
|
</div>
|
|
</div>
|
|
{/volist}
|
|
</div>
|
|
</div>
|
|
|
|
<style>
|
|
/* 基础样式重置 */
|
|
.modern-resources-page {
|
|
font-family: 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
|
color: #333;
|
|
line-height: 1.6;
|
|
background-color: #f9fafc;
|
|
padding-bottom: 60px;
|
|
}
|
|
|
|
/* 标题区样式 */
|
|
.modern-header {
|
|
background: linear-gradient(135deg, #1E9FFF 0%, #0d8aff 100%);
|
|
color: white;
|
|
padding: 150px 0;
|
|
text-align: center;
|
|
margin-bottom: 40px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.modern-header::before {
|
|
content: '';
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: url('/static/images/pattern.png') repeat;
|
|
background-size: cover;
|
|
background-position: center;
|
|
opacity: 0.1;
|
|
}
|
|
|
|
.modern-title {
|
|
font-size: 2.5rem;
|
|
font-weight: 300;
|
|
margin-bottom: 15px;
|
|
letter-spacing: 1px;
|
|
position: relative;
|
|
}
|
|
|
|
.modern-subtitle {
|
|
font-size: 1.1rem;
|
|
font-weight: 300;
|
|
opacity: 0.9;
|
|
margin: 0;
|
|
position: relative;
|
|
}
|
|
|
|
/* 分类区块样式 */
|
|
.category-section {
|
|
margin-bottom: 60px;
|
|
background: white;
|
|
border-radius: 12px;
|
|
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
|
|
padding: 30px;
|
|
}
|
|
|
|
.category-header {
|
|
margin-bottom: 30px;
|
|
padding-bottom: 20px;
|
|
border-bottom: 1px solid #f0f0f0;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
}
|
|
|
|
.category-info {
|
|
flex: 1;
|
|
}
|
|
|
|
.category-title {
|
|
font-size: 1.8rem;
|
|
font-weight: 500;
|
|
color: #333;
|
|
margin: 0 0 10px;
|
|
}
|
|
|
|
.category-subtitle {
|
|
font-size: 1rem;
|
|
color: #666;
|
|
margin: 0;
|
|
}
|
|
|
|
.category-count {
|
|
margin-left: 20px;
|
|
}
|
|
|
|
.count-badge {
|
|
background: #f0f7ff;
|
|
color: #1E9FFF;
|
|
padding: 6px 12px;
|
|
border-radius: 20px;
|
|
font-size: 0.85rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
/* 资源网格布局 */
|
|
.resource-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, 1fr);
|
|
gap: 25px;
|
|
}
|
|
|
|
/* 资源卡片样式 */
|
|
.resource-card {
|
|
background: white;
|
|
border-radius: 12px;
|
|
overflow: hidden;
|
|
box-shadow: 0 3px 15px rgba(0, 0, 0, 0.03);
|
|
transition: all 0.3s ease;
|
|
display: flex;
|
|
flex-direction: column;
|
|
text-decoration: none;
|
|
color: inherit;
|
|
border: 1px solid #f0f0f0;
|
|
}
|
|
|
|
.resource-card:hover {
|
|
transform: translateY(-5px);
|
|
box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
|
|
border-color: #e6f7ff;
|
|
}
|
|
|
|
.card-image {
|
|
height: 180px;
|
|
position: relative;
|
|
overflow: hidden;
|
|
background-color: #f5f7fa;
|
|
}
|
|
|
|
.card-image img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
transition: transform 0.5s ease;
|
|
}
|
|
|
|
.image-overlay {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
background: linear-gradient(to top, rgba(0, 0, 0, 0.3), transparent);
|
|
}
|
|
|
|
.status-badge {
|
|
position: absolute;
|
|
top: 12px;
|
|
right: 12px;
|
|
padding: 4px 12px;
|
|
border-radius: 20px;
|
|
font-size: 0.75rem;
|
|
font-weight: 500;
|
|
z-index: 1;
|
|
}
|
|
|
|
.status-badge.active {
|
|
background: rgba(82, 196, 26, 0.9);
|
|
color: white;
|
|
}
|
|
|
|
.status-badge.inactive {
|
|
background: rgba(255, 77, 79, 0.9);
|
|
color: white;
|
|
}
|
|
|
|
.resource-card:hover .card-image img {
|
|
transform: scale(1.05);
|
|
}
|
|
|
|
.card-content {
|
|
padding: 20px;
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.meta-info {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
margin-bottom: 12px;
|
|
font-size: 0.85rem;
|
|
color: #666;
|
|
}
|
|
|
|
.resource-number {
|
|
background: #f0f7ff;
|
|
color: #1E9FFF;
|
|
padding: 3px 10px;
|
|
border-radius: 4px;
|
|
font-size: 0.75rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.resource-title {
|
|
font-size: 1.1rem;
|
|
font-weight: 500;
|
|
margin: 0 0 15px;
|
|
color: #333;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.card-footer {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-top: auto;
|
|
padding-top: 15px;
|
|
border-top: 1px solid #f0f0f0;
|
|
}
|
|
|
|
.resource-stats {
|
|
font-size: 0.85rem;
|
|
color: #666;
|
|
}
|
|
|
|
.stat-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
}
|
|
|
|
.stat-item i {
|
|
font-size: 1rem;
|
|
color: #1E9FFF;
|
|
}
|
|
|
|
.view-more {
|
|
color: #1E9FFF;
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 5px;
|
|
}
|
|
|
|
.view-more i {
|
|
font-size: 0.8rem;
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.resource-card:hover .view-more i {
|
|
transform: translateX(3px);
|
|
}
|
|
|
|
/* 响应式设计 */
|
|
@media (max-width: 1200px) {
|
|
.resource-grid {
|
|
grid-template-columns: repeat(3, 1fr);
|
|
}
|
|
}
|
|
|
|
@media (max-width: 992px) {
|
|
.resource-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
|
|
.category-section {
|
|
padding: 20px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 576px) {
|
|
.resource-grid {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.modern-title {
|
|
font-size: 1.8rem;
|
|
}
|
|
|
|
.modern-subtitle {
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.category-title {
|
|
font-size: 1.5rem;
|
|
}
|
|
|
|
.category-header {
|
|
flex-direction: column;
|
|
align-items: flex-start;
|
|
gap: 10px;
|
|
}
|
|
|
|
.category-count {
|
|
margin-left: 0;
|
|
}
|
|
}
|
|
|
|
h2{
|
|
margin-bottom: 0 !important;
|
|
}
|
|
</style>
|
|
|
|
{include file="component/foot" /} |