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.
462 lines
17 KiB
462 lines
17 KiB
<!DOCTYPE html>
|
|
<html lang="zh-CN">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=375, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
<title>青核 Youthome - 图片预览</title>
|
|
<link rel="stylesheet" href="../colors_and_type.css">
|
|
<style>
|
|
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
|
|
:root {
|
|
/* Traework 设计令牌 - 圆角/间距/阴影/高度 */
|
|
--radius-xs: 4px;
|
|
--radius-sm: 8px;
|
|
--radius-md: 12px;
|
|
--radius-lg: 16px;
|
|
--radius-xl: 20px;
|
|
--radius-full: 9999px;
|
|
--height-btn: 44px;
|
|
--height-input: 44px;
|
|
--height-nav: 64px;
|
|
--space-1: 4px;
|
|
--space-2: 8px;
|
|
--space-3: 12px;
|
|
--space-4: 16px;
|
|
--space-5: 20px;
|
|
--space-6: 24px;
|
|
--shadow-card: 0 2px 12px rgba(0, 0, 0, 0.04);
|
|
--shadow-card-hover: 0 6px 20px rgba(0, 0, 0, 0.06);
|
|
--shadow-btn: 0 2px 8px rgba(38, 194, 187, 0.25);
|
|
--shadow-btn-hover: 0 4px 16px rgba(38, 194, 187, 0.35);
|
|
--shadow-modal: 0 16px 48px rgba(0, 0, 0, 0.12);
|
|
--shadow-float: 0 4px 24px rgba(0, 0, 0, 0.08);
|
|
--shadow-inset: inset 0 1px 3px rgba(0, 0, 0, 0.03);
|
|
--glass-bg: rgba(255, 255, 255, 0.72);
|
|
--glass-blur: blur(20px);
|
|
--glass-border: rgba(255, 255, 255, 0.3);
|
|
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'SF Pro Display', sans-serif;
|
|
background: #000;
|
|
color: #fff;
|
|
overflow: hidden;
|
|
overflow-x: hidden;}
|
|
|
|
.page-container {
|
|
width: 375px;
|
|
height: 812px;
|
|
margin: 0 auto;
|
|
background: #000;
|
|
position: relative;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 状态栏 */
|
|
.status-bar {
|
|
height: 44px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 16px;
|
|
font-size: 15px;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
position: relative;
|
|
z-index: 10;
|
|
opacity: 1;
|
|
transition: opacity 0.3s ease;
|
|
}
|
|
|
|
.status-bar.hidden { opacity: 0; }
|
|
|
|
/* 顶部导航 */
|
|
.top-nav {
|
|
position: absolute;
|
|
top: 44px;
|
|
left: 0;
|
|
right: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 8px;
|
|
height: 44px;
|
|
z-index: 10;
|
|
opacity: 1;
|
|
transition: opacity 0.3s ease;
|
|
}
|
|
|
|
.top-nav.hidden { opacity: 0; pointer-events: none; }
|
|
|
|
.nav-btn {
|
|
width: 36px;
|
|
height: 36px;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
border-radius: 50%;
|
|
color: #fff;
|
|
cursor: pointer;
|
|
border: none;
|
|
background: rgba(0,0,0,0.3);
|
|
backdrop-filter: blur(10px);
|
|
}
|
|
|
|
.nav-title { font-size: 15px; font-weight: 600; color: #fff; }
|
|
|
|
/* 图片区域 */
|
|
.image-area {
|
|
position: absolute;
|
|
top: 0;
|
|
left: 0;
|
|
right: 0;
|
|
bottom: 0;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
cursor: zoom-in;
|
|
}
|
|
|
|
.image-area.zoomed { cursor: grab; }
|
|
.image-area.zoomed:active { cursor: grabbing; }
|
|
|
|
.preview-image {
|
|
width: 100%;
|
|
height: auto;
|
|
max-height: 70vh;
|
|
object-fit: contain;
|
|
transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
|
|
transform-origin: center center;
|
|
user-select: none;
|
|
-webkit-user-drag: none;
|
|
}
|
|
|
|
/* 图片指示器 */
|
|
.image-indicator {
|
|
position: absolute;
|
|
top: 100px;
|
|
left: 50%;
|
|
transform: translateX(-50%);
|
|
background: rgba(0,0,0,0.4);
|
|
backdrop-filter: blur(10px);
|
|
padding: 6px 14px;
|
|
border-radius: 20px;
|
|
font-size: 13px;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
z-index: 5;
|
|
}
|
|
|
|
/* 底部操作栏 */
|
|
.bottom-bar {
|
|
position: absolute;
|
|
bottom: 0;
|
|
left: 0;
|
|
right: 0;
|
|
padding: 12px 24px;
|
|
padding-bottom: calc(12px + env(safe-area-inset-bottom));
|
|
display: flex;
|
|
justify-content: space-around;
|
|
align-items: center;
|
|
z-index: 10;
|
|
background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.6) 100%);
|
|
opacity: 1;
|
|
transition: opacity 0.3s ease, transform 0.3s ease;
|
|
}
|
|
|
|
.bottom-bar.hidden {
|
|
opacity: 0;
|
|
transform: translateY(20px);
|
|
pointer-events: none;
|
|
}
|
|
|
|
.action-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 4px;
|
|
cursor: pointer;
|
|
color: #fff;
|
|
}
|
|
|
|
.action-icon {
|
|
width: 44px;
|
|
height: 44px;
|
|
border-radius: 50%;
|
|
background: rgba(255,255,255,0.15);
|
|
backdrop-filter: blur(10px);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
transition: all 0.2s ease;
|
|
}
|
|
|
|
.action-item:active .action-icon {
|
|
transform: scale(0.9);
|
|
background: rgba(255,255,255,0.25);
|
|
}
|
|
|
|
.action-label {
|
|
font-size: 11px;
|
|
opacity: 0.9;
|
|
}
|
|
|
|
/* 缩略图横滑 */
|
|
.thumbnail-strip {
|
|
position: absolute;
|
|
bottom: 100px;
|
|
left: 0;
|
|
right: 0;
|
|
display: flex;
|
|
gap: 8px;
|
|
padding: 0 16px;
|
|
overflow-x: auto;
|
|
z-index: 5;
|
|
opacity: 1;
|
|
transition: opacity 0.3s ease;
|
|
}
|
|
|
|
.thumbnail-strip::-webkit-scrollbar { display: none; }
|
|
|
|
.thumbnail-strip.hidden { opacity: 0; pointer-events: none; }
|
|
|
|
.thumb {
|
|
width: 52px;
|
|
height: 52px;
|
|
border-radius: 8px;
|
|
flex-shrink: 0;
|
|
overflow: hidden;
|
|
border: 2px solid transparent;
|
|
cursor: pointer;
|
|
transition: all 0.2s ease;
|
|
position: relative;
|
|
}
|
|
|
|
.thumb.active { border-color: #26C2BB; }
|
|
|
|
.thumb img {
|
|
width: 100%;
|
|
height: 100%;
|
|
object-fit: cover;
|
|
}
|
|
|
|
/* 模拟图片内容(CSS渐变代替) */
|
|
.mock-img {
|
|
width: 100%;
|
|
height: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
font-size: 48px;
|
|
}
|
|
|
|
.mock-img.m1 { background: linear-gradient(135deg, #26C2BB 0%, #54CAC5 50%, #A8E6CF 100%); }
|
|
.mock-img.m2 { background: linear-gradient(135deg, #FF9A8B 0%, #FF6A88 50%, #FFC3A0 100%); }
|
|
.mock-img.m3 { background: linear-gradient(135deg, #A8B5FF 0%, #6366F1 50%, #C4B5FD 100%); }
|
|
.mock-img.m4 { background: linear-gradient(135deg, #FFD666 0%, #FAAD14 50%, #FFE8A3 100%); }
|
|
.mock-img.m5 { background: linear-gradient(135deg, #8B5CF6 0%, #6366F1 50%, #A78BFA 100%); }
|
|
|
|
.thumb .mock-img { font-size: 20px; }
|
|
|
|
|
|
/* SVG 图标统一尺寸 */
|
|
.icon-svg {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
width: 1em;
|
|
height: 1em;
|
|
vertical-align: middle;
|
|
line-height: 1;
|
|
}
|
|
.icon-svg svg {
|
|
width: 100%;
|
|
height: 100%;
|
|
stroke: currentColor;
|
|
}
|
|
/* 侧栏图标 */
|
|
.sidebar-icon .icon-svg { width: 22px; height: 22px; font-size: 22px; }
|
|
/* 社团logo图标 */
|
|
.club-logo .icon-svg { width: 28px; height: 28px; font-size: 28px; color: #fff; }
|
|
/* 头图大图标 */
|
|
.hero-icon .icon-svg { width: 56px; height: 56px; font-size: 56px; opacity: 0.3; }
|
|
/* meta 小图标 */
|
|
.club-meta .icon-svg { width: 12px; height: 12px; font-size: 12px; }
|
|
/* 分类选择网格图标 */
|
|
.cat-option .icon-svg { width: 26px; height: 26px; font-size: 26px; }
|
|
/* logo预览图标 */
|
|
.logo-preview .icon-svg { width: 40px; height: 40px; font-size: 40px; color: #fff; }
|
|
/* 提示图标 */
|
|
.notice-icon .icon-svg { width: 18px; height: 18px; font-size: 18px; }
|
|
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="page-container" data-dom-id="page-container">
|
|
<div class="status-bar" id="statusBar">
|
|
<span>9:41</span>
|
|
<div style="display:flex;align-items:center;gap:6px;">
|
|
<svg width="17" height="11" viewBox="0 0 17 11" fill="#fff"><rect x="0" y="7" width="3" height="4" rx="0.5"></rect><rect x="4.5" y="5" width="3" height="6" rx="0.5"></rect><rect x="9" y="2.5" width="3" height="8.5" rx="0.5"></rect><rect x="13.5" y="0" width="3" height="11" rx="0.5"></rect></svg>
|
|
<svg width="25" height="12" viewBox="0 0 25 12"><rect x="0.5" y="0.5" width="21" height="11" rx="2.5" stroke="#fff" opacity="0.5"></rect><rect x="2" y="2" width="18" height="8" rx="1.5" fill="#fff"></rect><rect x="22.5" y="4" width="1.5" height="4" rx="0.5" fill="#fff" opacity="0.5"></rect></svg>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="top-nav" id="topNav">
|
|
<button class="nav-btn" onclick="goBack()">
|
|
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"></polyline></svg>
|
|
</button>
|
|
<div class="nav-title" id="navTitle">校园活动照片</div>
|
|
<button class="nav-btn" onclick="moreAction()">
|
|
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="1"></circle><circle cx="19" cy="12" r="1"></circle><circle cx="5" cy="12" r="1"></circle></svg>
|
|
</button>
|
|
</div>
|
|
|
|
<div class="image-indicator" id="indicator">2 / 5</div>
|
|
|
|
<!-- 图片预览区 -->
|
|
<div class="image-area" id="imageArea" onclick="toggleChrome()">
|
|
<div class="preview-image mock-img m2" id="previewImg">
|
|
<span class="icon-svg icon-camera"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z"></path><circle cx="12" cy="13" r="3"></circle></svg></span>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 缩略图横滑 -->
|
|
<div class="thumbnail-strip" id="thumbStrip">
|
|
<div class="thumb" onclick="switchImage(0)">
|
|
<div class="mock-img m1">🏙️</div>
|
|
</div>
|
|
<div class="thumb active" onclick="switchImage(1)">
|
|
<div class="mock-img m2"><span class="icon-svg icon-camera"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z"></path><circle cx="12" cy="13" r="3"></circle></svg></span></div>
|
|
</div>
|
|
<div class="thumb" onclick="switchImage(2)">
|
|
<div class="mock-img m3"><span class="icon-svg icon-palette"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="13.5" cy="6.5" r=".5"></circle><circle cx="17.5" cy="10.5" r=".5"></circle><circle cx="8.5" cy="7.5" r=".5"></circle><circle cx="6.5" cy="12.5" r=".5"></circle><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z"></path></svg></span></div>
|
|
</div>
|
|
<div class="thumb" onclick="switchImage(3)">
|
|
<div class="mock-img m4">☀️</div>
|
|
</div>
|
|
<div class="thumb" onclick="switchImage(4)">
|
|
<div class="mock-img m5">🌙</div>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- 底部操作栏 -->
|
|
<div class="bottom-bar" id="bottomBar">
|
|
<div class="action-item" onclick="saveImage()">
|
|
<div class="action-icon">
|
|
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<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>
|
|
</div>
|
|
<span class="action-label">保存</span>
|
|
</div>
|
|
<div class="action-item" onclick="shareImage()">
|
|
<div class="action-icon">
|
|
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<circle cx="18" cy="5" r="3"></circle>
|
|
<circle cx="6" cy="12" r="3"></circle>
|
|
<circle cx="18" cy="19" r="3"></circle>
|
|
<line x1="8.59" y1="13.51" x2="15.42" y2="17.49"></line>
|
|
<line x1="15.41" y1="6.51" x2="8.59" y2="10.49"></line>
|
|
</svg>
|
|
</div>
|
|
<span class="action-label">分享</span>
|
|
</div>
|
|
<div class="action-item" onclick="likeImage()">
|
|
<div class="action-icon">
|
|
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
|
|
<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>
|
|
<span class="action-label">收藏</span>
|
|
</div>
|
|
<div class="action-item" onclick="deleteImage()">
|
|
|
|
<span class="action-label">
|
|
</span>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
</div>
|
|
|
|
<script>
|
|
let currentIndex = 1;
|
|
let isZoomed = false;
|
|
const images = [
|
|
{ emoji: '🏙️', cls: 'm1', title: '校园夜景' },
|
|
{ emoji: '<span class="icon-svg icon-camera"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M14.5 4h-5L7 7H4a2 2 0 0 0-2 2v9a2 2 0 0 0 2 2h16a2 2 0 0 0 2-2V9a2 2 0 0 0-2-2h-3l-2.5-3z"/><circle cx="12" cy="13" r="3"/></svg></span>', cls: 'm2', title: '校园活动照片' },
|
|
{ emoji: '<span class="icon-svg icon-palette"><svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="13.5" cy="6.5" r=".5"/><circle cx="17.5" cy="10.5" r=".5"/><circle cx="8.5" cy="7.5" r=".5"/><circle cx="6.5" cy="12.5" r=".5"/><path d="M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10c.926 0 1.648-.746 1.648-1.688 0-.437-.18-.835-.437-1.125-.29-.289-.438-.652-.438-1.125a1.64 1.64 0 0 1 1.668-1.668h1.996c3.051 0 5.555-2.503 5.555-5.554C21.965 6.012 17.461 2 12 2z"/></svg></span>', cls: 'm3', title: '艺术展作品' },
|
|
{ emoji: '☀️', cls: 'm4', title: '操场日落' },
|
|
{ emoji: '🌙', cls: 'm5', title: '宿舍夜景' }
|
|
];
|
|
|
|
function switchImage(index) {
|
|
currentIndex = index;
|
|
const img = document.getElementById('previewImg');
|
|
img.className = 'preview-image mock-img ' + images[index].cls;
|
|
img.textContent = images[index].emoji;
|
|
document.getElementById('indicator').textContent = (index + 1) + ' / ' + images.length;
|
|
document.getElementById('navTitle').textContent = images[index].title;
|
|
|
|
document.querySelectorAll('.thumb').forEach((t, i) => {
|
|
t.classList.toggle('active', i === index);
|
|
});
|
|
|
|
// 重置缩放
|
|
if (isZoomed) {
|
|
toggleZoom();
|
|
}
|
|
}
|
|
|
|
function toggleChrome() {
|
|
const sb = document.getElementById('statusBar');
|
|
const tn = document.getElementById('topNav');
|
|
const bb = document.getElementById('bottomBar');
|
|
const ts = document.getElementById('thumbStrip');
|
|
const ind = document.getElementById('indicator');
|
|
|
|
const isHidden = tn.classList.contains('hidden');
|
|
sb.classList.toggle('hidden', !isHidden);
|
|
tn.classList.toggle('hidden', !isHidden);
|
|
bb.classList.toggle('hidden', !isHidden);
|
|
ts.classList.toggle('hidden', !isHidden);
|
|
ind.style.display = isHidden ? 'block' : 'block';
|
|
}
|
|
|
|
function toggleZoom() {
|
|
const area = document.getElementById('imageArea');
|
|
const img = document.getElementById('previewImg');
|
|
isZoomed = !isZoomed;
|
|
|
|
if (isZoomed) {
|
|
img.style.transform = 'scale(2)';
|
|
area.classList.add('zoomed');
|
|
} else {
|
|
img.style.transform = 'scale(1)';
|
|
area.classList.remove('zoomed');
|
|
}
|
|
}
|
|
|
|
function goBack() { window.history.back(); }
|
|
function moreAction() { alert('更多操作'); }
|
|
function saveImage() { alert('已保存到相册'); }
|
|
function shareImage() { alert('分享图片'); }
|
|
function likeImage() { alert('已收藏'); }
|
|
function deleteImage() { alert('删除图片'); }
|
|
|
|
// 双击缩放
|
|
let lastTap = 0;
|
|
document.getElementById('imageArea').addEventListener('click', function(e) {
|
|
const now = Date.now();
|
|
if (now - lastTap < 300) {
|
|
e.stopPropagation();
|
|
toggleZoom();
|
|
}
|
|
lastTap = now;
|
|
});
|
|
</script>
|
|
</body>
|
|
</html>
|
|
|