good i want tht each card to full wide but its right side of card is looking blank like somehinge is missing
Browse files- README.md +8 -5
- components/footer.js +54 -0
- components/navbar.js +61 -0
- index.html +299 -19
- script.js +34 -0
- style.css +71 -18
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title: Health Pulse Dashboard Revamp
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Health Pulse Dashboard Revamp 🩺
|
| 3 |
+
colorFrom: gray
|
| 4 |
+
colorTo: yellow
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://huggingface.co/deepsite).
|
components/footer.js
ADDED
|
@@ -0,0 +1,54 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomFooter extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
footer {
|
| 7 |
+
background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
|
| 8 |
+
color: #94a3b8;
|
| 9 |
+
padding: 2rem;
|
| 10 |
+
text-align: center;
|
| 11 |
+
margin-top: 4rem;
|
| 12 |
+
border-top: 1px solid rgba(30, 41, 59, 0.5);
|
| 13 |
+
}
|
| 14 |
+
.footer-content {
|
| 15 |
+
max-width: 1200px;
|
| 16 |
+
margin: 0 auto;
|
| 17 |
+
display: flex;
|
| 18 |
+
flex-direction: column;
|
| 19 |
+
gap: 1rem;
|
| 20 |
+
}
|
| 21 |
+
.footer-links {
|
| 22 |
+
display: flex;
|
| 23 |
+
justify-content: center;
|
| 24 |
+
gap: 1.5rem;
|
| 25 |
+
margin-bottom: 1rem;
|
| 26 |
+
}
|
| 27 |
+
.footer-links a {
|
| 28 |
+
color: #94a3b8;
|
| 29 |
+
text-decoration: none;
|
| 30 |
+
transition: color 0.2s;
|
| 31 |
+
}
|
| 32 |
+
.footer-links a:hover {
|
| 33 |
+
color: #e2e8f0;
|
| 34 |
+
}
|
| 35 |
+
.copyright {
|
| 36 |
+
font-size: 0.875rem;
|
| 37 |
+
}
|
| 38 |
+
</style>
|
| 39 |
+
<footer>
|
| 40 |
+
<div class="footer-content">
|
| 41 |
+
<div class="footer-links">
|
| 42 |
+
<a href="/privacy">Privacy</a>
|
| 43 |
+
<a href="/terms">Terms</a>
|
| 44 |
+
<a href="/contact">Contact</a>
|
| 45 |
+
</div>
|
| 46 |
+
<div class="copyright">
|
| 47 |
+
© ${new Date().getFullYear()} Health Pulse Dashboard. All rights reserved.
|
| 48 |
+
</div>
|
| 49 |
+
</div>
|
| 50 |
+
</footer>
|
| 51 |
+
`;
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
customElements.define('custom-footer', CustomFooter);
|
components/navbar.js
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class CustomNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
nav {
|
| 7 |
+
background: linear-gradient(135deg, #0f172a 0%, #020617 100%);
|
| 8 |
+
padding: 1rem 2rem;
|
| 9 |
+
display: flex;
|
| 10 |
+
justify-content: space-between;
|
| 11 |
+
align-items: center;
|
| 12 |
+
border-bottom: 1px solid rgba(30, 41, 59, 0.5);
|
| 13 |
+
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
|
| 14 |
+
}
|
| 15 |
+
.logo {
|
| 16 |
+
color: white;
|
| 17 |
+
font-weight: 700;
|
| 18 |
+
font-size: 1.25rem;
|
| 19 |
+
background: linear-gradient(90deg, #0ea5e9 0%, #8b5cf6 100%);
|
| 20 |
+
-webkit-background-clip: text;
|
| 21 |
+
-webkit-text-fill-color: transparent;
|
| 22 |
+
}
|
| 23 |
+
ul {
|
| 24 |
+
display: flex;
|
| 25 |
+
gap: 1.5rem;
|
| 26 |
+
list-style: none;
|
| 27 |
+
margin: 0;
|
| 28 |
+
padding: 0;
|
| 29 |
+
}
|
| 30 |
+
a {
|
| 31 |
+
color: #94a3b8;
|
| 32 |
+
text-decoration: none;
|
| 33 |
+
font-weight: 500;
|
| 34 |
+
transition: all 0.2s ease;
|
| 35 |
+
display: flex;
|
| 36 |
+
align-items: center;
|
| 37 |
+
gap: 0.5rem;
|
| 38 |
+
}
|
| 39 |
+
a:hover {
|
| 40 |
+
color: #e2e8f0;
|
| 41 |
+
}
|
| 42 |
+
a.active {
|
| 43 |
+
color: #0ea5e9;
|
| 44 |
+
}
|
| 45 |
+
.nav-icon {
|
| 46 |
+
width: 20px;
|
| 47 |
+
height: 20px;
|
| 48 |
+
}
|
| 49 |
+
</style>
|
| 50 |
+
<nav>
|
| 51 |
+
<div class="logo">Health Pulse</div>
|
| 52 |
+
<ul>
|
| 53 |
+
<li><a href="/" class="active"><i data-feather="home" class="nav-icon"></i> Home</a></li>
|
| 54 |
+
<li><a href="/analytics.html"><i data-feather="activity" class="nav-icon"></i> Analytics</a></li>
|
| 55 |
+
<li><a href="/settings.html"><i data-feather="settings" class="nav-icon"></i> Settings</a></li>
|
| 56 |
+
</ul>
|
| 57 |
+
</nav>
|
| 58 |
+
`;
|
| 59 |
+
}
|
| 60 |
+
}
|
| 61 |
+
customElements.define('custom-navbar', CustomNavbar);
|
index.html
CHANGED
|
@@ -1,19 +1,299 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Health Pulse Dashboard</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
+
<script src="https://cdn.jsdelivr.net/npm/chart.js"></script>
|
| 12 |
+
<script>
|
| 13 |
+
tailwind.config = {
|
| 14 |
+
theme: {
|
| 15 |
+
extend: {
|
| 16 |
+
colors: {
|
| 17 |
+
primary: {
|
| 18 |
+
50: '#f0f9ff',
|
| 19 |
+
100: '#e0f2fe',
|
| 20 |
+
200: '#bae6fd',
|
| 21 |
+
300: '#7dd3fc',
|
| 22 |
+
400: '#38bdf8',
|
| 23 |
+
500: '#0ea5e9',
|
| 24 |
+
600: '#0284c7',
|
| 25 |
+
700: '#0369a1',
|
| 26 |
+
800: '#075985',
|
| 27 |
+
900: '#0c4a6e',
|
| 28 |
+
},
|
| 29 |
+
secondary: {
|
| 30 |
+
50: '#f5f3ff',
|
| 31 |
+
100: '#ede9fe',
|
| 32 |
+
200: '#ddd6fe',
|
| 33 |
+
300: '#c4b5fd',
|
| 34 |
+
400: '#a78bfa',
|
| 35 |
+
500: '#8b5cf6',
|
| 36 |
+
600: '#7c3aed',
|
| 37 |
+
700: '#6d28d9',
|
| 38 |
+
800: '#5b21b6',
|
| 39 |
+
900: '#4c1d95',
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
}
|
| 44 |
+
}
|
| 45 |
+
</script>
|
| 46 |
+
</head>
|
| 47 |
+
<body class="bg-gray-900 text-gray-100 min-h-screen">
|
| 48 |
+
<custom-navbar></custom-navbar>
|
| 49 |
+
|
| 50 |
+
<main class="container mx-auto px-4 py-8">
|
| 51 |
+
<div class="flex justify-between items-center mb-8">
|
| 52 |
+
<div>
|
| 53 |
+
<p class="text-gray-400">Good Morning!</p>
|
| 54 |
+
<h1 class="text-3xl font-bold">Health Overview</h1>
|
| 55 |
+
</div>
|
| 56 |
+
<div id="connection-status" class="p-2 rounded-full bg-gray-800">
|
| 57 |
+
<i data-feather="bluetooth" class="text-green-500"></i>
|
| 58 |
+
</div>
|
| 59 |
+
</div>
|
| 60 |
+
|
| 61 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
| 62 |
+
<!-- Health Metrics Cards -->
|
| 63 |
+
<div class="health-card" data-metric="heart-rate">
|
| 64 |
+
<div class="absolute right-6 top-6 z-10">
|
| 65 |
+
<i data-feather="heart" class="text-red-500 opacity-20" width="60" height="60"></i>
|
| 66 |
+
</div>
|
| 67 |
+
<div class="flex justify-between items-start">
|
| 68 |
+
<div class="p-3 rounded-full bg-gradient-to-br from-gray-800 to-gray-900 border border-gray-700">
|
| 69 |
+
<i data-feather="heart" class="text-red-500"></i>
|
| 70 |
+
</div>
|
| 71 |
+
<div class="trend-badge positive">+2%</div>
|
| 72 |
+
</div>
|
| 73 |
+
<h2 class="text-4xl font-bold mt-4">72</h2>
|
| 74 |
+
<p class="text-gray-400 mt-1">Heart Rate</p>
|
| 75 |
+
<p class="text-sm text-gray-500">BPM</p>
|
| 76 |
+
</div>
|
| 77 |
+
<div class="health-card" data-metric="steps">
|
| 78 |
+
<div class="absolute right-6 top-6 z-10">
|
| 79 |
+
<i data-feather="activity" class="text-green-500 opacity-20" width="60" height="60"></i>
|
| 80 |
+
</div>
|
| 81 |
+
<div class="flex justify-between items-start">
|
| 82 |
+
<div class="p-3 rounded-full bg-gradient-to-br from-gray-800 to-gray-900 border border-gray-700">
|
| 83 |
+
<i data-feather="activity" class="text-green-500"></i>
|
| 84 |
+
</div>
|
| 85 |
+
<div class="trend-badge positive">+15%</div>
|
| 86 |
+
</div>
|
| 87 |
+
<h2 class="text-4xl font-bold mt-4">3,245</h2>
|
| 88 |
+
<p class="text-gray-400 mt-1">Steps</p>
|
| 89 |
+
<p class="text-sm text-gray-500">Today</p>
|
| 90 |
+
</div>
|
| 91 |
+
<div class="health-card" data-metric="sleep">
|
| 92 |
+
<div class="absolute right-6 top-6 z-10">
|
| 93 |
+
<i data-feather="moon" class="text-purple-500 opacity-20" width="60" height="60"></i>
|
| 94 |
+
</div>
|
| 95 |
+
<div class="flex justify-between items-start">
|
| 96 |
+
<div class="p-3 rounded-full bg-gradient-to-br from-gray-800 to-gray-900 border border-gray-700">
|
| 97 |
+
<i data-feather="moon" class="text-purple-500"></i>
|
| 98 |
+
</div>
|
| 99 |
+
<div class="trend-badge positive">+5%</div>
|
| 100 |
+
</div>
|
| 101 |
+
<h2 class="text-4xl font-bold mt-4">7.2</h2>
|
| 102 |
+
<p class="text-gray-400 mt-1">Sleep</p>
|
| 103 |
+
<p class="text-sm text-gray-500">Hours</p>
|
| 104 |
+
</div>
|
| 105 |
+
<div class="health-card" data-metric="calories">
|
| 106 |
+
<div class="absolute right-6 top-6 z-10">
|
| 107 |
+
<i data-feather="zap" class="text-orange-500 opacity-20" width="60" height="60"></i>
|
| 108 |
+
</div>
|
| 109 |
+
<div class="flex justify-between items-start">
|
| 110 |
+
<div class="p-3 rounded-full bg-gradient-to-br from-gray-800 to-gray-900 border border-gray-700">
|
| 111 |
+
<i data-feather="zap" class="text-orange-500"></i>
|
| 112 |
+
</div>
|
| 113 |
+
<div class="trend-badge positive">+8%</div>
|
| 114 |
+
</div>
|
| 115 |
+
<h2 class="text-4xl font-bold mt-4">1,850</h2>
|
| 116 |
+
<p class="text-gray-400 mt-1">Calories</p>
|
| 117 |
+
<p class="text-sm text-gray-500">kcal</p>
|
| 118 |
+
</div>
|
| 119 |
+
<div class="health-card" data-metric="spo2">
|
| 120 |
+
<div class="absolute right-6 top-6 z-10">
|
| 121 |
+
<i data-feather="wind" class="text-blue-500 opacity-20" width="60" height="60"></i>
|
| 122 |
+
</div>
|
| 123 |
+
<div class="flex justify-between items-start">
|
| 124 |
+
<div class="p-3 rounded-full bg-gradient-to-br from-gray-800 to-gray-900 border border-gray-700">
|
| 125 |
+
<i data-feather="wind" class="text-blue-500"></i>
|
| 126 |
+
</div>
|
| 127 |
+
</div>
|
| 128 |
+
<h2 class="text-4xl font-bold mt-4">98</h2>
|
| 129 |
+
<p class="text-gray-400 mt-1">SpO₂</p>
|
| 130 |
+
<p class="text-sm text-gray-500">%</p>
|
| 131 |
+
</div>
|
| 132 |
+
<div class="health-card" data-metric="recovery">
|
| 133 |
+
<div class="absolute right-6 top-6 z-10">
|
| 134 |
+
<i data-feather="shield" class="text-teal-500 opacity-20" width="60" height="60"></i>
|
| 135 |
+
</div>
|
| 136 |
+
<div class="flex justify-between items-start">
|
| 137 |
+
<div class="p-3 rounded-full bg-gradient-to-br from-gray-800 to-gray-900 border border-gray-700">
|
| 138 |
+
<i data-feather="shield" class="text-teal-500"></i>
|
| 139 |
+
</div>
|
| 140 |
+
<div class="trend-badge positive">+3%</div>
|
| 141 |
+
</div>
|
| 142 |
+
<h2 class="text-4xl font-bold mt-4">85</h2>
|
| 143 |
+
<p class="text-gray-400 mt-1">Recovery</p>
|
| 144 |
+
<p class="text-sm text-gray-500">Score</p>
|
| 145 |
+
</div>
|
| 146 |
+
</div>
|
| 147 |
+
<!-- Add this in the head section -->
|
| 148 |
+
<style>
|
| 149 |
+
.health-card .content {
|
| 150 |
+
position: relative;
|
| 151 |
+
z-index: 2;
|
| 152 |
+
}
|
| 153 |
+
</style>
|
| 154 |
+
|
| 155 |
+
<!-- Activity Chart -->
|
| 156 |
+
<div class="mt-10">
|
| 157 |
+
<div class="health-card">
|
| 158 |
+
<div class="flex justify-between items-center mb-6">
|
| 159 |
+
<h2 class="text-xl font-semibold">Activity This Week</h2>
|
| 160 |
+
<div class="trend-badge positive">+12%</div>
|
| 161 |
+
</div>
|
| 162 |
+
<div class="h-64 relative z-10">
|
| 163 |
+
<canvas id="activityChart"></canvas>
|
| 164 |
+
</div>
|
| 165 |
+
</div>
|
| 166 |
+
</div>
|
| 167 |
+
|
| 168 |
+
<!-- Health Score -->
|
| 169 |
+
<div class="mt-10 grid grid-cols-1 lg:grid-cols-2 gap-6">
|
| 170 |
+
<div class="health-card">
|
| 171 |
+
<h2 class="text-xl font-semibold mb-6">Health Overview</h2>
|
| 172 |
+
<div class="flex flex-col lg:flex-row items-center">
|
| 173 |
+
<div class="relative w-48 h-48 mb-6 lg:mb-0 lg:mr-8">
|
| 174 |
+
<div class="absolute inset-0 rounded-full border-8 border-gray-800"></div>
|
| 175 |
+
<div class="absolute inset-0 rounded-full border-8 border-blue-500" style="clip: rect(0, 120px, 240px, 0);"></div>
|
| 176 |
+
<div class="absolute inset-0 flex flex-col items-center justify-center">
|
| 177 |
+
<span class="text-4xl font-bold">85</span>
|
| 178 |
+
<span class="text-gray-400">/100</span>
|
| 179 |
+
<p class="text-sm mt-2">Overall Score</p>
|
| 180 |
+
</div>
|
| 181 |
+
</div>
|
| 182 |
+
<div class="w-full">
|
| 183 |
+
<div class="mini-metric">
|
| 184 |
+
<div class="flex items-center">
|
| 185 |
+
<div class="p-2 rounded-full bg-gradient-to-br from-gray-800 to-gray-900 border border-gray-700 mr-3">
|
| 186 |
+
<i data-feather="moon" class="text-purple-500"></i>
|
| 187 |
+
</div>
|
| 188 |
+
<span class="flex-grow">Sleep</span>
|
| 189 |
+
<span class="text-purple-500 font-semibold">7.2h</span>
|
| 190 |
+
</div>
|
| 191 |
+
</div>
|
| 192 |
+
<div class="mini-metric">
|
| 193 |
+
<div class="flex items-center">
|
| 194 |
+
<div class="p-2 rounded-full bg-gradient-to-br from-gray-800 to-gray-900 border border-gray-700 mr-3">
|
| 195 |
+
<i data-feather="activity" class="text-green-500"></i>
|
| 196 |
+
</div>
|
| 197 |
+
<span class="flex-grow">Activity</span>
|
| 198 |
+
<span class="text-green-500 font-semibold">85%</span>
|
| 199 |
+
</div>
|
| 200 |
+
</div>
|
| 201 |
+
<div class="mini-metric">
|
| 202 |
+
<div class="flex items-center">
|
| 203 |
+
<div class="p-2 rounded-full bg-gradient-to-br from-gray-800 to-gray-900 border border-gray-700 mr-3">
|
| 204 |
+
<i data-feather="shield" class="text-teal-500"></i>
|
| 205 |
+
</div>
|
| 206 |
+
<span class="flex-grow">Recovery</span>
|
| 207 |
+
<span class="text-teal-500 font-semibold">85%</span>
|
| 208 |
+
</div>
|
| 209 |
+
</div>
|
| 210 |
+
<div class="mini-metric">
|
| 211 |
+
<div class="flex items-center">
|
| 212 |
+
<div class="p-2 rounded-full bg-gradient-to-br from-gray-800 to-gray-900 border border-gray-700 mr-3">
|
| 213 |
+
<i data-feather="wind" class="text-blue-500"></i>
|
| 214 |
+
</div>
|
| 215 |
+
<span class="flex-grow">SpO₂</span>
|
| 216 |
+
<span class="text-blue-500 font-semibold">98%</span>
|
| 217 |
+
</div>
|
| 218 |
+
</div>
|
| 219 |
+
</div>
|
| 220 |
+
</div>
|
| 221 |
+
</div>
|
| 222 |
+
|
| 223 |
+
<!-- Quick Actions -->
|
| 224 |
+
<div class="grid grid-cols-3 gap-4">
|
| 225 |
+
<div class="quick-action">
|
| 226 |
+
<div class="p-4 rounded-full bg-gradient-to-br from-gray-800 to-gray-900 border border-gray-700 mx-auto mb-3">
|
| 227 |
+
<i data-feather="activity" class="text-primary-500"></i>
|
| 228 |
+
</div>
|
| 229 |
+
<p class="text-center">Start Workout</p>
|
| 230 |
+
</div>
|
| 231 |
+
<div class="quick-action">
|
| 232 |
+
<div class="p-4 rounded-full bg-gradient-to-br from-gray-800 to-gray-900 border border-gray-700 mx-auto mb-3">
|
| 233 |
+
<i data-feather="zap" class="text-yellow-500"></i>
|
| 234 |
+
</div>
|
| 235 |
+
<p class="text-center">Meditate</p>
|
| 236 |
+
</div>
|
| 237 |
+
<div class="quick-action">
|
| 238 |
+
<div class="p-4 rounded-full bg-gradient-to-br from-gray-800 to-gray-900 border border-gray-700 mx-auto mb-3">
|
| 239 |
+
<i data-feather="wind" class="text-blue-500"></i>
|
| 240 |
+
</div>
|
| 241 |
+
<p class="text-center">Check SpO₂</p>
|
| 242 |
+
</div>
|
| 243 |
+
</div>
|
| 244 |
+
</div>
|
| 245 |
+
</main>
|
| 246 |
+
|
| 247 |
+
<custom-footer></custom-footer>
|
| 248 |
+
|
| 249 |
+
<script src="components/navbar.js"></script>
|
| 250 |
+
<script src="components/footer.js"></script>
|
| 251 |
+
<script src="script.js"></script>
|
| 252 |
+
<script>
|
| 253 |
+
feather.replace();
|
| 254 |
+
|
| 255 |
+
// Initialize activity chart
|
| 256 |
+
const ctx = document.getElementById('activityChart').getContext('2d');
|
| 257 |
+
const activityChart = new Chart(ctx, {
|
| 258 |
+
type: 'bar',
|
| 259 |
+
data: {
|
| 260 |
+
labels: ['M', 'T', 'W', 'T', 'F', 'S', 'S'],
|
| 261 |
+
datasets: [{
|
| 262 |
+
data: [6, 4, 8, 5, 7, 9, 7],
|
| 263 |
+
backgroundColor: '#0ea5e9',
|
| 264 |
+
borderRadius: 4,
|
| 265 |
+
borderWidth: 0
|
| 266 |
+
}]
|
| 267 |
+
},
|
| 268 |
+
options: {
|
| 269 |
+
responsive: true,
|
| 270 |
+
maintainAspectRatio: false,
|
| 271 |
+
scales: {
|
| 272 |
+
y: {
|
| 273 |
+
beginAtZero: true,
|
| 274 |
+
grid: {
|
| 275 |
+
display: false,
|
| 276 |
+
drawBorder: false
|
| 277 |
+
},
|
| 278 |
+
ticks: {
|
| 279 |
+
display: false
|
| 280 |
+
}
|
| 281 |
+
},
|
| 282 |
+
x: {
|
| 283 |
+
grid: {
|
| 284 |
+
display: false,
|
| 285 |
+
drawBorder: false
|
| 286 |
+
}
|
| 287 |
+
}
|
| 288 |
+
},
|
| 289 |
+
plugins: {
|
| 290 |
+
legend: {
|
| 291 |
+
display: false
|
| 292 |
+
}
|
| 293 |
+
}
|
| 294 |
+
}
|
| 295 |
+
});
|
| 296 |
+
</script>
|
| 297 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 298 |
+
</body>
|
| 299 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Initialize health metrics with animation
|
| 2 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 3 |
+
const healthCards = document.querySelectorAll('.health-card');
|
| 4 |
+
|
| 5 |
+
healthCards.forEach((card, index) => {
|
| 6 |
+
card.style.opacity = '0';
|
| 7 |
+
card.style.transform = 'translateY(20px)';
|
| 8 |
+
card.style.transition = `all 0.5s ease ${index * 0.1}s`;
|
| 9 |
+
|
| 10 |
+
setTimeout(() => {
|
| 11 |
+
card.style.opacity = '1';
|
| 12 |
+
card.style.transform = 'translateY(0)';
|
| 13 |
+
}, 100);
|
| 14 |
+
});
|
| 15 |
+
|
| 16 |
+
// Simulate connection status
|
| 17 |
+
const connectionStatus = document.getElementById('connection-status');
|
| 18 |
+
setInterval(() => {
|
| 19 |
+
connectionStatus.classList.toggle('bg-green-900');
|
| 20 |
+
connectionStatus.classList.toggle('bg-gray-800');
|
| 21 |
+
const icon = connectionStatus.querySelector('i');
|
| 22 |
+
icon.classList.toggle('text-green-500');
|
| 23 |
+
icon.classList.toggle('text-gray-500');
|
| 24 |
+
}, 3000);
|
| 25 |
+
|
| 26 |
+
// Add click event to cards
|
| 27 |
+
healthCards.forEach(card => {
|
| 28 |
+
card.addEventListener('click', () => {
|
| 29 |
+
const metric = card.getAttribute('data-metric');
|
| 30 |
+
console.log(`Navigating to ${metric} detail view`);
|
| 31 |
+
// In a real app, you would navigate to a detail page here
|
| 32 |
+
});
|
| 33 |
+
});
|
| 34 |
+
});
|
style.css
CHANGED
|
@@ -1,28 +1,81 @@
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
|
|
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
.
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
.
|
| 27 |
-
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 2 |
+
|
| 3 |
body {
|
| 4 |
+
font-family: 'Inter', sans-serif;
|
| 5 |
+
background-color: #0f172a;
|
| 6 |
+
}
|
| 7 |
+
.health-card {
|
| 8 |
+
background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(2, 6, 23, 0.9) 100%);
|
| 9 |
+
border: 1px solid rgba(30, 41, 59, 0.5);
|
| 10 |
+
border-radius: 16px;
|
| 11 |
+
padding: 24px;
|
| 12 |
+
transition: all 0.3s ease;
|
| 13 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
| 14 |
+
position: relative;
|
| 15 |
+
overflow: hidden;
|
| 16 |
+
}
|
| 17 |
+
|
| 18 |
+
.health-card::after {
|
| 19 |
+
content: '';
|
| 20 |
+
position: absolute;
|
| 21 |
+
top: 0;
|
| 22 |
+
right: 0;
|
| 23 |
+
bottom: 0;
|
| 24 |
+
width: 20%;
|
| 25 |
+
background: linear-gradient(90deg, rgba(15, 23, 42, 0.3) 0%, rgba(59, 130, 246, 0.15) 100%);
|
| 26 |
+
z-index: 1;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
.health-card:hover::after {
|
| 30 |
+
background: linear-gradient(90deg, rgba(15, 23, 42, 0.4) 0%, rgba(59, 130, 246, 0.25) 100%);
|
| 31 |
+
}
|
| 32 |
+
.health-card:hover {
|
| 33 |
+
transform: translateY(-2px);
|
| 34 |
+
box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
|
| 35 |
+
border-color: rgba(59, 130, 246, 0.5);
|
| 36 |
+
}
|
| 37 |
+
|
| 38 |
+
.trend-badge {
|
| 39 |
+
display: inline-flex;
|
| 40 |
+
align-items: center;
|
| 41 |
+
padding: 4px 8px;
|
| 42 |
+
border-radius: 12px;
|
| 43 |
+
font-size: 12px;
|
| 44 |
+
font-weight: 600;
|
| 45 |
}
|
| 46 |
|
| 47 |
+
.trend-badge.positive {
|
| 48 |
+
background-color: rgba(34, 197, 94, 0.1);
|
| 49 |
+
color: rgb(34, 197, 94);
|
| 50 |
+
border: 1px solid rgba(34, 197, 94, 0.3);
|
| 51 |
}
|
| 52 |
|
| 53 |
+
.trend-badge.negative {
|
| 54 |
+
background-color: rgba(239, 68, 68, 0.1);
|
| 55 |
+
color: rgb(239, 68, 68);
|
| 56 |
+
border: 1px solid rgba(239, 68, 68, 0.3);
|
|
|
|
| 57 |
}
|
| 58 |
|
| 59 |
+
.mini-metric {
|
| 60 |
+
padding: 12px 0;
|
| 61 |
+
border-bottom: 1px solid rgba(30, 41, 59, 0.5);
|
|
|
|
|
|
|
|
|
|
| 62 |
}
|
| 63 |
|
| 64 |
+
.mini-metric:last-child {
|
| 65 |
+
border-bottom: none;
|
| 66 |
}
|
| 67 |
+
|
| 68 |
+
.quick-action {
|
| 69 |
+
background: linear-gradient(135deg, rgba(15, 23, 42, 0.8) 0%, rgba(2, 6, 23, 0.9) 100%);
|
| 70 |
+
border: 1px solid rgba(30, 41, 59, 0.5);
|
| 71 |
+
border-radius: 12px;
|
| 72 |
+
padding: 16px;
|
| 73 |
+
transition: all 0.3s ease;
|
| 74 |
+
text-align: center;
|
| 75 |
+
}
|
| 76 |
+
|
| 77 |
+
.quick-action:hover {
|
| 78 |
+
transform: translateY(-2px);
|
| 79 |
+
box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
|
| 80 |
+
border-color: rgba(59, 130, 246, 0.5);
|
| 81 |
+
}
|