-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathzen.html
More file actions
152 lines (131 loc) · 4.25 KB
/
zen.html
File metadata and controls
152 lines (131 loc) · 4.25 KB
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Zen Mode - 10000Timer</title>
<style>
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap');
body {
margin: 0;
background-color: #0a0a0a;
color: #fff;
font-family: 'Inter', sans-serif;
overflow: hidden;
user-select: none;
}
#zen-screen {
position: fixed;
inset: 0;
background: #0a0a0a;
}
#ascii-bg {
position: fixed;
inset: 0;
font-size: 12px;
font-family: monospace;
line-height: 1;
white-space: pre;
overflow: hidden;
color: #666;
display: flex;
align-items: center;
justify-content: center;
z-index: 1;
}
#ascii-bg pre {
margin: 0;
transform: translateY(60px);
}
#timer-display {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size: 5rem;
font-family: monospace;
color: #fff;
text-shadow: 0 0 20px rgba(0, 0, 0, 0.8), 0 0 10px rgba(255, 255, 255, 0.2);
cursor: pointer;
z-index: 10;
}
#exit-btn {
position: fixed;
bottom: 2rem;
left: 50%;
transform: translateX(-50%);
background: rgba(0, 0, 0, 0.3);
border: 1px solid rgba(255, 255, 255, 0.1);
color: #aaa;
padding: 0.5rem 1rem;
border-radius: 20px;
font-size: 0.8rem;
cursor: pointer;
z-index: 10;
transition: all 0.2s;
}
#exit-btn:hover {
color: #fff;
border-color: rgba(255, 255, 255, 0.3);
background: rgba(0, 0, 0, 0.5);
}
/* Bottom Right Controls */
#theme-switcher {
position: fixed;
bottom: 2rem;
right: 2rem;
z-index: 10;
display: flex;
gap: 0.5rem;
background: rgba(0,0,0,0.5);
padding: 0.4rem;
border-radius: 12px;
border: 1px solid rgba(255,255,255,0.1);
}
.theme-btn {
background: transparent;
color: #888;
border: none;
padding: 0.4rem 0.8rem;
border-radius: 8px;
cursor: pointer;
font-family: 'Inter', sans-serif;
font-size: 0.85rem;
transition: all 0.2s;
}
.theme-btn:hover {
color: #fff;
}
.theme-btn.active {
background: rgba(255,255,255,0.1);
color: #fff;
}
</style>
</head>
<body>
<div id="zen-screen">
<div id="ascii-bg"></div>
<div id="timer-display" onclick="ZenTimer.togglePauseResume()">25:00</div>
<button id="exit-btn" onclick="ZenTimer.exitZen()">Exit Zen</button>
<div id="theme-switcher">
<button id="btn-fire" class="theme-btn active" onclick="switchTheme('fire')">Fire</button>
<button id="btn-rain" class="theme-btn" onclick="switchTheme('rain')">Rain</button>
</div>
</div>
<script src="src/asciiPlayer.js"></script>
<script src="src/zenTimer.js"></script>
<script>
const urlParams = new URLSearchParams(window.location.search);
const passedTime = urlParams.get('timeLeft');
const isPlaying = urlParams.get('isPlaying') === 'true';
let seconds = passedTime ? parseInt(passedTime, 10) : 25 * 60;
// Start directly in fire theme with state passed from main app
ZenTimer.startZen('fire', seconds, isPlaying);
function switchTheme(theme) {
document.getElementById('btn-fire').classList.toggle('active', theme === 'fire');
document.getElementById('btn-rain').classList.toggle('active', theme === 'rain');
ZenTimer.changeTheme(theme);
}
</script>
</body>
</html>