-
Notifications
You must be signed in to change notification settings - Fork 49
Expand file tree
/
Copy pathEasy-Online-Counter.html
More file actions
286 lines (244 loc) · 8.53 KB
/
Easy-Online-Counter.html
File metadata and controls
286 lines (244 loc) · 8.53 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
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<title>Easy Online Counter - Simple, Free Web Counter Tool</title>
<meta name="description" content="Easy Online Counter is a free, mobile-optimized digital tally counter. Count anything instantly with a beautiful modern design and smooth animations." />
<style>
* {
box-sizing: border-box;
margin: 0;
padding: 0;
user-select: none;
}
html, body {
height: 100%;
font-family: 'Segoe UI', sans-serif;
background: linear-gradient(135deg, #667eea, #764ba2);
overflow-x: hidden;
overflow-y: auto;
touch-action: manipulation;
}
.app {
height: 100vh;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.counter-display {
flex: 1;
display: flex;
justify-content: center;
align-items: center;
backdrop-filter: blur(12px);
background: rgba(255, 255, 255, 0.1);
color: #fff;
font-weight: bold;
font-size: clamp(4rem, 20vw, 10rem);
text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.counter-display.animate {
transform: scale(1.2);
}
.controls {
display: flex;
height: 50%;
}
.btn {
flex: 1;
font-size: clamp(2rem, 5vw, 4rem);
display: flex;
justify-content: center;
align-items: center;
border: none;
outline: none;
background: rgba(255, 255, 255, 0.15);
backdrop-filter: blur(10px);
color: white;
font-weight: bold;
position: relative;
overflow: hidden;
cursor: pointer;
transition: transform 0.15s ease-in-out, background 0.3s ease;
}
.btn:active {
transform: scale(0.96);
}
.btn.plus {
background: rgba(0, 255, 128, 0.15);
}
.btn.minus {
background: rgba(255, 0, 64, 0.15);
}
.btn.reset {
background: rgba(255, 255, 255, 0.08);
font-size: 1.2rem;
height: 3rem;
margin: 0.5rem auto;
padding: 0 2rem;
border-radius: 999px;
width: fit-content;
}
.ripple {
position: absolute;
border-radius: 50%;
background: rgba(255, 255, 255, 0.4);
transform: scale(0);
animation: ripple 0.6s linear;
pointer-events: none;
}
@keyframes ripple {
to {
transform: scale(4);
opacity: 0;
}
}
@media (orientation: landscape) {
.controls {
height: 40%;
}
}
footer {
padding: 2rem 1rem;
background: #f5f5f5;
color: #333;
font-size: 1rem;
line-height: 1.6;
}
footer h2 {
margin-top: 2rem;
margin-bottom: 1rem;
font-size: 1.5rem;
}
footer h3 {
margin-top: 1.2rem;
font-size: 1.2rem;
}
footer p, footer li {
margin-bottom: 0.8rem;
}
footer ul {
list-style-type: disc;
margin-left: 1.5rem;
}
</style>
</head>
<body>
<div class="app">
<div class="counter-display" id="counter">0</div>
<div class="controls">
<button class="btn minus" id="minus">-</button>
<button class="btn plus" id="plus">+</button>
</div>
<button class="btn reset" id="reset">Reset</button>
</div>
<footer>
<h2>Easy Online Counter - Free, Instant Tally Counter</h2>
<p>
Welcome to <strong>Easy Online Counter</strong> — your free, fast, and user-friendly digital tally counter tool. Whether you're counting reps at the gym, keeping score in a game, or tracking event attendance, this simple web app helps you stay organized with just a tap.
</p>
<p>
Designed for mobile and desktop use, our online counter is touch-optimized, highly responsive, and completely free to use. No login, no setup — just launch and count.
</p>
<h2>Frequently Asked Questions (FAQ)</h2>
<h3>1. How do I use the Easy Online Counter?</h3>
<p>Simply tap the <strong>+</strong> or <strong>−</strong> buttons to increment or decrement the counter. You can also use keyboard keys (+, −, arrow keys) or reset with the reset button.</p>
<h3>2. Will the counter remember my value?</h3>
<p>Yes! Your current count is saved automatically in your browser using localStorage and restored on your next visit.</p>
<h3>3. Can I use this counter on my phone?</h3>
<p>Absolutely. The app is fully optimized for mobile devices with large touch targets and smooth animations.</p>
<h3>4. What are some uses for this tool?</h3>
<ul>
<li><strong>Workout tracking:</strong> Count sets, reps, or rounds in a workout.</li>
<li><strong>Inventory management:</strong> Tally stock items quickly.</li>
<li><strong>Event headcounts:</strong> Track people entering a venue.</li>
<li><strong>Classroom participation:</strong> Teachers can count student responses.</li>
<li><strong>Game scoring:</strong> Keep score for simple games or team competitions.</li>
<li><strong>Habit building:</strong> Count streaks or progress in a challenge.</li>
<li><strong>Prayer/chant counting:</strong> A quiet tool for meditation or repetition.</li>
<li><strong>Queue management:</strong> Tally customers or clients served.</li>
<li><strong>Research studies:</strong> Track behavior counts or occurrences.</li>
<li><strong>Presentation timing:</strong> Count down activities or sections.</li>
</ul>
<h3>5. Is it free to use?</h3>
<p>Yes, 100% free. No ads, no account, no data collection.</p>
<h3>6. Can I use it offline?</h3>
<p>Currently, the app requires internet for initial load. Future updates may support offline use.</p>
<h3>7. Does this counter work on tablets?</h3>
<p>Yes! It's designed to scale beautifully on phones, tablets, and desktops.</p>
<h3>8. Can I reset the counter?</h3>
<p>Yes. Use the Reset button to clear the count back to zero instantly.</p>
<h3>9. Will it count negative numbers?</h3>
<p>Yes, you can decrement below zero with the minus button or arrow keys.</p>
<h3>10. Is my data secure?</h3>
<p>Your count is stored locally in your browser and never shared or uploaded.</p>
</footer>
<script>
const counterEl = document.getElementById('counter');
const plusBtn = document.getElementById('plus');
const minusBtn = document.getElementById('minus');
const resetBtn = document.getElementById('reset');
let count = 0;
function loadCounter() {
const saved = localStorage.getItem('easyCounterValue');
count = saved ? parseInt(saved, 10) : 0;
counterEl.textContent = count;
}
function saveCounter() {
localStorage.setItem('easyCounterValue', count);
}
function updateCounter(value) {
count += value;
counterEl.textContent = count;
counterEl.classList.add('animate');
saveCounter();
setTimeout(() => counterEl.classList.remove('animate'), 200);
}
function createRipple(e, button) {
const ripple = document.createElement('span');
const rect = button.getBoundingClientRect();
const size = Math.max(button.clientWidth, button.clientHeight);
ripple.className = 'ripple';
ripple.style.width = ripple.style.height = size + 'px';
ripple.style.left = (e.clientX - rect.left - size / 2) + 'px';
ripple.style.top = (e.clientY - rect.top - size / 2) + 'px';
button.appendChild(ripple);
setTimeout(() => ripple.remove(), 600);
}
plusBtn.addEventListener('click', (e) => {
updateCounter(1);
createRipple(e, plusBtn);
});
minusBtn.addEventListener('click', (e) => {
updateCounter(-1);
createRipple(e, minusBtn);
});
resetBtn.addEventListener('click', () => {
count = 0;
counterEl.textContent = count;
saveCounter();
counterEl.classList.add('animate');
setTimeout(() => counterEl.classList.remove('animate'), 200);
});
document.addEventListener('keydown', (e) => {
if (e.key === '+' || e.key === '=' || e.key === 'ArrowUp') {
updateCounter(1);
} else if (e.key === '-' || e.key === 'ArrowDown') {
updateCounter(-1);
}
});
let lastTouch = 0;
document.addEventListener('touchend', (e) => {
const now = new Date().getTime();
if (now - lastTouch <= 300) {
e.preventDefault();
}
lastTouch = now;
}, { passive: false });
// Initialize
loadCounter();
</script>
</body>
</html>