Spaces:
Running
Running
File size: 7,588 Bytes
2abd282 830a4f4 2abd282 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 | <!DOCTYPE html>
<html lang="en" class="scroll-smooth">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FlowState - Focus Mode</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.tailwindcss.com"></script>
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
<script>
tailwind.config = {
darkMode: 'class',
theme: {
extend: {
colors: {
primary: {
50: '#ecfdf5',
100: '#d1fae5',
500: '#10b981',
600: '#059669',
700: '#047857',
},
secondary: {
50: '#f5f3ff',
100: '#ede9fe',
500: '#8b5cf6',
600: '#7c3aed',
700: '#6d28d9',
}
},
animation: {
'pulse-slow': 'pulse 3s cubic-bezier(0.4, 0, 0.6, 1) infinite',
'spin-slow': 'spin 3s linear infinite',
}
}
}
}
</script>
</head>
<body class="bg-gray-50 dark:bg-gray-900 text-gray-800 dark:text-gray-100 transition-colors duration-300">
<flow-navbar></flow-navbar>
<main class="pt-28 pb-12 px-4 sm:px-6 lg:px-8 max-w-5xl mx-auto">
<div class="text-center mb-12">
<h1 class="text-4xl font-bold mb-4">Focus Mode</h1>
<p class="text-gray-600 dark:text-gray-400 text-lg">Stay in the zone with the Pomodoro technique</p>
</div>
<!-- Timer Card -->
<div class="bg-white dark:bg-gray-800 rounded-3xl p-8 sm:p-12 shadow-2xl border border-gray-200 dark:border-gray-700 max-w-2xl mx-auto mb-12 relative overflow-hidden">
<div class="absolute inset-0 bg-gradient-to-br from-primary-500/5 to-secondary-500/5"></div>
<div class="relative z-10">
<!-- Mode Selector -->
<div class="flex justify-center gap-2 mb-8">
<button onclick="setTimerMode(25)" class="timer-mode px-4 py-2 rounded-full text-sm font-medium transition-all bg-primary-100 text-primary-700 dark:bg-primary-900 dark:text-primary-300" data-mode="25">Focus (25)</button>
<button onclick="setTimerMode(5)" class="timer-mode px-4 py-2 rounded-full text-sm font-medium transition-all hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-600 dark:text-gray-400" data-mode="5">Short Break</button>
<button onclick="setTimerMode(15)" class="timer-mode px-4 py-2 rounded-full text-sm font-medium transition-all hover:bg-gray-100 dark:hover:bg-gray-700 text-gray-600 dark:text-gray-400" data-mode="15">Long Break</button>
</div>
<!-- Timer Display -->
<div class="relative w-64 h-64 mx-auto mb-8">
<svg class="w-full h-full transform -rotate-90" viewBox="0 0 100 100">
<circle cx="50" cy="50" r="45" fill="none" stroke="currentColor" stroke-width="8" class="text-gray-200 dark:text-gray-700"></circle>
<circle id="progress-ring" cx="50" cy="50" r="45" fill="none" stroke="currentColor" stroke-width="8" stroke-linecap="round" class="text-primary-500 transition-all duration-1000" stroke-dasharray="283" stroke-dashoffset="0"></circle>
</svg>
<div class="absolute inset-0 flex items-center justify-center">
<div class="text-center">
<div id="timer-display" class="text-6xl font-bold tabular-nums">25:00</div>
<div id="timer-status" class="text-sm text-gray-500 mt-2 font-medium uppercase tracking-wider">Ready</div>
</div>
</div>
</div>
<!-- Controls -->
<div class="flex justify-center gap-4">
<button id="start-btn" onclick="toggleTimer()" class="w-16 h-16 rounded-full bg-primary-600 hover:bg-primary-700 text-white flex items-center justify-center shadow-lg hover:shadow-primary-500/50 transition-all transform hover:scale-110">
<i data-feather="play" class="w-6 h-6 ml-1" id="play-icon"></i>
</button>
<button onclick="resetTimer()" class="w-16 h-16 rounded-full bg-gray-200 dark:bg-gray-700 hover:bg-gray-300 dark:hover:bg-gray-600 text-gray-700 dark:text-gray-300 flex items-center justify-center transition-all transform hover:scale-110">
<i data-feather="rotate-ccw" class="w-6 h-6"></i>
</button>
</div>
</div>
</div>
<!-- Session Stats -->
<div class="grid grid-cols-1 md:grid-cols-3 gap-6">
<div class="bg-white dark:bg-gray-800 rounded-2xl p-6 shadow-lg border border-gray-200 dark:border-gray-700 text-center">
<div class="w-12 h-12 mx-auto mb-3 bg-primary-100 dark:bg-primary-900 rounded-full flex items-center justify-center">
<i data-feather="check-circle" class="w-6 h-6 text-primary-600"></i>
</div>
<h3 class="text-2xl font-bold mb-1" id="sessions-completed">0</h3>
<p class="text-sm text-gray-600 dark:text-gray-400">Sessions Completed</p>
</div>
<div class="bg-white dark:bg-gray-800 rounded-2xl p-6 shadow-lg border border-gray-200 dark:border-gray-700 text-center">
<div class="w-12 h-12 mx-auto mb-3 bg-secondary-100 dark:bg-secondary-900 rounded-full flex items-center justify-center">
<i data-feather="clock" class="w-6 h-6 text-secondary-600"></i>
</div>
<h3 class="text-2xl font-bold mb-1" id="total-focus-time">0h 0m</h3>
<p class="text-sm text-gray-600 dark:text-gray-400">Total Focus Time</p>
</div>
<div class="bg-white dark:bg-gray-800 rounded-2xl p-6 shadow-lg border border-gray-200 dark:border-gray-700 text-center">
<div class="w-12 h-12 mx-auto mb-3 bg-orange-100 dark:bg-orange-900 rounded-full flex items-center justify-center">
<i data-feather="calendar" class="w-6 h-6 text-orange-600"></i>
</div>
<h3 class="text-2xl font-bold mb-1" id="current-streak">5</h3>
<p class="text-sm text-gray-600 dark:text-gray-400">Day Streak</p>
</div>
</div>
<!-- Quote -->
<div class="mt-12 text-center max-w-2xl mx-auto">
<blockquote class="text-xl italic text-gray-600 dark:text-gray-400">
"Focus on being productive instead of busy."
</blockquote>
<cite class="block mt-2 text-sm text-gray-500 not-italic">— Tim Ferriss</cite>
</div>
</main>
<flow-footer></flow-footer>
<script src="components/navbar.js"></script>
<script src="components/footer.js"></script>
<script src="script.js"></script>
<script>
feather.replace();
// Focus page specific initialization
document.addEventListener('DOMContentLoaded', () => {
loadTimerStats();
});
</script>
</body>
</html> |