-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
80 lines (75 loc) · 3 KB
/
index.html
File metadata and controls
80 lines (75 loc) · 3 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Counter API Demo</title>
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css">
</head>
<body>
<div class="container">
<header>
<h1><i class="fas fa-calculator"></i> Counter API Demo</h1>
<p class="subtitle">A simple, powerful API for tracking numeric counters across your applications</p>
</header>
<div class="theme-switch">
<button id="themeToggle" aria-label="Toggle theme">
<i class="fas fa-sun"></i>
<i class="fas fa-moon"></i>
</button>
</div>
<div class="features">
<div class="feature-card">
<i class="fas fa-plus-circle"></i>
<h3>Create & Increment</h3>
<p>Create new counters or increment existing ones</p>
</div>
<div class="feature-card">
<i class="fas fa-eye"></i>
<h3>Track Values</h3>
<p>Monitor your counter values in real-time</p>
</div>
<div class="feature-card">
<i class="fas fa-edit"></i>
<h3>Custom Values</h3>
<p>Set specific values for your counters</p>
</div>
</div>
<div class="demo-container">
<h2>Try it yourself!</h2>
<div class="input-group">
<div class="input-wrapper">
<label for="namespace">Namespace</label>
<input type="text" id="namespace" placeholder="e.g., myapp">
</div>
<div class="input-wrapper">
<label for="key">Key</label>
<input type="text" id="key" placeholder="e.g., pageviews">
</div>
<div class="input-wrapper">
<label for="newValue">New Value (optional)</label>
<input type="number" id="newValue" placeholder="Set specific value">
</div>
</div>
<div class="button-group">
<button onclick="createOrIncrementCounter()" class="btn primary">
<i class="fas fa-plus"></i> Create/Increment
</button>
<button onclick="getCounterValue()" class="btn secondary">
<i class="fas fa-eye"></i> Get Value
</button>
<button onclick="setCounterValue()" class="btn tertiary">
<i class="fas fa-edit"></i> Set Value
</button>
</div>
<div id="result" class="result-container">
<div class="result-content">
Ready to start counting!
</div>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>