Files
dinner.tootaio.com/demo/photoWall/v1/index.html
xiaomai 067f9d4828 feat: Update index.html and add media files for photo wall project
- Modified index.html to include favicon, title, and linked assets for Vite app.
- Added three new media files: LaguBangsaJohor.mp4, LaguNegaraku.mp4, and LaguTeoChew.mp4.
- Created nameList.json containing the names of the first founders with their status.
- Introduced demo/photoWall/v0/index.html for a dynamic carousel with background video and marquee text.
- Added demo/photoWall/v1/index.html for a photo wall layout with responsive design.
- Created demo/photoWall/v3/images.json and nameList.json for image and name data.
- Implemented demo/photoWall/v3/index.html with Vue.js for an interactive photo wall experience.
2025-11-09 23:38:01 +08:00

251 lines
6.6 KiB
HTML
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.
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>宴会回忆录照片墙</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: "Helvetica Neue", Arial, sans-serif;
background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
height: 100vh;
overflow: hidden;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: white;
padding: 20px;
}
.header {
text-align: center;
margin-bottom: 30px;
z-index: 10;
background: rgba(0, 0, 0, 0.3);
padding: 15px 30px;
border-radius: 10px;
backdrop-filter: blur(5px);
}
h1 {
font-size: 3.5rem;
margin-bottom: 10px;
text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}
.subtitle {
font-size: 1.5rem;
opacity: 0.9;
}
.photo-wall {
display: grid;
grid-template-columns: repeat(5, 1fr);
grid-template-rows: repeat(5, 1fr);
gap: 15px;
width: 95%;
height: 70%;
max-width: 1400px;
perspective: 1000px;
}
.photo-container {
position: relative;
border-radius: 8px;
overflow: hidden;
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.3);
transition: transform 0.5s ease, z-index 0.5s;
transform-style: preserve-3d;
}
.photo {
width: 100%;
height: 100%;
object-fit: cover;
transition: transform 0.8s ease, opacity 0.8s ease;
opacity: 0.85;
}
.photo-container.active {
transform: scale(1.15) rotateY(5deg);
z-index: 10;
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
}
.photo-container.active .photo {
opacity: 1;
transform: scale(1.05);
}
.overlay {
position: absolute;
bottom: 0;
left: 0;
right: 0;
background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
padding: 20px 10px 10px;
color: white;
transform: translateY(100%);
transition: transform 0.5s ease;
}
.photo-container.active .overlay {
transform: translateY(0);
}
.photo-caption {
font-size: 0.9rem;
text-align: center;
}
.footer {
margin-top: 30px;
text-align: center;
font-size: 1.2rem;
opacity: 0.8;
z-index: 10;
}
/* 背景装饰元素 */
.bg-decoration {
position: absolute;
width: 100%;
height: 100%;
top: 0;
left: 0;
z-index: -1;
overflow: hidden;
}
.decoration {
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, 0.1);
animation: float 15s infinite linear;
}
@keyframes float {
0% {
transform: translateY(0) rotate(0deg);
}
50% {
transform: translateY(-20px) rotate(180deg);
}
100% {
transform: translateY(0) rotate(360deg);
}
}
/* 响应式调整 */
@media (max-width: 1200px) {
.photo-wall {
grid-template-columns: repeat(4, 1fr);
grid-template-rows: repeat(7, 1fr);
}
}
@media (max-width: 768px) {
.photo-wall {
grid-template-columns: repeat(3, 1fr);
grid-template-rows: repeat(9, 1fr);
}
h1 {
font-size: 2.5rem;
}
}
</style>
</head>
<body>
<div class="bg-decoration" id="bgDecoration"></div>
<div class="header">
<h1>美好时光回忆录</h1>
<div class="subtitle">珍藏每一刻的欢笑与感动</div>
</div>
<div class="photo-wall" id="photoWall">
<!-- 照片将通过JavaScript动态添加 -->
</div>
<div class="footer">感谢与我们共度这段美好时光</div>
<script>
document.addEventListener("DOMContentLoaded", function () {
const photoWall = document.getElementById("photoWall");
const bgDecoration = document.getElementById("bgDecoration");
// 生成25张示例照片
for (let i = 1; i <= 25; i++) {
const photoContainer = document.createElement("div");
photoContainer.className = "photo-container";
const photo = document.createElement("img");
photo.className = "photo";
// 使用随机图片API生成示例图片实际使用中替换为真实图片URL
photo.src = `https://picsum.photos/400/300?random=${i}`;
photo.alt = `宴会照片 ${i}`;
const overlay = document.createElement("div");
overlay.className = "overlay";
const caption = document.createElement("div");
caption.className = "photo-caption";
caption.textContent = `美好时刻 ${i}`;
overlay.appendChild(caption);
photoContainer.appendChild(photo);
photoContainer.appendChild(overlay);
photoWall.appendChild(photoContainer);
}
// 创建背景装饰元素
for (let i = 0; i < 15; i++) {
const decoration = document.createElement("div");
decoration.className = "decoration";
const size = Math.random() * 100 + 50;
decoration.style.width = `${size}px`;
decoration.style.height = `${size}px`;
decoration.style.left = `${Math.random() * 100}%`;
decoration.style.top = `${Math.random() * 100}%`;
decoration.style.animationDelay = `${Math.random() * 15}s`;
decoration.style.animationDuration = `${15 + Math.random() * 10}s`;
bgDecoration.appendChild(decoration);
}
// 自动轮播逻辑
const photoContainers = document.querySelectorAll(".photo-container");
let currentIndex = 0;
function activatePhoto(index) {
// 移除所有活动状态
photoContainers.forEach((container) => {
container.classList.remove("active");
});
// 激活当前照片
photoContainers[index].classList.add("active");
// 更新索引
currentIndex = (index + 1) % photoContainers.length;
}
// 初始激活第一张照片
activatePhoto(currentIndex);
// 设置定时器每3秒切换一张照片
setInterval(() => {
activatePhoto(currentIndex);
}, 3000);
});
</script>
</body>
</html>