Spaces:
Running
Running
Download index.html from Junimaru/hyperpulse: direct link, hf CLI and curl.
- Browser
- Download file 48 kB
-
https://huggingface.co/spaces/Junimaru/hyperpulse/resolve/main/index.html
- Command line
-
hf download hf://spaces/Junimaru/hyperpulse/index.html
-
curl -L -o index.html https://huggingface.co/spaces/Junimaru/hyperpulse/resolve/main/index.html
48 kB
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HyperPulse - Pulse Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
:root {
--pulse-primary: #6d28d9;
--pulse-secondary: #a78bfa;
--pulse-accent: #f43f5e;
--pulse-dark: #0f172a;
--pulse-light: #f8fafc;
}
body {
font-family: 'Space Grotesk', sans-serif;
background-color: var(--pulse-dark);
color: var(--pulse-light);
}
.pulse-gradient {
background: linear-gradient(135deg, var(--pulse-primary), var(--pulse-accent));
}
.pulse-card {
background: rgba(15, 23, 42, 0.7);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
transition: all 0.3s ease;
}
.pulse-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(109, 40, 217, 0.3);
}
.heartbeat-indicator {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { transform: scale(1); opacity: 1; }
50% { transform: scale(1.1); opacity: 0.7; }
100% { transform: scale(1); opacity: 1; }
}
.bio-wave {
position: relative;
overflow: hidden;
}
.bio-wave::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.2), transparent);
animation: wave 3s linear infinite;
}
@keyframes wave {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}
.heart-rate-line {
position: relative;
height: 40px;
width: 100%;
overflow: hidden;
}
.heart-rate-line::before {
content: "";
position: absolute;
top: 50%;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg,
transparent,
transparent 10%,
var(--pulse-accent) 10%,
var(--pulse-accent) 15%,
transparent 15%,
transparent 25%,
var(--pulse-primary) 25%,
var(--pulse-primary) 30%,
transparent 30%,
transparent 40%,
var(--pulse-accent) 40%,
var(--pulse-accent) 45%,
transparent 45%,
transparent 55%,
var(--pulse-primary) 55%,
var(--pulse-primary) 60%,
transparent 60%,
transparent 70%,
var(--pulse-accent) 70%,
var(--pulse-accent) 75%,
transparent 75%,
transparent 85%,
var(--pulse-primary) 85%,
var(--pulse-primary) 90%,
transparent 90%,
transparent
);
animation: heartLineMove 4s linear infinite;
}
@keyframes heartLineMove {
0% { transform: translateX(0); }
100% { transform: translateX(-100%); }
}
.ecg-line {
position: relative;
height: 100px;
width: 100%;
overflow: hidden;
background-color: rgba(0, 0, 0, 0.2);
}
.ecg-line::before {
content: "";
position: absolute;
top: 50%;
left: 0;
width: 100%;
height: 2px;
background: linear-gradient(90deg,
transparent,
transparent 5%,
var(--pulse-accent) 5%,
var(--pulse-accent) 6%,
transparent 6%,
transparent 10%,
var(--pulse-accent) 10%,
var(--pulse-accent) 11%,
transparent 11%,
transparent 15%,
var(--pulse-accent) 15%,
var(--pulse-accent) 16%,
transparent 16%,
transparent 20%,
var(--pulse-primary) 20%,
var(--pulse-primary) 30%,
var(--pulse-primary) 30%,
var(--pulse-primary) 31%,
transparent 31%,
transparent 35%,
var(--pulse-primary) 35%,
var(--pulse-primary) 36%,
transparent 36%,
transparent 40%,
var(--pulse-primary) 40%,
var(--pulse-primary) 41%,
transparent 41%,
transparent 45%,
var(--pulse-accent) 45%,
var(--pulse-accent) 50%,
transparent 50%,
transparent 55%,
var(--pulse-accent) 55%,
var(--pulse-accent) 56%,
transparent 56%,
transparent 60%,
var(--pulse-accent) 60%,
var(--pulse-accent) 61%,
transparent 61%,
transparent 65%,
var(--pulse-primary) 65%,
var(--pulse-primary) 70%,
var(--pulse-primary) 70%,
var(--pulse-primary) 71%,
transparent 71%,
transparent 75%,
var(--pulse-primary) 75%,
var(--pulse-primary) 76%,
transparent 76%,
transparent 80%,
var(--pulse-primary) 80%,
var(--pulse-primary) 81%,
transparent 81%,
transparent 85%,
var(--pulse-accent) 85%,
var(--pulse-accent) 86%,
transparent 86%,
transparent 90%,
var(--pulse-accent) 90%,
var(--pulse-accent) 91%,
transparent 91%,
transparent 95%,
var(--pulse-accent) 95%,
var(--pulse-accent) 96%,
transparent 96%,
transparent
);
animation: heartLineMove 8s linear infinite;
}
.bio-ring {
position: relative;
width: 80px;
height: 80px;
}
.bio-ring-circle {
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
border: 8px solid;
border-color: var(--pulse-primary) transparent transparent transparent;
animation: rotate 2s linear infinite;
}
.bio-ring-circle:nth-child(2) {
border-color: transparent var(--pulse-accent) transparent transparent;
animation-delay: -0.5s;
}
.bio-ring-circle:nth-child(3) {
border-color: transparent transparent var(--pulse-secondary) transparent;
animation-delay: -1s;
}
@keyframes rotate {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
.graph-container {
position: relative;
height: 120px;
width: 100%;
}
.graph-line {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
fill: none;
stroke: var(--pulse-primary);
stroke-width: 2;
stroke-linecap: round;
stroke-linejoin: round;
}
.graph-area {
position: absolute;
bottom: 0;
left: 0;
width: 100%;
height: 100%;
fill: url(#graphGradient);
}
.tooltip {
position: relative;
}
.tooltip:hover .tooltip-text {
visibility: visible;
opacity: 1;
}
.tooltip-text {
visibility: hidden;
width: 120px;
background-color: var(--pulse-dark);
color: var(--pulse-light);
text-align: center;
border-radius: 6px;
padding: 5px;
position: absolute;
z-index: 1;
bottom: 125%;
left: 50%;
margin-left: -60px;
opacity: 0;
transition: opacity 0.3s;
font-size: 12px;
border: 1px solid var(--pulse-primary);
}
.tooltip-text::after {
content: "";
position: absolute;
top: 100%;
left: 50%;
margin-left: -5px;
border-width: 5px;
border-style: solid;
border-color: var(--pulse-dark) transparent transparent transparent;
}
.neon-text {
text-shadow: 0 0 5px var(--pulse-secondary),
0 0 10px var(--pulse-secondary),
0 0 20px var(--pulse-secondary);
}
.glow-box {
box-shadow: 0 0 15px rgba(167, 139, 250, 0.5);
}
.pulse-tab {
position: relative;
overflow: hidden;
}
.pulse-tab::after {
content: "";
position: absolute;
bottom: 0;
left: 0;
width: 0;
height: 2px;
background: var(--pulse-primary);
transition: width 0.3s ease;
}
.pulse-tab.active::after {
width: 100%;
}
.pulse-tab.active {
color: var(--pulse-primary);
}
.lazy-load {
opacity: 0;
transform: translateY(20px);
transition: opacity 0.6s ease, transform 0.6s ease;
}
.lazy-load.loaded {
opacity: 1;
transform: translateY(0);
}
/* ECG Animation */
.ecg-container {
position: relative;
width: 100%;
height: 150px;
overflow: hidden;
background-color: rgba(0, 0, 0, 0.2);
}
.ecg-path {
position: absolute;
top: 50%;
left: 0;
width: 100%;
height: 2px;
background-color: var(--pulse-accent);
}
.ecg-peak {
position: absolute;
width: 4px;
height: 30px;
background-color: var(--pulse-accent);
transform: translateY(-15px);
animation: ecgPeak 1.5s infinite;
}
@keyframes ecgPeak {
0% { left: 10%; opacity: 0; }
10% { opacity: 1; height: 30px; }
15% { height: 50px; }
20% { height: 30px; }
25% { height: 40px; }
30% { height: 30px; }
100% { left: 90%; opacity: 1; height: 30px; }
}
/* Breathing animation */
.breathing-circle {
width: 80px;
height: 80px;
border-radius: 50%;
background: rgba(167, 139, 250, 0.3);
animation: breathe 4s infinite ease-in-out;
}
@keyframes breathe {
0%, 100% { transform: scale(0.9); }
50% { transform: scale(1.1); }
}
/* Stress level animation */
.stress-indicator {
position: relative;
width: 80px;
height: 80px;
}
.stress-wave {
position: absolute;
width: 100%;
height: 100%;
border-radius: 50%;
border: 3px solid var(--pulse-accent);
opacity: 0;
animation: stressPulse 3s infinite;
}
.stress-wave:nth-child(2) {
animation-delay: 1s;
}
.stress-wave:nth-child(3) {
animation-delay: 2s;
}
@keyframes stressPulse {
0% { transform: scale(0.5); opacity: 0.8; }
100% { transform: scale(1.5); opacity: 0; }
}
</style>
</head>
<body class="min-h-screen">
<!-- Bio-Sensing Header -->
<header class="fixed top-0 left-0 right-0 z-50 bio-wave">
<div class="container mx-auto px-4 py-3 flex justify-between items-center">
<div class="flex items-center space-x-2">
<div class="heartbeat-indicator w-3 h-3 rounded-full bg-red-500"></div>
<span class="text-sm font-medium">LIVE BIOFEEDBACK</span>
<div class="flex items-center bg-purple-900/50 rounded-full px-2 py-1 ml-2">
<i class="fas fa-lock text-green-400 mr-1 text-xs"></i>
<span class="text-xs">ENCRYPTED</span>
</div>
</div>
<div class="flex items-center space-x-4">
<button id="camera-btn" class="p-2 rounded-full bg-purple-900/50 hover:bg-purple-800/50 transition tooltip">
<i class="fas fa-camera text-purple-300"></i>
<span class="tooltip-text">Facial Analysis</span>
</button>
<button id="bluetooth-btn" class="p-2 rounded-full bg-purple-900/50 hover:bg-purple-800/50 transition tooltip">
<i class="fas fa-bluetooth-b text-blue-300"></i>
<span class="tooltip-text">Devices</span>
</button>
<button id="settings-btn" class="p-2 rounded-full bg-purple-900/50 hover:bg-purple-800/50 transition tooltip">
<i class="fas fa-cog text-white/70"></i>
<span class="tooltip-text">Settings</span>
</button>
</div>
</div>
<div class="h-1 w-full bg-gradient-to-r from-purple-500 via-pink-500 to-red-500"></div>
</header>
<!-- Main Content -->
<main class="pt-20 pb-24">
<!-- Pulse Dashboard Header -->
<section class="container mx-auto px-4 mb-6">
<div class="flex items-center justify-between mb-4">
<h1 class="text-2xl font-bold flex items-center">
<i class="fas fa-heartbeat text-purple-400 mr-3"></i>
Pulse Dashboard
</h1>
<div class="flex items-center space-x-2">
<span class="text-xs bg-purple-900/50 px-2 py-1 rounded-full">REALTIME</span>
<button id="pause-btn" class="text-xs bg-white/10 px-3 py-1 rounded-full hover:bg-white/20 transition">
<i class="fas fa-pause mr-1"></i> Pause
</button>
</div>
</div>
<div class="pulse-card rounded-2xl p-6">
<div class="flex items-center justify-between mb-6">
<div>
<h2 class="text-xl font-bold">Your Vital Signs</h2>
<p class="text-sm opacity-70">Updated in real-time based on your biometrics</p>
</div>
<div class="flex items-center space-x-2">
<div class="w-2 h-2 rounded-full bg-green-400 animate-pulse"></div>
<span class="text-xs">ACTIVE</span>
</div>
</div>
<!-- ECG Visualization -->
<div class="ecg-container mb-6 rounded-lg overflow-hidden">
<div class="ecg-path"></div>
<div class="ecg-peak"></div>
</div>
<!-- Primary Metrics -->
<div class="grid grid-cols-2 md:grid-cols-4 gap-4 mb-6">
<!-- Heart Rate -->
<div class="pulse-card rounded-xl p-4 flex items-center">
<div class="mr-4">
<div class="bio-ring">
<div class="bio-ring-circle"></div>
<div class="bio-ring-circle"></div>
<div class="bio-ring-circle"></div>
</div>
</div>
<div>
<div class="text-xs opacity-70 mb-1">Heart Rate</div>
<div class="text-2xl font-bold heartbeat-value">72</div>
<div class="text-xs">BPM</div>
</div>
</div>
<!-- Blood Oxygen -->
<div class="pulse-card rounded-xl p-4 flex items-center">
<div class="mr-4">
<div class="w-12 h-12 rounded-full bg-blue-500/20 flex items-center justify-center">
<i class="fas fa-lungs text-blue-300 text-xl"></i>
</div>
</div>
<div>
<div class="text-xs opacity-70 mb-1">SpO₂</div>
<div class="text-2xl font-bold spo2-value">98</div>
<div class="text-xs">%</div>
</div>
</div>
<!-- Stress Level -->
<div class="pulse-card rounded-xl p-4 flex items-center">
<div class="mr-4">
<div class="stress-indicator">
<div class="stress-wave"></div>
<div class="stress-wave"></div>
<div class="stress-wave"></div>
</div>
</div>
<div>
<div class="text-xs opacity-70 mb-1">Stress</div>
<div class="text-2xl font-bold stress-value">24</div>
<div class="text-xs">Low</div>
</div>
</div>
<!-- Respiratory Rate -->
<div class="pulse-card rounded-xl p-4 flex items-center">
<div class="mr-4">
<div class="breathing-circle flex items-center justify-center">
<i class="fas fa-wind text-purple-300 text-xl"></i>
</div>
</div>
<div>
<div class="text-xs opacity-70 mb-1">Breathing</div>
<div class="text-2xl font-bold resp-rate-value">14</div>
<div class="text-xs">breaths/min</div>
</div>
</div>
</div>
<!-- Secondary Metrics -->
<div class="grid grid-cols-2 md:grid-cols-3 gap-4 mb-6">
<!-- HR Variability -->
<div class="pulse-card rounded-xl p-4">
<div class="text-xs opacity-70 mb-1">HR Variability</div>
<div class="flex items-end justify-between">
<div class="text-xl font-bold hr-variability-value">68</div>
<div class="text-xs">ms</div>
</div>
<div class="w-full bg-gray-700 rounded-full h-1 mt-2">
<div class="bg-green-500 h-1 rounded-full" style="width: 65%"></div>
</div>
</div>
<!-- Blood Pressure -->
<div class="pulse-card rounded-xl p-4">
<div class="text-xs opacity-70 mb-1">Blood Pressure</div>
<div class="flex items-end justify-between">
<div class="text-xl font-bold bp-value">118/76</div>
<div class="text-xs">mmHg</div>
</div>
<div class="w-full bg-gray-700 rounded-full h-1 mt-2">
<div class="bg-blue-500 h-1 rounded-full" style="width: 80%"></div>
</div>
</div>
<!-- Body Temp -->
<div class="pulse-card rounded-xl p-4">
<div class="text-xs opacity-70 mb-1">Body Temp</div>
<div class="flex items-end justify-between">
<div class="text-xl font-bold temp-value">36.7</div>
<div class="text-xs">°C</div>
</div>
<div class="w-full bg-gray-700 rounded-full h-1 mt-2">
<div class="bg-yellow-500 h-1 rounded-full" style="width: 50%"></div>
</div>
</div>
</div>
<!-- Time Period Selector -->
<div class="flex items-center justify-between mb-4">
<h3 class="font-bold">Historical Data</h3>
<div class="flex space-x-1 bg-white/10 rounded-full p-1">
<button class="time-period-btn px-3 py-1 rounded-full text-xs bg-purple-900" data-period="day">Day</button>
<button class="time-period-btn px-3 py-1 rounded-full text-xs hover:bg-white/10" data-period="week">Week</button>
<button class="time-period-btn px-3 py-1 rounded-full text-xs hover:bg-white/10" data-period="month">Month</button>
</div>
</div>
<!-- Historical Graph -->
<div class="pulse-card rounded-xl p-4 mb-6">
<div class="graph-container">
<svg viewBox="0 0 300 100" preserveAspectRatio="none">
<defs>
<linearGradient id="graphGradient" x1="0" y1="0" x2="0" y2="1">
<stop offset="0%" stop-color="rgba(109, 40, 217, 0.5)" />
<stop offset="100%" stop-color="rgba(109, 40, 217, 0)" />
</linearGradient>
</defs>
<path class="graph-area" d="M0,100 L50,80 L100,60 L150,70 L200,50 L250,30 L300,40 L300,100 Z"></path>
<path class="graph-line" d="M0,100 L50,80 L100,60 L150,70 L200,50 L250,30 L300,40"></path>
</svg>
</div>
<div class="flex justify-between text-xs opacity-70 mt-2">
<span>12:00 AM</span>
<span>6:00 AM</span>
<span>12:00 PM</span>
<span>6:00 PM</span>
<span>Now</span>
</div>
</div>
<!-- Insights & Recommendations -->
<div class="pulse-card rounded-2xl p-6">
<h3 class="font-bold mb-3">Health Insights</h3>
<p class="text-sm opacity-80 mb-4">Based on your current biometrics and trends, here's what we recommend:</p>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<!-- Activity Recommendation -->
<div class="pulse-card rounded-xl p-4 flex items-start">
<div class="w-10 h-10 rounded-full bg-blue-500/20 flex items-center justify-center mr-3">
<i class="fas fa-walking text-blue-300"></i>
</div>
<div>
<h4 class="font-medium mb-1">Activity</h4>
<p class="text-xs opacity-70">Light walking for 15-20 minutes</p>
</div>
</div>
<!-- Nutrition Recommendation -->
<div class="pulse-card rounded-xl p-4 flex items-start">
<div class="w-10 h-10 rounded-full bg-green-500/20 flex items-center justify-center mr-3">
<i class="fas fa-apple-alt text-green-300"></i>
</div>
<div>
<h4 class="font-medium mb-1">Nutrition</h4>
<p class="text-xs opacity-70">Hydrate with electrolyte-rich fluids</p>
</div>
</div>
<!-- Recovery Recommendation -->
<div class="pulse-card rounded-xl p-4 flex items-start">
<div class="w-10 h-10 rounded-full bg-purple-500/20 flex items-center justify-center mr-3">
<i class="fas fa-moon text-purple-300"></i>
</div>
<div>
<div class="font-medium mb-1">Recovery</div>
<p class="text-xs opacity-70">Consider a 10-minute meditation session</p>
</div>
</div>
</div>
</div>
</div>
</section>
<!-- Bio-Connections -->
<section class="container mx-auto px-4 mb-6">
<div class="flex items-center justify-between mb-4">
<h3 class="text-lg font-bold">Connected Bio-Devices</h3>
<button id="add-device" class="text-xs px-3 py-1 rounded-full bg-white/10 hover:bg-white/20 transition">
<i class="fas fa-plus mr-1"></i> Add Device
</button>
</div>
<div class="grid grid-cols-1 md:grid-cols-3 gap-4">
<!-- Apple Watch -->
<div class="pulse-card rounded-xl p-4">
<div class="flex items-center justify-between mb-3">
<div class="flex items-center">
<div class="w-10 h-10 rounded-full bg-gray-800 flex items-center justify-center mr-3">
<i class="fab fa-apple text-white"></i>
</div>
<div>
<h4 class="font-medium">Apple Watch</h4>
<p class="text-xs opacity-70">Series 6</p>
</div>
</div>
<div class="w-2 h-2 rounded-full bg-green-400 animate-pulse"></div>
</div>
<div class="text-xs opacity-70 mb-2">Connected: 2h 15m ago</div>
<div class="flex justify-between text-xs mb-3">
<span>Battery: 78%</span>
<span>Signal: Strong</span>
</div>
<button class="w-full py-2 rounded-full bg-white/10 hover:bg-white/20 transition text-xs">
<i class="fas fa-cog mr-1"></i> Device Settings
</button>
</div>
<!-- Fitbit -->
<div class="pulse-card rounded-xl p-4">
<div class="flex items-center justify-between mb-3">
<div class="flex items-center">
<div class="w-10 h-10 rounded-full bg-blue-500/20 flex items-center justify-center mr-3">
<i class="fas fa-heartbeat text-blue-300"></i>
</div>
<div>
<h4 class="font-medium">Fitbit Sense</h4>
<p class="text-xs opacity-70">v2.1</p>
</div>
</div>
<div class="w-2 h-2 rounded-full bg-green-400 animate-pulse"></div>
</div>
<div class="text-xs opacity-70 mb-2">Connected: 45m ago</div>
<div class="flex justify-between text-xs mb-3">
<span>Battery: 92%</span>
<span>Signal: Medium</span>
</div>
<button class="w-full py-2 rounded-full bg-white/10 hover:bg-white/20 transition text-xs">
<i class="fas fa-cog mr-1"></i> Device Settings
</button>
</div>
<!-- Oura Ring -->
<div class="pulse-card rounded-xl p-4">
<div class="flex items-center justify-between mb-3">
<div class="flex items-center">
<div class="w-10 h-10 rounded-full bg-purple-500/20 flex items-center justify-center mr-3">
<i class="fas fa-ring text-purple-300"></i>
</div>
<div>
<h4 class="font-medium">Oura Ring</h4>
<p class="text-xs opacity-70">Gen 3</p>
</div>
</div>
<div class="w-2 h-2 rounded-full bg-yellow-400 animate-pulse"></div>
</div>
<div class="text-xs opacity-70 mb-2">Connected: 5h ago</div>
<div class="flex justify-between text-xs mb-3">
<span>Battery: 42%</span>
<span>Signal: Weak</span>
</div>
<button class="w-full py-2 rounded-full bg-white/10 hover:bg-white/20 transition text-xs">
<i class="fas fa-bolt mr-1"></i> Charge Device
</button>
</div>
</div>
</section>
</main>
<!-- Bio-Navigation -->
<nav class="fixed bottom-0 left-0 right-0 z-50 bg-gray-900/80 backdrop-filter backdrop-blur-lg border-t border-white/10">
<div class="container mx-auto px-4">
<div class="flex justify-around items-center py-3">
<button class="nav-btn flex flex-col items-center text-white/60 hover:text-white transition" data-page="home">
<i class="fas fa-home text-lg"></i>
<span class="text-xs mt-1">Home</span>
</button>
<button class="nav-btn flex flex-col items-center text-purple-400" data-page="pulse">
<i class="fas fa-heartbeat text-lg"></i>
<span class="text-xs mt-1">Pulse</span>
</button>
<button class="nav-btn flex flex-col items-center text-white/60 hover:text-white transition" data-page="explore">
<i class="fas fa-compass text-lg"></i>
<span class="text-xs mt-1">Explore</span>
</button>
<button class="nav-btn flex flex-col items-center text-white/60 hover:text-white transition" data-page="profile">
<i class="fas fa-user-astronaut text-lg"></i>
<span class="text-xs mt-1">Profile</span>
</button>
<button class="quick-action-btn w-12 h-12 -mt-8 rounded-full pulse-gradient flex items-center justify-center text-white shadow-lg glow-box">
<i class="fas fa-bolt text-xl"></i>
</button>
</div>
</div>
</nav>
<!-- Bluetooth Modal -->
<div id="bluetooth-modal" class="fixed inset-0 z-50 flex items-center justify-center bg-black/80 hidden">
<div class="pulse-card rounded-2xl w-full max-w-md mx-4">
<div class="p-6">
<div class="flex justify-between items-center mb-4">
<h3 class="text-lg font-bold">Connect Device</h3>
<button id="close-bluetooth" class="p-2 rounded-full bg-white/10 hover:bg-white/20 transition">
<i class="fas fa-times"></i>
</button>
</div>
<div class="space-y-3 mb-4">
<div class="pulse-card rounded-xl p-4 flex items-center justify-between">
<div class="flex items-center space-x-3">
<div class="w-10 h-10 rounded-full bg-blue-500 flex items-center justify-center">
<i class="fas fa-heartbeat text-white"></i>
</div>
<div>
<h4 class="font-medium">Apple Watch</h4>
<p class="text-xs opacity-70">Last connected: 2h ago</p>
</div>
</div>
<button class="connect-device px-3 py-1 rounded-full bg-blue-900 hover:bg-blue-800 transition text-xs" data-device="apple-watch">
Connect
</button>
</div>
<div class="pulse-card rounded-xl p-4 flex items-center justify-between">
<div class="flex items-center space-x-3">
<div class="w-10 h-10 rounded-full bg-green-500 flex items-center justify-center">
<i class="fas fa-heartbeat text-white"></i>
</div>
<div>
<h4 class="font-medium">Fitbit Sense</h4>
<p class="text-xs opacity-70">Available</p>
</div>
</div>
<button class="connect-device px-3 py-1 rounded-full bg-green-900 hover:bg-green-800 transition text-xs" data-device="fitbit">
Connect
</button>
</div>
<div class="pulse-card rounded-xl p-4 flex items-center justify-between">
<div class="flex items-center space-x-3">
<div class="w-10 h-10 rounded-full bg-purple-500 flex items-center justify-center">
<i class="fas fa-heartbeat text-white"></i>
</div>
<div>
<h4 class="font-medium">Garmin Venu</h4>
<p class="text-xs opacity-70">Not in range</p>
</div>
</div>
<button class="px-3 py-1 rounded-full bg-gray-700 text-xs cursor-not-allowed" disabled>
Connect
</button>
</div>
</div>
<button id="scan-devices" class="w-full py-3 rounded-xl bg-purple-900 hover:bg-purple-800 transition font-medium">
<i class="fas fa-search mr-2"></i> Scan for Devices
</button>
</div>
</div>
</div>
<script>
// DOM Elements
const bluetoothBtn = document.getElementById('bluetooth-btn');
const bluetoothModal = document.getElementById('bluetooth-modal');
const closeBluetooth = document.getElementById('close-bluetooth');
const scanDevices = document.getElementById('scan-devices');
const connectDevices = document.querySelectorAll('.connect-device');
const addDeviceBtn = document.getElementById('add-device');
const pauseBtn = document.getElementById('pause-btn');
const timePeriodBtns = document.querySelectorAll('.time-period-btn');
const quickActionBtn = document.querySelector('.quick-action-btn');
const navBtns = document.querySelectorAll('.nav-btn');
// Biometric data elements
const heartbeatValue = document.querySelector('.heartbeat-value');
const spo2Value = document.querySelector('.spo2-value');
const stressValue = document.querySelector('.stress-value');
const respRateValue = document.querySelector('.resp-rate-value');
const hrVariabilityValue = document.querySelector('.hr-variability-value');
const bpValue = document.querySelector('.bp-value');
const tempValue = document.querySelector('.temp-value');
// Modal functions
function openModal(modal) {
modal.classList.remove('hidden');
document.body.style.overflow = 'hidden';
}
function closeModal(modal) {
modal.classList.add('hidden');
document.body.style.overflow = '';
}
// Event Listeners
bluetoothBtn.addEventListener('click', () => openModal(bluetoothModal));
closeBluetooth.addEventListener('click', () => closeModal(bluetoothModal));
addDeviceBtn.addEventListener('click', () => openModal(bluetoothModal));
// Close modal when clicking outside
window.addEventListener('click', (e) => {
if (e.target === bluetoothModal) closeModal(bluetoothModal);
});
// Connect devices
connectDevices.forEach(btn => {
btn.addEventListener('click', () => {
const device = btn.dataset.device;
btn.textContent = 'Connecting...';
btn.classList.remove('bg-blue-900', 'bg-green-900', 'hover:bg-blue-800', 'hover:bg-green-800');
btn.classList.add('bg-gray-700', 'cursor-not-allowed');
// Simulate connection delay
setTimeout(() => {
btn.textContent = 'Connected';
showNotification(`${device.replace('-', ' ').toUpperCase()} connected successfully!`);
// Update status in bluetooth modal
const deviceStatus = btn.closest('.pulse-card').querySelector('.text-xs.opacity-70');
deviceStatus.textContent = 'Connected';
deviceStatus.classList.remove('opacity-70');
deviceStatus.classList.add('text-green-400');
}, 1500);
});
});
// Scan for devices
scanDevices.addEventListener('click', () => {
scanDevices.innerHTML = '<i class="fas fa-circle-notch fa-spin mr-2"></i> Scanning...';
// Simulate scanning delay
setTimeout(() => {
scanDevices.innerHTML = '<i class="fas fa-search mr-2"></i> Scan for Devices';
showNotification('Found 2 new devices nearby');
}, 2000);
});
// Pause/Resume real-time data
let isPaused = false;
pauseBtn.addEventListener('click', () => {
isPaused = !isPaused;
if (isPaused) {
pauseBtn.innerHTML = '<i class="fas fa-play mr-1"></i> Resume';
document.querySelector('.heartbeat-indicator').style.animationPlayState = 'paused';
document.querySelectorAll('.stress-wave').forEach(wave => {
wave.style.animationPlayState = 'paused';
});
document.querySelector('.breathing-circle').style.animationPlayState = 'paused';
} else {
pauseBtn.innerHTML = '<i class="fas fa-pause mr-1"></i> Pause';
document.querySelector('.heartbeat-indicator').style.animationPlayState = 'running';
document.querySelectorAll('.stress-wave').forEach(wave => {
wave.style.animationPlayState = 'running';
});
document.querySelector('.breathing-circle').style.animationPlayState = 'running';
}
});
// Time period selection
timePeriodBtns.forEach(btn => {
btn.addEventListener('click', () => {
timePeriodBtns.forEach(b => {
b.classList.remove('bg-purple-900');
b.classList.add('hover:bg-white/10');
});
btn.classList.add('bg-purple-900');
btn.classList.remove('hover:bg-white/10');
// Here you would typically load data for the selected time period
console.log(`Loading data for ${btn.dataset.period} period`);
});
});
// Quick action button
quickActionBtn.addEventListener('click', () => {
// Toggle between different quick actions
const icon = quickActionBtn.querySelector('i');
if (icon.classList.contains('fa-bolt')) {
icon.classList.remove('fa-bolt');
icon.classList.add('fa-heart');
quickActionBtn.classList.remove('pulse-gradient');
quickActionBtn.classList.add('bg-red-500');
} else if (icon.classList.contains('fa-heart')) {
icon.classList.remove('fa-heart');
icon.classList.add('fa-moon');
quickActionBtn.classList.remove('bg-red-500');
quickActionBtn.classList.add('bg-indigo-500');
} else {
icon.classList.remove('fa-moon');
icon.classList.add('fa-bolt');
quickActionBtn.classList.remove('bg-indigo-500');
quickActionBtn.classList.add('pulse-gradient');
}
// Show notification
showNotification('Quick action activated!');
});
// Navigation buttons
navBtns.forEach(btn => {
btn.addEventListener('click', () => {
navBtns.forEach(b => {
b.classList.remove('text-purple-400');
b.classList.add('text-white/60');
});
btn.classList.add('text-purple-400');
btn.classList.remove('text-white/60');
// Here you would typically navigate to different pages
console.log(`Navigating to ${btn.dataset.page}`);
});
});
// Simulate real-time biometric data changes
function simulateBiometricData() {
if (isPaused) return;
// Heart rate (60-100 bpm normal range)
const baseHeartRate = 72;
const heartRateVariation = Math.floor(Math.random() * 10) - 3; // -3 to +6
const newHeartRate = baseHeartRate + heartRateVariation;
heartbeatValue.textContent = newHeartRate;
// SpO2 (95-100% normal range)
const spo2Variation = Math.floor(Math.random() * 3) - 1; // -1 to +1
const newSpo2 = Math.min(100, Math.max(95, 98 + spo2Variation));
spo2Value.textContent = newSpo2;
// Stress level (0-100 scale)
const stressVariation = Math.floor(Math.random() * 10) - 2; // -2 to +7
const newStress = Math.min(100, Math.max(0, 24 + stressVariation));
stressValue.textContent = newStress;
// Respiratory rate (12-20 breaths/min normal range)
const respVariation = Math.floor(Math.random() * 3) - 1; // -1 to +1
const newRespRate = 14 + respVariation;
respRateValue.textContent = newRespRate;
// HR Variability (ms)
const hrvVariation = Math.floor(Math.random() * 10) - 3; // -3 to +6
const newHRV = 68 + hrvVariation;
hrVariabilityValue.textContent = newHRV;
// Blood Pressure (mmHg)
const bpSystolicVariation = Math.floor(Math.random() * 5) - 1; // -1 to +3
const bpDiastolicVariation = Math.floor(Math.random() * 3) - 1; // -1 to +1
const newBPSystolic = 118 + bpSystolicVariation;
const newBPDiastolic = 76 + bpDiastolicVariation;
bpValue.textContent = `${newBPSystolic}/${newBPDiastolic}`;
// Body Temperature (°C)
const tempVariation = (Math.random() * 0.4) - 0.2; // -0.2 to +0.2
const newTemp = 36.7 + tempVariation;
tempValue.textContent = newTemp.toFixed(1);
}
// Update data every 3 seconds
setInterval(simulateBiometricData, 3000);
// Initial data load
simulateBiometricData();
// Notification function
function showNotification(message) {
const notification = document.createElement('div');
notification.className = 'fixed top-20 right-4 z-50 pulse-card px-4 py-3 rounded-lg flex items-center shadow-lg';
notification.innerHTML = `
<i class="fas fa-check-circle text-green-400 mr-2"></i>
<span>${message}</span>
`;
document.body.appendChild(notification);
setTimeout(() => {
notification.style.opacity = '0';
notification.style.transform = 'translateX(20px)';
setTimeout(() => notification.remove(), 300);
}, 3000);
}
// Lazy load animation
document.addEventListener('DOMContentLoaded', () => {
const lazyElements = document.querySelectorAll('.lazy-load');
const observer = new IntersectionObserver((entries) => {
entries.forEach(entry => {
if (entry.isIntersecting) {
entry.target.classList.add('loaded');
observer.unobserve(entry.target);
}
});
}, { threshold: 0.1 });
lazyElements.forEach(el => observer.observe(el));
});
</script>
<p style="border-radius: 8px; text-align: center; font-size: 12px; color: #fff; margin-top: 16px;position: fixed; left: 8px; bottom: 8px; z-index: 10; background: rgba(0, 0, 0, 0.8); padding: 4px 8px;">Made with <img src="https://enzostvs-deepsite.hf.space/logo.svg" alt="DeepSite Logo" style="width: 16px; height: 16px; vertical-align: middle;display:inline-block;margin-right:3px;filter:brightness(0) invert(1);"><a href="https://enzostvs-deepsite.hf.space" style="color: #fff;text-decoration: underline;" target="_blank" >DeepSite</a> - <a href="https://enzostvs-deepsite.hf.space?remix=Junimaru/hyperpulse" style="color: #fff;text-decoration: underline;" target="_blank" >🧬 Remix</a></p></body>
</html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>HyperPulse - Pulse Dashboard</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<style>
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
:root {
--pulse-primary: #6d28d9;
--pulse-secondary: #a78bfa;
--pulse-accent: #f43f5e;
--pulse-dark: #0f172a;
--pulse-light: #f8fafc;
}
body {
font-family: 'Space Grotesk', sans-serif;
background-color: var(--pulse-dark);
color: var(--pulse-light);
}
.pulse-gradient {
background: linear-gradient(135deg, var(--pulse-primary), var(--pulse-accent));
}
.pulse-card {
background: rgba(15, 23, 42, 0.7);
backdrop-filter: blur(10px);
border: 1px solid rgba(255, 255, 255, 0.1);
transition: all 0.3s ease;
}
.pulse-card:hover {
transform: translateY(-5px);
box-shadow: 0 10px 25px rgba(109, 40, 217, 0.3);
}
.heartbeat-indicator {
animation: pulse 2s infinite;
}
@keyframes pulse {
0% { transform: scale(1); opacity: 1; }
50% { transform: scale(1.1); opacity: 0.7; }
100% { transform: scale(1); opacity: 1; }
}
.bio-wave {
position: relative;
overflow: hidden;
}
.bio-wave::before {
content: "";
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: linear-gradient(90deg, transparent, rgba(167, 139, 250, 0.2), transparent);
animation: wave 3s linear infinite;
}
@keyframes wave {
0% { transform: translateX(-100%); }
100% { transform: translateX(100%); }
}
.heart-rate-line {
position: relative;
height: 40px;
width: 100%;
overflow: hidden;
}
.heart-rate-line::before {
content: "";
position: absolute;
top: 50%;
left: 0;
right: 0;
height: 2px;
background: linear-gradient(90deg,
transparent,
transparent 10%,
var(--pulse-accent) 10%,
var(--pulse-accent) 15%,
transparent 15%,
transparent 25%,
var(--pulse-primary) 25%,
var(--pulse-primary) 30%,
transparent 30%,
transparent 40%,
var(--pulse-accent) 40%,
var(--pulse-accent) 45%,
transparent 45%,