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.
 
 
 
 

1226 lines
36 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.active {
background: var(--primary-bg);
color: var(--primary);
font-weight: 600;
}
.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%;
flex-shrink: 0;
overflow: hidden;
}
.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: 16px;
}
.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: 700;
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;
}
.publish-main {
flex: 0 0 720px;
min-width: 0;
}
.publish-side {
flex: 0 0 320px;
min-width: 0;
}
/* ===== 分区通用 ===== */
.section-card {
background: var(--bg-card);
border-radius: var(--radius-md);
box-shadow: var(--shadow-card);
border: 1px solid var(--border-light);
padding: 24px;
margin-bottom: 20px;
}
.section-title {
font-size: 16px;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 16px;
}
.form-label {
font-size: 14px;
font-weight: 500;
color: var(--text-primary);
margin-bottom: 8px;
display: block;
}
.form-label .required {
color: var(--error);
margin-left: 2px;
}
.form-item {
margin-bottom: 20px;
}
.form-item:last-child {
margin-bottom: 0;
}
/* 带字数统计的输入框 */
.input-with-count {
position: relative;
}
.input-count {
position: absolute;
right: 12px;
bottom: 10px;
font-size: 12px;
color: var(--text-tertiary);
pointer-events: none;
}
.textarea-with-count .input-count {
bottom: 10px;
}
/* ===== 视频上传区 ===== */
.upload-area {
width: 100%;
height: 280px;
border: 2px dashed var(--border);
border-radius: var(--radius-md);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
gap: 12px;
cursor: pointer;
transition: all var(--transition-fast);
background: var(--bg-page);
}
.upload-area:hover {
border-color: var(--primary);
background: var(--primary-bg);
}
.upload-area.has-video { height: auto; min-height: 280px; padding: 16px; }
.upload-area.has-video .upload-icon { display: none; }
.web-video-preview { display: block; width: min(100%, 560px); max-height: 320px; aspect-ratio: 16 / 9; object-fit: contain; background: #111; }
.web-video-preview[hidden] { display: none; }
.upload-icon {
width: 56px;
height: 56px;
color: var(--primary);
display: flex;
align-items: center;
justify-content: center;
}
.upload-icon svg { width: 56px; height: 56px; }
.upload-title {
font-size: 16px;
font-weight: 600;
color: var(--text-primary);
}
.upload-desc {
font-size: 13px;
color: var(--text-tertiary);
}
/* 上传进度 */
.upload-progress-wrap {
margin-top: 16px;
}
.progress-bar {
width: 100%;
height: 6px;
background: var(--border);
border-radius: 3px;
overflow: hidden;
}
.progress-fill {
height: 100%;
background: var(--primary);
border-radius: 3px;
transition: width var(--transition-base);
}
.progress-info {
display: flex;
justify-content: space-between;
margin-top: 8px;
font-size: 12px;
color: var(--text-tertiary);
}
.progress-info .progress-percent {
color: var(--primary);
font-weight: 500;
}
/* ===== 话题标签 ===== */
.tags-list {
display: flex;
flex-wrap: wrap;
gap: 8px;
align-items: center;
}
.tag-add-btn {
display: inline-flex;
align-items: center;
gap: 4px;
padding: 3px 12px;
border-radius: var(--radius-lg);
font-size: 12px;
font-weight: 500;
color: var(--text-tertiary);
background: var(--bg-hover);
cursor: pointer;
transition: all var(--transition-fast);
border: none;
}
.tag-add-btn:hover {
color: var(--primary);
background: var(--primary-bg);
}
.tag-add-btn svg { width: 14px; height: 14px; }
/* ===== 封面设置 ===== */
.cover-section {
display: flex;
align-items: center;
gap: 16px;
}
.cover-thumb {
width: 120px;
height: 80px;
border-radius: 8px;
background: linear-gradient(135deg, #BCEAF3 0%, var(--primary-light) 50%, var(--primary) 100%);
flex-shrink: 0;
position: relative;
overflow: hidden;
}
.cover-thumb::after {
content: '';
position: absolute;
inset: 0;
background: rgba(0, 0, 0, 0.2);
}
.cover-thumb.has-cover::after { display: none; }
.cover-actions {
display: flex;
gap: 10px;
}
.cover-btn {
height: 36px;
padding: 0 16px;
border-radius: var(--radius-sm);
font-size: 13px;
font-weight: 500;
cursor: pointer;
transition: all var(--transition-fast);
display: inline-flex;
align-items: center;
gap: 6px;
border: 1px solid var(--border);
background: var(--bg-card);
color: var(--text-secondary);
}
.cover-btn:hover {
border-color: var(--primary);
color: var(--primary);
background: var(--primary-bg);
}
.cover-btn svg { width: 16px; height: 16px; }
/* ===== 发布设置 ===== */
.settings-row {
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 0;
border-bottom: 1px solid var(--border-light);
}
.settings-row:last-child {
border-bottom: none;
padding-bottom: 0;
}
.settings-row:first-child {
padding-top: 0;
}
.settings-label {
font-size: 14px;
font-weight: 500;
color: var(--text-primary);
}
.settings-desc {
font-size: 12px;
color: var(--text-tertiary);
margin-top: 2px;
}
/* 单选按钮组 */
.radio-group {
display: flex;
gap: 16px;
}
.radio-item {
display: flex;
align-items: center;
gap: 6px;
cursor: pointer;
font-size: 13px;
color: var(--text-secondary);
user-select: none;
}
.radio-dot {
width: 18px;
height: 18px;
border-radius: 50%;
border: 2px solid var(--border);
display: flex;
align-items: center;
justify-content: center;
transition: all var(--transition-fast);
flex-shrink: 0;
}
.radio-item.active .radio-dot {
border-color: var(--primary);
}
.radio-dot::after {
content: '';
width: 10px;
height: 10px;
border-radius: 50%;
background: var(--primary);
transform: scale(0);
transition: transform var(--transition-fast);
}
.radio-item.active .radio-dot::after {
transform: scale(1);
}
.radio-item.active {
color: var(--text-primary);
font-weight: 500;
}
/* 开关 */
.switch {
width: 44px;
height: 24px;
border-radius: 12px;
background: var(--border);
position: relative;
cursor: pointer;
transition: background var(--transition-fast);
flex-shrink: 0;
}
.switch.on {
background: var(--primary);
}
.switch::after {
content: '';
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.on::after {
left: 22px;
}
/* ===== 侧边栏卡片 ===== */
.side-card {
background: var(--bg-card);
border-radius: var(--radius-md);
box-shadow: var(--shadow-card);
border: 1px solid var(--border-light);
padding: 20px;
margin-bottom: 16px;
}
.side-card-title {
font-size: 15px;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 16px;
}
.info-list {
display: flex;
flex-direction: column;
gap: 12px;
}
.info-item {
display: flex;
justify-content: space-between;
align-items: center;
}
.info-item-label {
font-size: 13px;
color: var(--text-tertiary);
display: flex;
align-items: center;
gap: 8px;
}
.info-item-label svg { width: 16px; height: 16px; }
.info-item-value {
font-size: 13px;
font-weight: 500;
color: var(--text-primary);
}
/* 发布须知 */
.notice-list {
display: flex;
flex-direction: column;
gap: 10px;
}
.notice-item {
display: flex;
align-items: flex-start;
gap: 10px;
font-size: 13px;
color: var(--text-secondary);
line-height: 1.5;
}
.notice-dot {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--primary);
margin-top: 7px;
flex-shrink: 0;
}
/* SVG stroke统一 */
svg { stroke-linecap: round; stroke-linejoin: round; }
/* Toast */
.toast-container {
position: absolute;
top: 80px;
right: 32px;
z-index: 300;
display: flex;
flex-direction: column;
gap: 10px;
pointer-events: none;
}
.toast {
display: flex;
align-items: center;
gap: 10px;
padding: 12px 18px;
background: var(--bg-card);
border-radius: 10px;
box-shadow: var(--shadow-lg);
border: 1px solid var(--border-light);
font-size: 14px;
color: var(--text-primary);
animation: toastIn 0.3s ease;
pointer-events: auto;
min-width: 200px;
max-width: 360px;
box-sizing: border-box;
}
.toast.success { border-left: 3px solid var(--success); }
.toast.info { border-left: 3px solid var(--primary); }
.toast svg { width: 18px; height: 18px; flex-shrink: 0; }
.toast.success svg { color: var(--success); }
.toast.info svg { color: var(--primary); }
@keyframes toastIn {
from { opacity: 0; transform: translateX(20px); }
to { opacity: 1; transform: translateX(0); }
}
/* ===== 发布按钮 ===== */
.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">
<div 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>
</div>
<span class="page-title-bar">发布视频</span>
</div>
<div class="top-bar-right">
<button class="btn btn-secondary" onclick="saveDraft()">保存草稿</button>
<button class="btn btn-primary" onclick="publishVideo()">发 布</button>
</div>
</header>
<!-- ===== 主内容区 ===== -->
<main class="content-area">
<div class="publish-layout">
<!-- 左栏:主编辑区 -->
<div class="publish-main">
<!-- 视频上传区 -->
<div class="section-card">
<div class="section-title">上传视频</div>
<div class="upload-area" onclick="triggerUpload()">
<div class="upload-icon">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.5">
<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>
<path d="M16 5l-4-3H3a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V9l-1-4z" opacity="0"></path>
<path d="M16 5l-4-3H3a2 2 0 0 0-2 2v4l15 11 4-3V8l-4-3z" opacity="0.3"></path>
</svg>
</div>
<div class="upload-title">点击或拖拽视频文件到此处上传</div>
<div class="upload-desc">支持 MP4/MOV/WebM 格式,最大 500MB</div>
</div>
<div class="upload-progress-wrap">
<div class="progress-bar">
<div class="progress-fill" style="width: 50%;"></div>
</div>
<div class="progress-info">
<span>正在上传:campus_vlog.mp4</span>
<span class="progress-percent">50%</span>
</div>
</div>
</div>
<!-- 视频信息 -->
<div class="section-card">
<div class="section-title">视频信息</div>
<div class="form-item">
<label class="form-label">视频标题<span class="required">*</span></label>
<div class="input-with-count">
<input type="text" class="input input-icon-right" placeholder="请输入视频标题(最多50字)" maxlength="50" oninput="updateTitleCount(this)">
<span class="input-count" id="title-count">0/50</span>
</div>
</div>
<div class="form-item">
<label class="form-label">视频简介</label>
<div class="input-with-count textarea-with-count">
<textarea class="input" rows="4" placeholder="介绍一下你的视频吧..." maxlength="500" oninput="updateDescCount(this)"></textarea>
<span class="input-count" id="desc-count">0/500</span>
</div>
</div>
<div class="form-item">
<label class="form-label">话题标签</label>
<div class="tags-list">
<span class="tag tag-primary">#校园日常</span>
<button class="tag-add-btn" onclick="addTopic()">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5">
<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>
<!-- 封面设置 -->
<div class="section-card">
<div class="section-title">封面设置</div>
<div class="cover-section">
<div class="cover-thumb"></div>
<div class="cover-actions">
<button class="cover-btn" onclick="captureCover()">
<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>
从视频截取
</button>
<button class="cover-btn" onclick="uploadCover()">
<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>
上传封面
</button>
</div>
</div>
</div>
<!-- 发布设置 -->
<div class="section-card">
<div class="section-title">发布设置</div>
<div class="settings-row">
<div>
<div class="settings-label">可见范围</div>
<div class="settings-desc">设置谁可以看到你的视频</div>
</div>
<div class="radio-group">
<div class="radio-item active" onclick="setVisibility(this, 'public')">
<span class="radio-dot"></span>
<span>公开</span>
</div>
<div class="radio-item" onclick="setVisibility(this, 'fans')">
<span class="radio-dot"></span>
<span>仅粉丝可见</span>
</div>
<div class="radio-item" onclick="setVisibility(this, 'private')">
<span class="radio-dot"></span>
<span>私密</span>
</div>
</div>
</div>
<div class="settings-row">
<div>
<div class="settings-label">允许评论</div>
<div class="settings-desc">其他用户可以对你的视频发表评论</div>
</div>
<div class="switch on" onclick="toggleSwitch(this)"></div>
</div>
<div class="settings-row">
<div>
<div class="settings-label">允许下载</div>
<div class="settings-desc">其他用户可以下载你的视频</div>
</div>
<div class="switch" onclick="toggleSwitch(this)"></div>
</div>
</div>
</div>
<!-- 右栏:侧边栏 -->
<div class="publish-side">
<!-- 视频信息卡片 -->
<div class="side-card">
<div class="side-card-title">视频信息</div>
<div class="info-list">
<div class="info-item">
<span class="info-item-label">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="10"></circle>
<polyline points="12 6 12 12 16 14"></polyline>
</svg>
预计时长
</span>
<span class="info-item-value">00:45</span>
</div>
<div class="info-item">
<span class="info-item-label">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"></path>
<polyline points="7 10 12 15 17 10"></polyline>
<line x1="12" y1="15" x2="12" y2="3"></line>
</svg>
文件大小
</span>
<span class="info-item-value">48.2 MB</span>
</div>
<div class="info-item">
<span class="info-item-label">
<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>
<line x1="3" y1="9" x2="21" y2="9"></line>
<line x1="9" y1="21" x2="9" y2="9"></line>
</svg>
分辨率
</span>
<span class="info-item-value">1080 × 1920</span>
</div>
<div class="info-item">
<span class="info-item-label">
<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z"></path>
<polyline points="14 2 14 8 20 8"></polyline>
</svg>
格式
</span>
<span class="info-item-value">MP4</span>
</div>
</div>
</div>
<!-- 发布须知卡片 -->
<div class="side-card">
<div class="side-card-title">发布须知</div>
<div class="notice-list">
<div class="notice-item">
<span class="notice-dot"></span>
<span>不得发布违法违规内容</span>
</div>
<div class="notice-item">
<span class="notice-dot"></span>
<span>视频需清晰无水印</span>
</div>
<div class="notice-item">
<span class="notice-dot"></span>
<span>需符合社区规范</span>
</div>
<div class="notice-item">
<span class="notice-dot"></span>
<span>审核通过后展示</span>
</div>
</div>
</div>
</div>
</div>
</main>
<!-- ===== Toast容器 ===== -->
<div class="toast-container" id="toast-container"></div>
</div>
</div>
<script>
// 导航
function goHome() { location.href = 'feed.html'; }
function goBack() { history.back(); }
// 字数统计
function updateTitleCount(input) {
document.getElementById('title-count').textContent = input.value.length + '/50';
}
function updateDescCount(textarea) {
document.getElementById('desc-count').textContent = textarea.value.length + '/500';
}
// 上传相关
function triggerUpload() {
showToast('info', '选择视频文件');
}
function captureCover() {
showToast('info', '正在从视频截取封面...');
}
function uploadCover() {
showToast('info', '选择封面图片');
}
function addTopic() {
showToast('info', '添加话题功能');
}
// 单选切换
function setVisibility(el, type) {
const group = el.parentElement;
group.querySelectorAll('.radio-item').forEach(item => item.classList.remove('active'));
el.classList.add('active');
}
// 开关切换
function toggleSwitch(el) {
el.classList.toggle('on');
}
// 保存草稿
function saveDraft() {
showToast('success', '草稿已保存');
}
// 发布视频
function publishVideo() {
showToast('success', '视频发布成功,等待审核');
}
// Toast
function showToast(type, message) {
const container = document.getElementById('toast-container');
const toast = document.createElement('div');
toast.className = 'toast ' + type;
const icons = {
success: '<path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline>',
info: '<circle cx="12" cy="12" r="10"></circle><line x1="12" y1="16" x2="12" y2="12"></line><line x1="12" y1="8" x2="12.01" y2="8"></line>'
};
toast.innerHTML = `<svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">${icons[type] || icons.info}</svg><span>${message}</span>`;
container.appendChild(toast);
setTimeout(() => {
toast.style.opacity = '0';
toast.style.transform = 'translateX(20px)';
toast.style.transition = 'all 0.3s ease';
setTimeout(() => toast.remove(), 300);
}, 2500);
}
</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" defer></script>
</body>
</html>