You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1442 lines
44 KiB

<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>发布动态 - 青核 Youthome</title>
<link rel="stylesheet" href="../css/design-system.css">
<style>
/* ===== App容器 ===== */
.app {
width: 1920px
max-width: 100%;;
height: 1080px;
margin: 0 auto;
display: flex;
position: relative;
overflow: hidden;
background: var(--bg-page);
}
/* ===== 左侧固定侧边栏 ===== */
.sidebar {
width: var(--sidebar-width);
height: 100%;
background: var(--bg-sidebar);
border-right: 1px solid var(--border);
display: flex;
flex-direction: column;
flex-shrink: 0;
position: relative;
z-index: 20;
}
.sidebar-logo {
padding: 24px 20px 20px;
display: flex;
align-items: center;
gap: 10px;
border-bottom: 1px solid var(--border-light);
cursor: pointer;
flex-shrink: 0;
}
.sidebar-logo-icon {
width: 36px;
height: 36px;
border-radius: 10px;
background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary) 100%);
display: flex;
align-items: center;
justify-content: center;
color: #fff;
font-size: 16px;
font-weight: 700;
flex-shrink: 0;
box-shadow: 0 4px 12px rgba(23, 176, 207, 0.25);
}
.sidebar-logo-text { display: flex; flex-direction: column; gap: 1px; }
.sidebar-logo-text .main { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.sidebar-logo-text .sub { font-size: 11px; color: var(--text-tertiary); font-weight: 500; }
.sidebar-nav {
flex: 1;
padding: 16px 12px 24px 12px;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 2px;
}
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
.nav-section-title {
font-size: 11px;
font-weight: 600;
color: var(--text-tertiary);
padding: 12px 12px 8px;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.nav-item {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 12px;
border-radius: 8px;
font-size: 14px;
font-weight: 500;
color: var(--text-secondary);
cursor: pointer;
transition: all var(--transition-fast);
user-select: none;
}
.nav-item:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.nav-item svg { width: 20px; height: 20px; flex-shrink: 0; }
.sidebar-footer {
padding: 16px;
border-top: 1px solid var(--border-light);
flex-shrink: 0;
}
.sidebar-user {
display: flex;
align-items: center;
gap: 10px;
padding: 10px;
border-radius: 10px;
cursor: pointer;
transition: background var(--transition-fast);
}
.sidebar-user:hover { background: var(--bg-hover); }
.sidebar-avatar {
width: 36px;
height: 36px;
border-radius: 50%;
overflow: hidden;
flex-shrink: 0;
}
.sidebar-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name {
font-size: 13px;
font-weight: 600;
color: var(--text-primary);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.sidebar-user-desc { font-size: 11px; color: var(--text-tertiary); margin-top: 1px; }
/* ===== 右侧主区域 ===== */
.main-area {
flex: 1;
display: flex;
flex-direction: column;
min-width: 0;
position: relative;
}
/* ===== 顶部操作栏 ===== */
.top-bar {
height: var(--topbar-height);
background: var(--bg-card);
border-bottom: 1px solid var(--border);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 32px;
flex-shrink: 0;
position: relative;
z-index: 15;
}
.top-bar-left {
display: flex;
align-items: center;
gap: 12px;
}
.back-btn {
width: 36px;
height: 36px;
border-radius: 8px;
display: flex;
align-items: center;
justify-content: center;
color: var(--text-secondary);
cursor: pointer;
transition: all var(--transition-fast);
}
.back-btn:hover {
background: var(--bg-hover);
color: var(--text-primary);
}
.back-btn svg { width: 20px; height: 20px; }
.page-title-bar {
font-size: 18px;
font-weight: 600;
color: var(--text-primary);
}
.top-bar-right {
display: flex;
align-items: center;
gap: 12px;
}
/* ===== 主内容区 ===== */
.content-area {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
padding: 28px 32px 40px;
position: relative;
}
.content-area::-webkit-scrollbar { width: 8px; }
.content-area::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.content-area::-webkit-scrollbar-track { background: transparent; }
/* ===== 两栏布局 ===== */
.publish-layout {
display: flex;
gap: 24px;
align-items: flex-start;
}
.editor-column {
width: 720px;
flex-shrink: 0;
display: flex;
flex-direction: column;
gap: 20px;
}
.sidebar-column {
flex: 1;
min-width: 320px;
display: flex;
flex-direction: column;
gap: 20px;
}
/* ===== 编辑卡片通用 ===== */
.editor-card {
background: var(--bg-card);
border-radius: var(--radius-md);
box-shadow: var(--shadow-card);
border: 1px solid var(--border-light);
padding: 24px;
}
.editor-card-title {
font-size: 16px;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 16px;
display: flex;
align-items: center;
gap: 8px;
}
.editor-card-title .title-icon {
width: 20px;
height: 20px;
color: var(--primary);
}
/* ===== 文本编辑区 ===== */
.post-textarea {
width: 100%;
min-height: 160px;
border: none;
outline: none;
resize: none;
font-size: 16px;
line-height: 1.7;
color: var(--text-primary);
font-family: inherit;
background: transparent;
}
.post-textarea::placeholder {
color: var(--text-placeholder);
}
.textarea-footer {
display: flex;
justify-content: flex-end;
margin-top: 8px;
padding-top: 12px;
border-top: 1px solid var(--border-light);
}
.word-count {
font-size: 12px;
color: var(--text-tertiary);
}
/* ===== 图片上传区 ===== */
.image-upload-grid {
display: grid;
grid-template-columns: repeat(3, 120px);
grid-template-rows: repeat(2, 120px);
gap: 12px;
}
.upload-slot {
width: 120px;
height: 120px;
border: 1.5px dashed var(--border);
border-radius: var(--radius-sm);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 6px;
cursor: pointer;
transition: all var(--transition-fast);
background: var(--bg-page);
color: var(--text-tertiary);
}
.upload-slot:hover {
border-color: var(--primary);
background: var(--primary-bg);
color: var(--primary);
}
.upload-slot svg {
width: 28px;
height: 28px;
}
.upload-slot span {
font-size: 12px;
font-weight: 500;
}
.upload-slot.filled {
border-style: solid;
border-color: var(--border-light);
overflow: hidden;
padding: 0;
background: transparent;
position: relative;
}
.upload-slot.filled:hover {
border-color: var(--primary);
}
.upload-slot.filled img {
width: 100%;
height: 100%;
object-fit: cover;
}
.upload-slot .remove-btn {
position: absolute;
top: 6px;
right: 6px;
width: 22px;
height: 22px;
border-radius: 50%;
background: rgba(0, 0, 0, 0.5);
color: #fff;
display: flex;
align-items: center;
justify-content: center;
opacity: 0;
transition: opacity var(--transition-fast);
}
.upload-slot.filled:hover .remove-btn {
opacity: 1;
}
.upload-slot .remove-btn svg {
width: 14px;
height: 14px;
}
.upload-hint {
font-size: 12px;
color: var(--text-tertiary);
margin-top: 12px;
}
/* ===== 话题标签区 ===== */
.topic-tags-wrap {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 10px;
}
.topic-tag-item {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 6px 14px;
background: var(--primary-bg);
color: var(--primary);
font-size: 13px;
font-weight: 500;
border-radius: var(--radius-lg);
transition: all var(--transition-fast);
}
.topic-tag-item .remove-topic {
width: 16px;
height: 16px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
color: var(--primary);
opacity: 0.6;
transition: all var(--transition-fast);
}
.topic-tag-item .remove-topic:hover {
background: var(--primary-lighter);
opacity: 1;
}
.topic-tag-item .remove-topic svg {
width: 12px;
height: 12px;
}
.add-topic-btn {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 6px 14px;
border: 1px dashed var(--border);
border-radius: var(--radius-lg);
font-size: 13px;
color: var(--text-tertiary);
cursor: pointer;
transition: all var(--transition-fast);
background: transparent;
}
.add-topic-btn:hover {
border-color: var(--primary);
color: var(--primary);
background: var(--primary-bg);
}
.add-topic-btn svg {
width: 14px;
height: 14px;
}
/* ===== 底部工具栏 ===== */
.editor-toolbar {
display: flex;
align-items: center;
gap: 4px;
padding: 12px 0 0;
border-top: 1px solid var(--border-light);
margin-top: 4px;
}
.tool-btn {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 14px;
border-radius: 8px;
font-size: 13px;
color: var(--text-secondary);
cursor: pointer;
transition: all var(--transition-fast);
user-select: none;
background: transparent;
border: none;
font-family: inherit;
}
.tool-btn:hover {
background: var(--primary-bg);
color: var(--primary);
}
.tool-btn svg {
width: 20px;
height: 20px;
}
.toolbar-divider {
width: 1px;
height: 20px;
background: var(--border);
margin: 0 8px;
}
/* 可见范围下拉 */
.visibility-selector {
position: relative;
margin-left: auto;
}
.visibility-btn {
display: flex;
align-items: center;
gap: 6px;
padding: 8px 14px;
border-radius: 8px;
font-size: 13px;
color: var(--text-secondary);
cursor: pointer;
transition: all var(--transition-fast);
background: transparent;
border: none;
font-family: inherit;
}
.visibility-btn:hover {
background: var(--primary-bg);
color: var(--primary);
}
.visibility-btn svg {
width: 20px;
height: 20px;
}
.visibility-btn .caret {
width: 14px;
height: 14px;
}
.visibility-dropdown {
position: absolute;
bottom: calc(100% + 8px);
right: 0;
width: 180px;
background: var(--bg-card);
border-radius: 12px;
box-shadow: var(--shadow-lg);
border: 1px solid var(--border);
padding: 6px;
z-index: 50;
}
.visibility-option {
display: flex;
align-items: center;
gap: 10px;
padding: 10px 12px;
border-radius: 8px;
font-size: 13px;
color: var(--text-secondary);
cursor: pointer;
transition: all var(--transition-fast);
}
.visibility-option:hover {
background: var(--primary-bg);
color: var(--primary);
}
.visibility-option.active {
background: var(--primary-bg);
color: var(--primary);
font-weight: 500;
}
.visibility-option svg {
width: 18px;
height: 18px;
flex-shrink: 0;
}
.visibility-option .check-icon {
margin-left: auto;
width: 16px;
height: 16px;
}
/* ===== 预览卡片 ===== */
.preview-card {
background: var(--bg-card);
border-radius: var(--radius-md);
box-shadow: var(--shadow-card);
border: 1px solid var(--border-light);
overflow: hidden;
}
.preview-header {
padding: 16px 20px;
border-bottom: 1px solid var(--border-light);
display: flex;
align-items: center;
gap: 8px;
}
.preview-title {
font-size: 15px;
font-weight: 600;
color: var(--text-primary);
}
.preview-badge {
font-size: 11px;
color: var(--text-tertiary);
padding: 2px 8px;
background: var(--bg-hover);
border-radius: 4px;
}
.preview-body {
padding: 16px 20px;
}
.preview-post-header {
display: flex;
align-items: flex-start;
gap: 10px;
margin-bottom: 12px;
}
.preview-avatar {
width: 40px;
height: 40px;
border-radius: 50%;
overflow: hidden;
flex-shrink: 0;
}
.preview-avatar img {
width: 100%;
height: 100%;
object-fit: cover;
}
.preview-user { flex: 1; min-width: 0; }
.preview-username {
font-size: 14px;
font-weight: 600;
color: var(--text-primary);
}
.preview-school {
font-size: 12px;
color: var(--text-tertiary);
margin-top: 2px;
}
.preview-post-content {
font-size: 13px;
line-height: 1.6;
color: var(--text-secondary);
margin-bottom: 12px;
}
.preview-post-content .topic-tag {
color: var(--primary);
font-weight: 500;
}
.preview-images {
display: grid;
grid-template-columns: repeat(3, 1fr);
gap: 3px;
border-radius: 8px;
overflow: hidden;
margin-bottom: 12px;
}
.preview-img-item {
aspect-ratio: 1;
background: linear-gradient(135deg, #BCEAF3 0%, var(--primary-light) 100%);
}
.preview-img-item:nth-child(2) {
background: linear-gradient(135deg, #FED7AA 0%, #FB923C 100%);
}
.preview-img-item:nth-child(3) {
background: linear-gradient(135deg, #D4B5FF 0%, #9254DE 100%);
}
.preview-actions {
display: flex;
align-items: center;
gap: 16px;
padding-top: 10px;
border-top: 1px solid var(--border-light);
}
.preview-action {
display: flex;
align-items: center;
gap: 4px;
font-size: 12px;
color: var(--text-tertiary);
}
.preview-action svg {
width: 16px;
height: 16px;
}
/* ===== 发布设置 ===== */
.settings-card {
background: var(--bg-card);
border-radius: var(--radius-md);
box-shadow: var(--shadow-card);
border: 1px solid var(--border-light);
}
.settings-header {
padding: 16px 20px;
border-bottom: 1px solid var(--border-light);
}
.settings-title {
font-size: 15px;
font-weight: 600;
color: var(--text-primary);
}
.settings-body {
padding: 8px 0;
}
.setting-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 20px;
transition: background var(--transition-fast);
}
.setting-item:hover {
background: var(--bg-hover);
}
.setting-label {
display: flex;
align-items: center;
gap: 10px;
}
.setting-label svg {
width: 18px;
height: 18px;
color: var(--text-tertiary);
}
.setting-text {
font-size: 14px;
color: var(--text-secondary);
}
.setting-text .setting-desc {
font-size: 12px;
color: var(--text-tertiary);
margin-top: 2px;
}
/* 开关组件 */
.switch {
position: relative;
width: 44px;
height: 24px;
border-radius: 12px;
background: var(--border);
cursor: pointer;
transition: background var(--transition-fast);
flex-shrink: 0;
}
.switch.active {
background: var(--primary);
}
.switch-knob {
position: absolute;
top: 2px;
left: 2px;
width: 20px;
height: 20px;
border-radius: 50%;
background: var(--bg-card);
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
transition: all var(--transition-fast);
}
.switch.active .switch-knob {
left: 22px;
}
/* 评论设置单选 */
.comment-options {
display: flex;
gap: 6px;
}
.comment-option {
padding: 5px 10px;
font-size: 12px;
color: var(--text-tertiary);
border-radius: 6px;
cursor: pointer;
transition: all var(--transition-fast);
border: 1px solid transparent;
}
.comment-option:hover {
color: var(--text-secondary);
background: var(--bg-hover);
}
.comment-option.active {
background: var(--primary-bg);
color: var(--primary);
font-weight: 500;
border-color: var(--primary-lighter);
}
/* SVG stroke统一 */
svg { stroke-linecap: round; stroke-linejoin: round; }
/* ===== 发布按钮 ===== */
.sidebar-publish {
padding: 12px 12px 8px;
flex-shrink: 0;
}
.publish-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 8px;
height: 44px;
background: var(--primary);
color: #fff;
border-radius: 12px;
font-size: 15px;
font-weight: 600;
cursor: pointer;
transition: all .2s ease;
box-shadow: 0 4px 12px rgba(23, 176, 207, 0.25);
}
.publish-btn:hover {
opacity: 0.92;
transform: translateY(-1px);
box-shadow: 0 6px 16px rgba(23, 176, 207, 0.35);
}
.publish-btn svg { width: 20px; height: 20px; }
.publish-btn .publish-arrow { width: 16px; height: 16px; opacity: 0.8; transition: transform .2s; }
.publish-btn:hover .publish-arrow { transform: translateY(1px); }
.publish-dropdown {
display: none;
margin-top: 6px;
background: var(--bg-card, #fff);
border: 1px solid var(--border-light, #eee);
border-radius: 12px;
padding: 6px;
box-shadow: 0 8px 24px rgba(0,0,0,0.08);
}
.sidebar-publish:hover .publish-dropdown { display: block; }
.publish-option {
display: flex;
align-items: center;
gap: 12px;
padding: 10px 12px;
border-radius: 8px;
cursor: pointer;
transition: background .15s;
}
.publish-option:hover { background: var(--bg-hover, #f5f5f5); }
.publish-option svg { width: 22px; height: 22px; color: var(--primary); flex-shrink: 0; }
.publish-option-title { font-size: 14px; font-weight: 600; color: var(--text-primary, #1a1a1a); }
.publish-option-desc { font-size: 11px; color: var(--text-tertiary, #999); margin-top: 2px; }
/* ===== 导航项角标 ===== */
.nav-item-label {
display: flex;
align-items: center;
justify-content: space-between;
flex: 1;
}
.nav-badge {
min-width: 18px;
height: 18px;
padding: 0 5px;
background: #FF4D4F;
color: #fff;
font-size: 11px;
font-weight: 600;
border-radius: 9px;
display: flex;
align-items: center;
justify-content: center;
line-height: 1;
}
/* ===== 底部用户卡片箭头 ===== */
.sidebar-user-arrow {
width: 16px;
height: 16px;
color: var(--text-tertiary, #999);
flex-shrink: 0;
margin-left: auto;
}
</style>
<link rel="stylesheet" href="../css/web-refresh.css?v=20261020-brand-color">
</head>
<body>
<div class="app">
<!-- ===== 左侧固定侧边栏 ===== -->
<aside class="sidebar">
<div class="sidebar-logo" onclick="location.href='feed.html'">
<div class="sidebar-logo-icon">青</div>
<div class="sidebar-logo-text">
<span class="main">青核 Youthome</span>
<span class="sub">校园实名社交</span>
</div>
</div>
<!-- 发布按钮 -->
<div class="sidebar-publish">
<div class="publish-btn">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
<span>发布</span>
<svg class="publish-arrow" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</div>
<div class="publish-dropdown">
<div class="publish-option" onclick="location.href='publish-post.html'">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
<circle cx="8.5" cy="8.5" r="1.5"></circle>
<polyline points="21 15 16 10 5 21"></polyline>
</svg>
<div class="publish-option-text">
<div class="publish-option-title">发布动态</div>
<div class="publish-option-desc">分享图文、心情</div>
</div>
</div>
<div class="publish-option" onclick="location.href='publish-video.html'">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polygon points="23 7 16 12 23 17 23 7"></polygon>
<rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect>
</svg>
<div class="publish-option-text">
<div class="publish-option-title">发布视频</div>
<div class="publish-option-desc">上传短视频</div>
</div>
</div>
<div class="publish-option" onclick="location.href='activity-create.html'">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
<line x1="12" y1="14" x2="12" y2="18"></line>
<line x1="10" y1="16" x2="14" y2="16"></line>
</svg>
<div class="publish-option-text">
<div class="publish-option-title">发起活动</div>
<div class="publish-option-desc">组织线下聚会</div>
</div>
</div>
</div>
</div>
<nav class="sidebar-nav">
<div class="nav-section-title">探索</div>
<div class="nav-item" onclick="location.href='feed.html'">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M19 20H5a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v1m2 13a2 2 0 0 1-2-2V7m2 13a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-2m-4-3H9M7 16h6M7 8h6v4H7V8z"></path>
</svg>
动态广场
</div>
<div class="nav-item" onclick="location.href='video.html'">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polygon points="23 7 16 12 23 17 23 7"></polygon>
<rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect>
</svg>
视频广场
</div>
<div class="nav-item" onclick="location.href='activities.html'">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="4" width="18" height="18" rx="2" ry="2"></rect>
<line x1="16" y1="2" x2="16" y2="6"></line>
<line x1="8" y1="2" x2="8" y2="6"></line>
<line x1="3" y1="10" x2="21" y2="10"></line>
</svg>
活动组局
</div>
<div class="nav-section-title">我的</div>
<div class="nav-item" onclick="location.href='me.html'">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
<circle cx="12" cy="7" r="4"></circle>
</svg>
个人中心
</div>
<div class="nav-item" onclick="location.href='notification.html'">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"></path>
<path d="M13.73 21a2 2 0 0 1-3.46 0"></path>
</svg>
<div class="nav-item-label">
消息通知
<span class="nav-badge">3</span>
</div>
</div>
<div class="nav-item" onclick="location.href='settings.html'">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="3"></circle>
<path d="M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"></path>
</svg>
设置
</div>
</nav>
<div class="sidebar-footer">
<div class="sidebar-user" onclick="location.href='me.html'">
<div class="sidebar-avatar">
<img src="../assets/avatar-01-female-short-light.jpg" alt="林小夏">
</div>
<div class="sidebar-user-info">
<div class="sidebar-user-name">林小夏</div>
<div class="sidebar-user-desc">复旦大学</div>
</div>
<svg class="sidebar-user-arrow" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polyline points="9 18 15 12 9 6"></polyline>
</svg>
</div>
</div>
</aside>
<!-- ===== 右侧主区域 ===== -->
<div class="main-area">
<!-- ===== 顶部操作栏 ===== -->
<header class="top-bar">
<div class="top-bar-left">
<button class="back-btn" onclick="goBack()">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="19" y1="12" x2="5" y2="12"></line>
<polyline points="12 19 5 12 12 5"></polyline>
</svg>
</button>
<span class="page-title-bar">发布动态</span>
</div>
<div class="top-bar-right">
<button class="btn btn-secondary" onclick="saveDraft()">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18">
<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>
</svg>
草稿
</button>
<button class="btn btn-primary" onclick="publishPost()">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" width="18" height="18">
<path d="M22 2L11 13"></path>
<path d="M22 2l-7 20-4-9-9-4 20-7z"></path>
</svg>
发布
</button>
</div>
</header>
<!-- ===== 主内容区 ===== -->
<main class="content-area">
<div class="publish-layout">
<!-- ===== 左栏:主编辑区 ===== -->
<div class="editor-column">
<!-- 文本编辑区 -->
<div class="editor-card">
<div class="editor-card-title">
<svg class="title-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M12 20h9"></path>
<path d="M16.5 3.5a2.121 2.121 0 0 1 3 3L7 19l-4 1 1-4L16.5 3.5z"></path>
</svg>
分享此刻的想法
</div>
<textarea class="post-textarea" placeholder="分享此刻的想法..." rows="6" maxlength="500"></textarea>
<div class="textarea-footer">
<span class="word-count">0 / 500</span>
</div>
</div>
<!-- 图片上传区 -->
<div class="editor-card">
<div class="editor-card-title">
<svg class="title-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"></rect>
<circle cx="8.5" cy="8.5" r="1.5"></circle>
<polyline points="21 15 16 10 5 21"></polyline>
</svg>
添加图片
</div>
<div class="image-upload-grid">
<div class="upload-slot filled">
<div style="width:100%;height:100%;background:linear-gradient(135deg, #BCEAF3 0%, #73D3E6 100%);"></div>
<div class="remove-btn">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</div>
</div>
<div class="upload-slot filled">
<div style="width:100%;height:100%;background:linear-gradient(135deg, #FED7AA 0%, #FB923C 100%);"></div>
<div class="remove-btn">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</div>
</div>
<div class="upload-slot filled">
<div style="width:100%;height:100%;background:linear-gradient(135deg, #D4B5FF 0%, #9254DE 100%);"></div>
<div class="remove-btn">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</div>
</div>
<div class="upload-slot">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
<span>添加图片</span>
</div>
<div class="upload-slot">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
<span>添加图片</span>
</div>
<div class="upload-slot">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
<span>添加图片</span>
</div>
</div>
<div class="upload-hint">支持拖拽上传,单张图片不超过 10MB,最多上传 9 张</div>
</div>
<!-- 话题标签区 -->
<div class="editor-card">
<div class="editor-card-title">
<svg class="title-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M20.59 13.41l-7.17 7.17a2 2 0 0 1-2.83 0L2 12V2h10l8.59 8.59a2 2 0 0 1 0 2.82z"></path>
<line x1="7" y1="7" x2="7.01" y2="7"></line>
</svg>
内容标签
</div>
<div class="topic-tags-wrap">
<span class="topic-tag-item">
#校园日常
<span class="remove-topic">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</span>
</span>
<span class="topic-tag-item">
#新生报到
<span class="remove-topic">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
<line x1="18" y1="6" x2="6" y2="18"></line>
<line x1="6" y1="6" x2="18" y2="18"></line>
</svg>
</span>
</span>
<button class="add-topic-btn">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<line x1="12" y1="5" x2="12" y2="19"></line>
<line x1="5" y1="12" x2="19" y2="12"></line>
</svg>
添加标签
</button>
</div>
</div>
<!-- 底部工具栏 -->
<div class="editor-card">
<div class="editor-toolbar">
<button class="tool-btn">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"></circle>
<path d="M16 16v-2a4 4 0 0 0-4-4 4 4 0 0 0-4 4 4 4 0 0 0 4 4h3"></path>
<path d="M12 10V8"></path>
</svg>
@提及
</button>
<button class="tool-btn">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"></circle>
<path d="M8 14s1.5 2 4 2 4-2 4-2"></path>
<line x1="9" y1="9" x2="9.01" y2="9"></line>
<line x1="15" y1="9" x2="15.01" y2="9"></line>
</svg>
表情
</button>
<button class="tool-btn">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z"></path>
<circle cx="12" cy="10" r="3"></circle>
</svg>
位置
</button>
<div class="toolbar-divider"></div>
<div class="visibility-selector">
<button class="visibility-btn" onclick="toggleVisibility(event)">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
<circle cx="12" cy="12" r="3"></circle>
</svg>
公开
<svg class="caret" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
<polyline points="6 9 12 15 18 9"></polyline>
</svg>
</button>
<div class="visibility-dropdown" id="visibility-dropdown">
<div class="visibility-option active" onclick="selectVisibility(this, '公开')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"></path>
<circle cx="12" cy="12" r="3"></circle>
</svg>
公开
<svg class="check-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
<polyline points="20 6 9 17 4 12"></polyline>
</svg>
</div>
<div class="visibility-option" onclick="selectVisibility(this, '仅粉丝可见')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"></path>
<circle cx="9" cy="7" r="4"></circle>
<path d="M23 21v-2a4 4 0 0 0-3-3.87"></path>
<path d="M16 3.13a4 4 0 0 1 0 7.75"></path>
</svg>
仅粉丝可见
</div>
<div class="visibility-option" onclick="selectVisibility(this, '私密')">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect>
<path d="M7 11V7a5 5 0 0 1 10 0v4"></path>
</svg>
私密
</div>
</div>
</div>
</div>
</div>
</div>
<!-- ===== 右栏:侧边栏 ===== -->
<div class="sidebar-column">
<!-- 发布预览卡片 -->
<div class="preview-card">
<div class="preview-header">
<span class="preview-title">发布预览</span>
<span class="preview-badge">预览效果</span>
</div>
<div class="preview-body">
<div class="preview-post-header">
<div class="preview-avatar">
<img src="../assets/avatar-01-female-short-light.jpg" alt="林小夏">
</div>
<div class="preview-user">
<div class="preview-username">林小夏</div>
<div class="preview-school">复旦大学 · 刚刚</div>
</div>
</div>
<div class="preview-post-content">
今天在复旦校园里散步,阳光正好,微风不燥。新学期开始了,认识了好多新朋友~ <span class="topic-tag">#校园日常</span> <span class="topic-tag">#新生报到</span>
</div>
<div class="preview-images">
<div class="preview-img-item"></div>
<div class="preview-img-item"></div>
<div class="preview-img-item"></div>
</div>
<div class="preview-actions">
<div class="preview-action">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"></path>
</svg>
点赞
</div>
<div class="preview-action">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
</svg>
评论
</div>
<div class="preview-action">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>
</svg>
收藏
</div>
</div>
</div>
</div>
<!-- 发布设置 -->
<div class="settings-card">
<div class="settings-header">
<span class="settings-title">发布设置</span>
</div>
<div class="settings-body">
<!-- 谁可以评论 -->
<div class="setting-item">
<div class="setting-label">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"></path>
</svg>
<div class="setting-text">谁可以评论</div>
</div>
<div class="comment-options">
<div class="comment-option active" onclick="selectCommentOption(this)">所有人</div>
<div class="comment-option" onclick="selectCommentOption(this)">仅关注的人</div>
<div class="comment-option" onclick="selectCommentOption(this)">不允许</div>
</div>
</div>
<!-- 同步到视频广场 -->
<div class="setting-item">
<div class="setting-label">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<polygon points="23 7 16 12 23 17 23 7"></polygon>
<rect x="1" y="5" width="15" height="14" rx="2" ry="2"></rect>
</svg>
<div class="setting-text">
同步到视频广场
<div class="setting-desc">优质内容将获得更多曝光</div>
</div>
</div>
<div class="switch active" onclick="toggleSwitch(this)">
<div class="switch-knob"></div>
</div>
</div>
<!-- 自动保存草稿 -->
<div class="setting-item">
<div class="setting-label">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M19 21l-7-5-7 5V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2z"></path>
</svg>
<div class="setting-text">
自动保存草稿
<div class="setting-desc">每30秒自动保存一次</div>
</div>
</div>
<div class="switch active" onclick="toggleSwitch(this)">
<div class="switch-knob"></div>
</div>
</div>
</div>
</div>
</div>
</div>
</main>
</div>
</div>
<script>
function goHome() { location.href = 'feed.html'; }
function goBack() { history.back(); }
// 可见范围下拉
function toggleVisibility(e) {
e.stopPropagation();
const dd = document.getElementById('visibility-dropdown');
dd.style.display = dd.style.display === 'none' ? 'block' : 'none';
}
function selectVisibility(el, text) {
document.querySelectorAll('.visibility-option').forEach(o => o.classList.remove('active'));
el.classList.add('active');
const btn = document.querySelector('.visibility-btn');
btn.childNodes[2].textContent = text;
document.getElementById('visibility-dropdown').style.display = 'none';
}
// 点击外部关闭下拉
document.addEventListener('click', function() {
document.getElementById('visibility-dropdown').style.display = 'none';
});
// 开关切换
function toggleSwitch(el) {
el.classList.toggle('active');
}
// 评论选项切换
function selectCommentOption(el) {
document.querySelectorAll('.comment-option').forEach(o => o.classList.remove('active'));
el.classList.add('active');
}
// 发布
function publishPost() {
alert('发布成功!');
}
// 保存草稿
function saveDraft() {
alert('已保存到草稿箱');
}
</script>
<script src="../js/web-local-data.js?v=20261016-local" defer></script>
<script src="../js/web-api.js?v=20261020-api" defer></script>
<script src="../js/web-shell.js?v=20261013-publish" defer></script>
<script src="../js/web-publishing.js?v=20261016-local" defer></script>
</body>
</html>