-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy paththeme-test.html
More file actions
212 lines (187 loc) · 6.68 KB
/
theme-test.html
File metadata and controls
212 lines (187 loc) · 6.68 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>FocusVerse - Theme Test</title>
<style>
:root {
--primary-color: #4a89dc;
--secondary-color: #5d9cec;
--accent-color: #ff9800;
--background-color: #f5f7fa;
--text-color: #333;
--container-bg: rgba(74, 137, 220, 0.15);
--button-bg: #4a89dc;
--button-hover: #357bd8;
--button-text: white;
--quote-bg: rgba(234, 244, 255, 0.7);
--distraction-color: #ff5722;
}
/* Energetic Mode */
[data-theme="energetic"] {
--primary-color: #ff6b35;
--secondary-color: #ff8c42;
--accent-color: #ffcc00;
--background-color: #fff6e9;
--text-color: #5a3e36;
--container-bg: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(255, 204, 0, 0.15));
--button-bg: #ff6b35;
--button-hover: #e85a2a;
--button-text: white;
--quote-bg: rgba(255, 237, 219, 0.8);
--distraction-color: #e64a19;
}
/* Dark Mode */
[data-theme="dark"] {
--primary-color: #6b7a8f;
--secondary-color: #7d8da6;
--accent-color: #f4c20d;
--background-color: #1a1a2e;
--text-color: #e6e6e6;
--container-bg: linear-gradient(135deg, rgba(45, 45, 70, 0.8), rgba(25, 25, 40, 0.75));
--button-bg: #6b7a8f;
--button-hover: #5d6b80;
--button-text: white;
--quote-bg: rgba(45, 45, 70, 0.7);
--distraction-color: #ff8a65;
}
/* Nature Mode */
[data-theme="nature"] {
--primary-color: #4caf50;
--secondary-color: #66bb6a;
--accent-color: #8bc34a;
--background-color: #e8f5e9;
--text-color: #2e4c2e;
--container-bg: linear-gradient(135deg, rgba(66, 139, 87, 0.2), rgba(200, 230, 201, 0.15));
--button-bg: #4caf50;
--button-hover: #43a047;
--button-text: white;
--quote-bg: rgba(232, 245, 233, 0.8);
--distraction-color: #ff7043;
}
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
margin: 0;
padding: 0;
min-height: 100vh;
display: flex;
justify-content: center;
align-items: center;
color: var(--text-color);
background: var(--background-color);
transition: background-color 0.5s ease;
}
.container {
text-align: center;
background: var(--container-bg);
padding: 2rem;
border-radius: 15px;
box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
max-width: 500px;
width: 90%;
backdrop-filter: blur(5px);
transition: all 0.3s ease;
}
.focus-title {
color: var(--primary-color);
margin-bottom: 0.5rem;
font-size: 2.5rem;
font-weight: bold;
}
p {
color: var(--secondary-color);
margin-top: 0;
margin-bottom: 1.5rem;
}
.theme-selector {
margin: 15px 0;
}
.theme-buttons {
display: flex;
justify-content: center;
gap: 8px;
flex-wrap: wrap;
margin-top: 10px;
}
.theme-btn {
padding: 8px 12px;
border-radius: 20px;
font-size: 0.85rem;
border: 2px solid transparent;
cursor: pointer;
transition: all 0.3s ease;
}
.theme-btn.active {
border: 2px solid var(--accent-color);
transform: scale(1.05);
}
.theme-calm {
background: linear-gradient(to right, #4a89dc, #5d9cec);
color: white;
}
.theme-energetic {
background: linear-gradient(to right, #ff6b35, #ff8c42);
color: white;
}
.theme-dark {
background: linear-gradient(to right, #3a3a6a, #4a4a7a);
color: white;
}
.theme-nature {
background: linear-gradient(to right, #4caf50, #66bb6a);
color: white;
}
/* Ensure title is bright white in dark mode */
[data-theme="dark"] .focus-title {
color: #ffffff;
}
.test-content {
margin: 20px 0;
padding: 15px;
background: var(--quote-bg);
border-radius: 8px;
color: var(--text-color);
}
</style>
</head>
<body>
<div class="container">
<h1 class="focus-title">FocusVerse</h1>
<p>Your Peaceful Portal to Productivity!</p>
<div class="theme-selector">
<h3>Choose Your Focus Zone:</h3>
<div class="theme-buttons">
<button class="theme-btn theme-calm active" onclick="changeTheme('calm')">Calm Mode</button>
<button class="theme-btn theme-energetic" onclick="changeTheme('energetic')">Energetic Mode</button>
<button class="theme-btn theme-dark" onclick="changeTheme('dark')">Dark Mode</button>
<button class="theme-btn theme-nature" onclick="changeTheme('nature')">Nature Mode</button>
</div>
</div>
<div class="test-content">
<h3>Theme Test</h3>
<p>This content should change colors when you switch themes.</p>
<p>Current theme: <span id="currentTheme">calm</span></p>
</div>
</div>
<script>
function changeTheme(themeName) {
document.body.setAttribute('data-theme', themeName);
// Update active button state
document.querySelectorAll('.theme-btn').forEach(btn => {
btn.classList.remove('active');
});
document.querySelector(`.theme-${themeName}`).classList.add('active');
// Update current theme display
document.getElementById('currentTheme').textContent = themeName;
// Save theme preference to localStorage
localStorage.setItem('focusverse-theme', themeName);
}
// Load saved theme on page load
document.addEventListener('DOMContentLoaded', function() {
const savedTheme = localStorage.getItem('focusverse-theme') || 'calm';
changeTheme(savedTheme);
});
</script>
</body>
</html>