guanghulab/modules/m-channel/channel-layout.css
Guanghu Domestic Migration d1e47f4565
Some checks are pending
自动更新代码和重启 / update-and-restart (push) Waiting to run
CI检查 + 自动部署 / check (push) Waiting to run
CI检查 + 自动部署 / deploy (push) Blocked by required conditions
重启聊天服务 / restart (push) Waiting to run
chore: import sanitized domestic snapshot for REPO-002
Source snapshot: ca48d3ddf926d79aa138306164169baf764bb829
2026-07-17 15:54:41 +08:00

146 lines
2.6 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

/* 频道布局样式 - 三种布局模式 */
/* 基础卡片样式(所有布局共用) */
.module-card {
background: white;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
transition: all 0.3s ease;
overflow: hidden;
position: relative;
}
.module-card:hover {
box-shadow: 0 4px 12px rgba(0,0,0,0.15);
transform: translateY(-2px);
}
/* 卡片头部 */
.module-card-header {
padding: 16px;
border-bottom: 1px solid #eee;
display: flex;
align-items: center;
justify-content: space-between;
}
.module-card-title {
font-size: 18px;
font-weight: 600;
margin: 0;
display: flex;
align-items: center;
gap: 8px;
}
/* 收藏星星 */
.favorite-star {
font-size: 20px;
color: #ccc;
cursor: pointer;
transition: color 0.2s;
user-select: none;
}
.favorite-star.active {
color: #fbbf24;
}
.favorite-star:hover {
transform: scale(1.1);
}
/* 卡片内容区 */
.module-card-content {
padding: 16px;
min-height: 100px;
}
/* 拖拽把手 */
.drag-handle {
font-size: 20px;
color: #999;
cursor: grab;
user-select: none;
margin-right: 8px;
}
.drag-handle:active {
cursor: grabbing;
}
/* ===== 布局1网格模式默认 ===== */
.layout-grid .channel-content {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
gap: 24px;
padding: 24px;
}
.layout-grid .module-card {
height: fit-content;
}
/* ===== 布局2列表模式一行一个 ===== */
.layout-list .channel-content {
display: flex;
flex-direction: column;
gap: 16px;
padding: 24px;
}
.layout-list .module-card {
width: 100%;
}
.layout-list .module-card-header {
padding: 12px 16px;
}
.layout-list .module-card-content {
padding: 12px 16px;
}
/* ===== 布局3紧凑模式小卡片密排 ===== */
.layout-compact .channel-content {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
gap: 12px;
padding: 16px;
}
.layout-compact .module-card {
font-size: 14px;
}
.layout-compact .module-card-header {
padding: 10px 12px;
}
.layout-compact .module-card-title {
font-size: 16px;
}
.layout-compact .module-card-content {
padding: 10px 12px;
min-height: 80px;
}
/* 布局切换动画 */
.channel-content {
transition: all 0.3s ease-in-out;
}
/* 拖拽中的样式 */
.module-card.dragging {
opacity: 0.6;
transform: scale(0.98);
box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}
/* 拖拽放置区高亮 */
.module-card.drop-target {
border: 2px dashed #3b82f6;
background: #f0f9ff;
}