pet/prototypes/pet-detail/pet-detail-prototype-04.html

490 lines
18 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>
<link rel="stylesheet" href="assets/css/common.css">
<style>
/* 社交媒体式特有样式 */
.social-header {
background: white;
padding: var(--spacing-md);
border-bottom: 1px solid #E0E0E0;
position: sticky;
top: 0;
z-index: 100;
}
.social-nav {
display: flex;
justify-content: space-between;
align-items: center;
}
.back-btn {
background: none;
border: none;
font-size: 20px;
color: var(--text-primary);
}
.social-title {
font-weight: bold;
color: var(--text-primary);
}
.more-btn {
background: none;
border: none;
font-size: 20px;
color: var(--text-primary);
}
.profile-section {
background: white;
padding: var(--spacing-lg);
border-bottom: 8px solid var(--pet-neutral);
}
.profile-header {
display: flex;
gap: var(--spacing-md);
margin-bottom: var(--spacing-md);
}
.profile-avatar {
width: 80px;
height: 80px;
border-radius: var(--radius-round);
border: 3px solid var(--pet-primary);
}
.profile-info {
flex: 1;
}
.profile-name {
font-size: 20px;
font-weight: bold;
color: var(--text-primary);
margin-bottom: var(--spacing-xs);
}
.profile-bio {
color: var(--text-secondary);
font-size: 14px;
line-height: 1.4;
}
.profile-stats {
display: flex;
gap: var(--spacing-lg);
margin-top: var(--spacing-md);
}
.stat-item {
text-align: center;
}
.stat-number {
font-size: 18px;
font-weight: bold;
color: var(--text-primary);
}
.stat-label {
font-size: 12px;
color: var(--text-light);
margin-top: var(--spacing-xs);
}
.action-buttons {
display: flex;
gap: var(--spacing-sm);
margin-top: var(--spacing-md);
}
.follow-btn {
flex: 1;
background: var(--pet-primary);
color: white;
border: none;
padding: var(--spacing-sm);
border-radius: var(--radius-md);
font-weight: bold;
}
.message-btn {
background: var(--pet-neutral);
color: var(--text-primary);
border: none;
padding: var(--spacing-sm) var(--spacing-md);
border-radius: var(--radius-md);
font-weight: bold;
}
.post-item {
background: white;
margin-bottom: 8px;
border-bottom: 1px solid #F0F0F0;
}
.post-header {
display: flex;
align-items: center;
gap: var(--spacing-sm);
padding: var(--spacing-md);
}
.post-avatar {
width: 40px;
height: 40px;
border-radius: var(--radius-round);
}
.post-info {
flex: 1;
}
.post-author {
font-weight: bold;
color: var(--text-primary);
font-size: 14px;
}
.post-time {
font-size: 12px;
color: var(--text-light);
}
.post-content {
padding: 0 var(--spacing-md) var(--spacing-md);
}
.post-text {
color: var(--text-primary);
line-height: 1.5;
margin-bottom: var(--spacing-md);
}
.post-image {
width: 100%;
height: 200px;
background: var(--pet-neutral);
border-radius: var(--radius-md);
display: flex;
align-items: center;
justify-content: center;
color: var(--text-light);
font-size: 48px;
margin-bottom: var(--spacing-md);
}
.post-actions {
display: flex;
justify-content: space-around;
padding: var(--spacing-sm) var(--spacing-md);
border-top: 1px solid #F0F0F0;
}
.action-btn {
background: none;
border: none;
display: flex;
align-items: center;
gap: var(--spacing-xs);
color: var(--text-light);
font-size: 14px;
padding: var(--spacing-xs);
}
.action-btn.active {
color: var(--pet-primary);
}
.stories-section {
background: white;
padding: var(--spacing-md);
border-bottom: 8px solid var(--pet-neutral);
}
.stories-title {
font-weight: bold;
color: var(--text-primary);
margin-bottom: var(--spacing-md);
}
.stories-list {
display: flex;
gap: var(--spacing-md);
overflow-x: auto;
padding-bottom: var(--spacing-sm);
}
.story-item {
flex-shrink: 0;
text-align: center;
}
.story-avatar {
width: 60px;
height: 60px;
border-radius: var(--radius-round);
border: 3px solid var(--pet-accent);
margin-bottom: var(--spacing-xs);
}
.story-label {
font-size: 12px;
color: var(--text-secondary);
}
.floating-compose {
position: fixed;
bottom: 20px;
right: 20px;
width: 56px;
height: 56px;
border-radius: var(--radius-round);
background: var(--pet-primary);
color: white;
border: none;
font-size: 24px;
box-shadow: var(--shadow-lg);
transition: all 0.3s ease;
}
.floating-compose:hover {
transform: scale(1.1);
}
.tag {
display: inline-block;
background: var(--pet-accent);
color: white;
padding: 2px 8px;
border-radius: 12px;
font-size: 12px;
margin-right: var(--spacing-xs);
}
</style>
</head>
<body>
<div class="container">
<!-- 社交媒体头部导航 -->
<div class="social-header">
<div class="social-nav">
<button class="back-btn"></button>
<div class="social-title">小橘的主页</div>
<button class="more-btn"></button>
</div>
</div>
<!-- 个人资料区域 -->
<div class="profile-section">
<div class="profile-header">
<img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiByeD0iNTAiIGZpbGw9IiNGRjhBODAiLz4KPHRleHQgeD0iNTAiIHk9IjU1IiBmb250LWZhbWlseT0iQXJpYWwiIGZvbnQtc2l6ZT0iMzAiIGZpbGw9IndoaXRlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj7wn5GBPC90ZXh0Pgo8L3N2Zz4K"
alt="小橘" class="profile-avatar">
<div class="profile-info">
<div class="profile-name">小橘 🐱</div>
<div class="profile-bio">
橘猫 · 公 · 2岁3个月<br>
<span class="tag">活泼</span>
<span class="tag">粘人</span>
<span class="tag">贪吃</span><br>
陪伴了我们 645 个美好日子 ❤️
</div>
</div>
</div>
<div class="profile-stats">
<div class="stat-item">
<div class="stat-number">127</div>
<div class="stat-label">动态</div>
</div>
<div class="stat-item">
<div class="stat-number">5</div>
<div class="stat-label">家人</div>
</div>
<div class="stat-item">
<div class="stat-number">85</div>
<div class="stat-label">健康分</div>
</div>
</div>
<div class="action-buttons">
<button class="follow-btn" onclick="interactions.handleButtonClick('addRecord')">
📝 记录动态
</button>
<button class="message-btn" onclick="interactions.handleButtonClick('aiChat')">
💬 AI聊天
</button>
</div>
</div>
<!-- 故事/亮点区域 -->
<div class="stories-section">
<div class="stories-title">精彩时刻</div>
<div class="stories-list">
<div class="story-item">
<div class="story-avatar" style="background: var(--pet-secondary); display: flex; align-items: center; justify-content: center; color: white; font-size: 20px;">
💉
</div>
<div class="story-label">疫苗</div>
</div>
<div class="story-item">
<div class="story-avatar" style="background: var(--pet-warning); display: flex; align-items: center; justify-content: center; color: white; font-size: 20px;">
🛁
</div>
<div class="story-label">洗澡</div>
</div>
<div class="story-item">
<div class="story-avatar" style="background: var(--pet-accent); display: flex; align-items: center; justify-content: center; color: white; font-size: 20px;">
🎂
</div>
<div class="story-label">生日</div>
</div>
<div class="story-item">
<div class="story-avatar" style="background: var(--pet-primary); display: flex; align-items: center; justify-content: center; color: white; font-size: 20px;">
🏠
</div>
<div class="story-label">到家</div>
</div>
</div>
</div>
<!-- 动态列表 -->
<div class="posts-feed">
<!-- 动态1 -->
<div class="post-item">
<div class="post-header">
<img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiByeD0iNTAiIGZpbGw9IiNGRjhBODAiLz4KPHRleHQgeD0iNTAiIHk9IjU1IiBmb250LWZhbWlseT0iQXJpYWwiIGZvbnQtc2l6ZT0iMzAiIGZpbGw9IndoaXRlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj7wn5GBPC90ZXh0Pgo8L3N2Zz4K"
alt="小橘" class="post-avatar">
<div class="post-info">
<div class="post-author">小橘的铲屎官</div>
<div class="post-time">2小时前</div>
</div>
</div>
<div class="post-content">
<div class="post-text">
今天给小橘测了体重4.2kg啦比上周又重了0.1kg,看来最近的营养很充足 😊
#体重记录 #健康成长
</div>
<div class="post-image">⚖️</div>
<div class="post-actions">
<button class="action-btn active">
<span>❤️</span>
<span>12</span>
</button>
<button class="action-btn">
<span>💬</span>
<span>3</span>
</button>
<button class="action-btn">
<span>🔄</span>
<span>分享</span>
</button>
</div>
</div>
</div>
<!-- 动态2 -->
<div class="post-item">
<div class="post-header">
<img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiByeD0iNTAiIGZpbGw9IiNGRjhBODAiLz4KPHRleHQgeD0iNTAiIHk9IjU1IiBmb250LWZhbWlseT0iQXJpYWwiIGZvbnQtc2l6ZT0iMzAiIGZpbGw9IndoaXRlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj7wn5GBPC90ZXh0Pgo8L3N2Zz4K"
alt="小橘" class="post-avatar">
<div class="post-info">
<div class="post-author">小橘的铲屎官</div>
<div class="post-time">1天前</div>
</div>
</div>
<div class="post-content">
<div class="post-text">
疫苗接种完成小橘今天很勇敢全程没有叫唤。医生说恢复得很好下次接种是3月20号。
#疫苗接种 #健康档案
</div>
<div class="post-image">💉</div>
<div class="post-actions">
<button class="action-btn">
<span>❤️</span>
<span>8</span>
</button>
<button class="action-btn">
<span>💬</span>
<span>1</span>
</button>
<button class="action-btn">
<span>🔄</span>
<span>分享</span>
</button>
</div>
</div>
</div>
<!-- 动态3 -->
<div class="post-item">
<div class="post-header">
<img src="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxyZWN0IHdpZHRoPSIxMDAiIGhlaWdodD0iMTAwIiByeD0iNTAiIGZpbGw9IiNGRjhBODAiLz4KPHRleHQgeD0iNTAiIHk9IjU1IiBmb250LWZhbWlseT0iQXJpYWwiIGZvbnQtc2l6ZT0iMzAiIGZpbGw9IndoaXRlIiB0ZXh0LWFuY2hvcj0ibWlkZGxlIj7wn5GBPC90ZXh0Pgo8L3N2Zz4K"
alt="小橘" class="post-avatar">
<div class="post-info">
<div class="post-author">小橘的铲屎官</div>
<div class="post-time">2天前</div>
</div>
</div>
<div class="post-content">
<div class="post-text">
哈哈哈,小橘又搞破坏了!把我的拖鞋咬得稀烂,但是看它那得意的小表情,我竟然舍不得生气 😹
#日常搞怪 #可爱瞬间
</div>
<div class="post-image">😸</div>
<div class="post-actions">
<button class="action-btn active">
<span>❤️</span>
<span>15</span>
</button>
<button class="action-btn">
<span>💬</span>
<span>5</span>
</button>
<button class="action-btn">
<span>🔄</span>
<span>分享</span>
</button>
</div>
</div>
</div>
</div>
<!-- 悬浮发布按钮 -->
<button class="floating-compose" onclick="interactions.handleButtonClick('addRecord')">
✏️
</button>
</div>
<script src="assets/js/common.js"></script>
<script>
// 社交媒体式特有交互
document.addEventListener('DOMContentLoaded', function() {
// 点赞动画
const likeButtons = document.querySelectorAll('.action-btn');
likeButtons.forEach(btn => {
btn.addEventListener('click', function() {
if (this.textContent.includes('❤️')) {
this.classList.toggle('active');
// 简单的点赞动画
this.style.transform = 'scale(1.2)';
setTimeout(() => {
this.style.transform = 'scale(1)';
}, 200);
}
});
});
console.log('社交媒体式原型已加载');
});
</script>
</body>
</html>