pulse-whoop / profile.html
CSNET's picture
ช่วยแก้ code ต่อ และทำเว็บให้สมบรูณ์ที
f93e15c verified
Raw History Blame Contribute Delete
16.4 kB
```html
<!DOCTYPE html>
<html lang="th" class="dark">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>โปรไฟล์ - ชีพจร</title>
<link rel="icon" type="image/x-icon" href="data:image/svg+xml,<svg xmlns=%22http://www.w3.org/2000/svg%22 viewBox=%220 0 100 100%22><text y=%22.9em%22 font-size=%2290%22>🌿</text></svg>">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<link rel="stylesheet" href="style.css">
</head>
<body class="bg-gray-900 text-white font-sans pb-20">
<!-- Main Container -->
<div class="min-h-screen bg-gradient-to-br from-gray-900 via-gray-800 to-gray-900">
<!-- Header -->
<header class="px-4 pt-12 pb-6">
<div class="flex items-center justify-between">
<div>
<h1 class="text-2xl font-bold bg-gradient-to-r from-indigo-400 to-purple-500 bg-clip-text text-transparent">
โปรไฟล์
</h1>
<p class="text-gray-400 text-sm mt-1">จัดการข้อมูลและการตั้งค่าของคุณ 👤</p>
</div>
<button onclick="window.location.href='index.html'" class="w-10 h-10 rounded-full bg-gray-800 flex items-center justify-center">
<i data-feather="arrow-left" class="w-5 h-5"></i>
</button>
</div>
</header>
<!-- User Profile -->
<section class="px-4 mb-6">
<div class="glass-card rounded-2xl p-6 border border-gray-700/50 text-center">
<div class="w-24 h-24 mx-auto mb-4 relative">
<div class="w-full h-full rounded-full bg-gradient-to-r from-green-400 to-emerald-500 p-0.5">
<img src="http://static.photos/people/200x200/42" alt="Profile" class="w-full h-full rounded-full object-cover border-2 border-gray-900">
</div>
<div class="absolute -bottom-1 -right-1 w-6 h-6 bg-green-400 rounded-full border-2 border-gray-900 flex items-center justify-center">
<i data-feather="check" class="w-3 h-3 text-gray-900"></i>
</div>
</div>
<h2 class="text-xl font-bold mb-1">คุณพิมพ์</h2>
<p class="text-gray-400 text-sm mb-4">สมาชิกตั้งแต่ มกราคม 2024</p>
<div class="grid grid-cols-3 gap-4 text-center">
<div>
<p class="text-lg font-bold text-green-400">127</p>
<p class="text-xs text-gray-400">วันติดต่อกัน</p>
</div>
<div>
<p class="text-lg font-bold text-blue-400">2,847</p>
<p class="text-xs text-gray-400">คะแนนรวม</p>
</div>
<div>
<p class="text-lg font-bold text-purple-400">15</p>
<p class="text-xs text-gray-400">ความท้าทาย</p>
</div>
</div>
</div>
</section>
<!-- Health Goals -->
<section class="px-4 mb-6">
<div class="glass-card rounded-2xl p-5 border border-gray-700/50">
<h3 class="text-lg font-semibold mb-4 flex items-center gap-2">
<i data-feather="target" class="w-5 h-5 text-red-400"></i>
เป้าหมายสุขภาพ
</h3>
<div class="space-y-4">
<div>
<div class="flex justify-between text-sm mb-2">
<span>น้ำหนักเป้าหมาย</span>
<span class="text-green-400">55 kg</span>
</div>
<div class="bg-gray-700 rounded-full h-2">
<div class="bg-gradient-to-r from-green-400 to-emerald-500 h-2 rounded-full" style="width: 75%"></div>
</div>
<p class="text-xs text-gray-400 mt-1">คงเหลือ 3 kg • 2 เดือน</p>
</div>
<div>
<div class="flex justify-between text-sm mb-2">
<span>ออกกำลังกายรายสัปดาห์</span>
<span class="text-blue-400">4/5 วัน</span>
</div>
<div class="bg-gray-700 rounded-full h-2">
<div class="bg-gradient-to-r from-blue-400 to-indigo-500 h-2 rounded-full" style="width: 80%"></div>
</div>
</div>
<div>
<div class="flex justify-between text-sm mb-2">
<span>การนอนให้ครบ 7 ชม.</span>
<span class="text-purple-400">5/7 วัน</span>
</div>
<div class="bg-gray-700 rounded-full h-2">
<div class="bg-gradient-to-r from-purple-500 to-pink-600 h-2 rounded-full" style="width: 71%"></div>
</div>
</div>
</div>
</div>
</section>
<!-- Settings -->
<section class="px-4 mb-6">
<div class="glass-card rounded-2xl p-5 border border-gray-700/50">
<h3 class="text-lg font-semibold mb-4 flex items-center gap-2">
<i data-feather="settings" class="w-5 h-5 text-gray-400"></i>
การตั้งค่า
</h3>
<div class="space-y-3">
<button class="w-full flex items-center justify-between p-3 bg-gray-800/30 rounded-xl hover:bg-gray-700/50 transition-colors" onclick="showComingSoon()">
<div class="flex items-center gap-3">
<i data-feather="bell" class="w-5 h-5 text-yellow-400"></i>
<span class="text-sm font-medium">การแจ้งเตือน</span>
</div>
<i data-feather="chevron-right" class="w-4 h-4 text-gray-400"></i>
</button>
<button class="w-full flex items-center justify-between p-3 bg-gray-800/30 rounded-xl hover:bg-gray-700/50 transition-colors" onclick="showComingSoon()">
<div class="flex items-center gap-3">
<i data-feather="shield" class="w-5 h-5 text-green-400"></i>
<span class="text-sm font-medium">ความเป็นส่วนตัว</span>
</div>
<i data-feather="chevron-right" class="w-4 h-4 text-gray-400"></i>
</button>
<button class="w-full flex items-center justify-between p-3 bg-gray-800/30 rounded-xl hover:bg-gray-700/50 transition-colors" onclick="showComingSoon()">
<div class="flex items-center gap-3">
<i data-feather="smartphone" class="w-5 h-5 text-blue-400"></i>
<span class="text-sm font-medium">อุปกรณ์ที่เชื่อมต่อ</span>
</div>
<i data-feather="chevron-right" class="w-4 h-4 text-gray-400"></i>
</button>
<button class="w-full flex items-center justify-between p-3 bg-gray-800/30 rounded-xl hover:bg-gray-700/50 transition-colors" onclick="showComingSoon()">
<div class="flex items-center gap-3">
<i data-feather="download" class="w-5 h-5 text-purple-400"></i>
<span class="text-sm font-medium">สำรองข้อมูล</span>
</div>
<i data-feather="chevron-right" class="w-4 h-4 text-gray-400"></i>
</button>
</div>
</div>
</section>
<!-- Data Export -->
<section class="px-4 mb-6">
<div class="glass-card rounded-2xl p-5 border border-gray-700/50">
<h3 class="text-lg font-semibold mb-4 flex items-center gap-2">
<i data-feather="upload" class="w-5 h-5 text-indigo-400"></i>
ข้อมูลของฉัน
</h3>
<p class="text-sm text-gray-400 mb-4">ส่งออกข้อมูลสุขภาพของคุณเพื่อวิเคราะห์เพิ่มเติม</p>
<div class="flex gap-3">
<button onclick="exportData('csv')" class="flex-1 bg-gradient-to-r from-indigo-500 to-purple-600 py-3 rounded-xl text-sm font-medium transition-all hover:scale-[1.02]">
<i data-feather="file-text" class="w-4 h-4 inline mr-1"></i>
CSV
</button>
<button onclick="exportData('pdf')" class="flex-1 bg-gradient-to-r from-pink-500 to-rose-600 py-3 rounded-xl text-sm font-medium transition-all hover:scale-[1.02]">
<i data-feather="file" class="w-4 h-4 inline mr-1"></i>
PDF
</button>
</div>
</div>
</section>
<!-- About & Support -->
<section class="px-4 mb-6">
<div class="glass-card rounded-2xl p-5 border border-gray-700/50">
<h3 class="text-lg font-semibold mb-4 flex items-center gap-2">
<i data-feather="help-circle" class="w-5 h-5 text-cyan-400"></i>
เกี่ยวกับ
</h3>
<div class="space-y-3">
<button class="w-full flex items-center justify-between p-3 bg-gray-800/30 rounded-xl hover:bg-gray-700/50 transition-colors" onclick="showComingSoon()">
<div class="flex items-center gap-3">
<i data-feather="info" class="w-5 h-5 text-gray-400"></i>
<span class="text-sm font-medium">เกี่ยวกับ ชีพจร</span>
</div>
<i data-feather="chevron-right" class="w-4 h-4 text-gray-400"></i>
</button>
<button class="w-full flex items-center justify-between p-3 bg-gray-800/30 rounded-xl hover:bg-gray-700/50 transition-colors" onclick="showComingSoon()">
<div class="flex items-center gap-3">
<i data-feather="life-buoy" class="w-5 h-5 text-cyan-400"></i>
<span class="text-sm font-medium">ศูนย์ช่วยเหลือ</span>
</div>
<i data-feather="chevron-right" class="w-4 h-4 text-gray-400"></i>
</button>
<button class="w-full flex items-center justify-between p-3 bg-gray-800/30 rounded-xl hover:bg-gray-700/50 transition-colors" onclick="showComingSoon()">
<div class="flex items-center gap-3">
<i data-feather="star" class="w-5 h-5 text-yellow-400"></i>
<span class="text-sm font-medium">ให้คะแนนแอป</span>
</div>
<i data-feather="chevron-right" class="w-4 h-4 text-gray-400"></i>
</button>
</div>
</div>
</section>
<!-- Logout -->
<section class="px-4 mb-6">
<button onclick="logout()" class="w-full bg-red-500/20 border border-red-500/30 text-red-400 py-3 rounded-xl font-medium hover:bg-red-500/30 transition-colors">
<i data-feather="log-out" class="w-4 h-4 inline mr-2"></i>
ออกจากระบบ
</button>
</section>
</div>
<!-- Bottom Navigation -->
<main-navbar></main-navbar>
<!-- Scripts -->
<script src="components/navbar.js"></script>
<script src="script.js"></script>
<script>
document.addEventListener('DOMContentLoaded', function() {
// Set active page in navbar
const navbar = document.querySelector('main-navbar');
if (navbar) {
navbar.setActivePage('profile');
}
});
function showComingSoon() {
showNotification('ฟีเจอร์นี้กำลังพัฒนา เร็วๆ นี้!', 'info');
}
function exportData(format) {
showNotification(`กำลังส่งออกข้อมูลเป็น ${format.toUpperCase()}...`, 'info');
setTimeout(() => {
showNotification(`ส่งออกข้อมูล ${format.toUpperCase()} สำเร็จ!`, 'success');
// Simulate download
const blob = new Blob(['ข้อมูลสุขภาพของคุณ...'], { type: format === 'csv' ? 'text/csv' : 'application/pdf' });
const url = URL.createObjectURL(blob);
const a = document.createElement('a');
a.href = url;
a.download = `health-data-${new Date().toISOString().split('T')[0]}.${format}`;
a.click();
URL.revokeObjectURL(url);
}, 2000);
}
function logout() {
const modal = document.createElement('div');
modal.className = 'fixed inset-0 bg-black/50 z-50 flex items-center justify-center p-4';
modal.innerHTML = `
<div class="glass-card rounded-2xl p-6 max-w-sm w-full border border-gray-700/50">
<div class="text-center">
<div class="w-16 h-16 bg-red-500 rounded-full mx-auto mb-4 flex items-center justify-center">
<i data-feather="log-out" class="w-8 h-8 text-white"></i>
</div>
<h3 class="text-xl font-bold mb-2">ยืนยันการออกจากระบบ</h3>
<p class="text-gray-400 mb-6">คุณต้องการออกจากระบบใช่ไหม?</p>
<div class="flex gap-3">
<button onclick="this.closest('.fixed').remove()" class="flex-1 bg-gray-700 hover:bg-gray-600 py-3 rounded-xl font-medium transition-colors">
ยกเลิก
</button>
<button onclick="confirmLogout()" class="flex-1 bg-red-500 hover:bg-red-600 py-3 rounded-xl font-medium transition-colors">
ออกจากระบบ
</button>
</div>
</div>
</div>
`;
document.body.appendChild(modal);
feather.replace();
}
function confirmLogout() {
// Clear user data
localStorage.clear();
showNotification('ออกจากระบบสำเร็จ', 'success');
setTimeout(() => {
window.location.href = 'login.html';
}, 1500);
}
</script>
<script>feather.replace();</script>
</body>
</html>
>>>>>>> REPLACE