claude-code-cost 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/commands/release.md +54 -0
- package/.github/workflows/pages.yml +39 -0
- package/.husky/pre-commit +1 -0
- package/CLAUDE.md +42 -0
- package/LICENSE +21 -0
- package/PLAN-CONTEXT.md +83 -0
- package/README.md +102 -0
- package/assets/overview-dark.png +0 -0
- package/assets/overview-light.png +0 -0
- package/assets/projects-dark.png +0 -0
- package/assets/projects-light.png +0 -0
- package/assets/session-dark.png +0 -0
- package/assets/sesssion-light.png +0 -0
- package/biome.json +33 -0
- package/docs/assets/overview-dark.png +0 -0
- package/docs/assets/overview-light.png +0 -0
- package/docs/assets/projects-dark.png +0 -0
- package/docs/assets/projects-light.png +0 -0
- package/docs/assets/session-dark.png +0 -0
- package/docs/assets/sesssion-light.png +0 -0
- package/docs/index.html +896 -0
- package/package.json +25 -0
- package/public/app.js +1213 -0
- package/public/icons/icon-svg.svg +7 -0
- package/public/index.html +112 -0
- package/public/manifest.json +14 -0
- package/public/style.css +809 -0
- package/public/sw.js +47 -0
- package/server.js +734 -0
package/docs/index.html
ADDED
|
@@ -0,0 +1,896 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="UTF-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>Claude Code Cost — Know what Claude Code costs you</title>
|
|
7
|
+
<meta name="description" content="A cost visualization dashboard for Claude Code. Track spending per day, per project, per session with dynamic pricing and drill-down views.">
|
|
8
|
+
<meta property="og:title" content="Claude Code Cost">
|
|
9
|
+
<meta property="og:description" content="Know what Claude Code costs you — per day, per project, per session.">
|
|
10
|
+
<meta property="og:type" content="website">
|
|
11
|
+
<meta property="og:url" content="https://nikiforovall.blog/claude-code-cost/">
|
|
12
|
+
<meta property="og:image" content="https://raw.githubusercontent.com/NikiforovAll/claude-code-cost/main/assets/sesssion-light.png">
|
|
13
|
+
<meta name="twitter:card" content="summary_large_image">
|
|
14
|
+
<link rel="icon" type="image/svg+xml" href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='6' fill='%231a1a1a'/%3E%3Cpath d='M16 6v20M20 10h-5.5a3.5 3.5 0 000 7h3a3.5 3.5 0 010 7H12' stroke='%23e8927c' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E">
|
|
15
|
+
<link rel="preconnect" href="https://fonts.googleapis.com">
|
|
16
|
+
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
|
17
|
+
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=Playfair+Display:wght@400;500;600;700&display=swap" rel="stylesheet">
|
|
18
|
+
<style>
|
|
19
|
+
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
20
|
+
|
|
21
|
+
:root {
|
|
22
|
+
--bg: #faf9f7;
|
|
23
|
+
--bg-alt: #f3f1ee;
|
|
24
|
+
--bg-dark: #1a1a1a;
|
|
25
|
+
--text: #2a2a2a;
|
|
26
|
+
--text-secondary: #5a5a5a;
|
|
27
|
+
--text-muted: #8a8a8a;
|
|
28
|
+
--accent: #E86F33;
|
|
29
|
+
--accent-light: #e8927c;
|
|
30
|
+
--accent-dim: rgba(232, 111, 51, 0.1);
|
|
31
|
+
--accent-glow: rgba(232, 111, 51, 0.25);
|
|
32
|
+
--border: #e0ddd8;
|
|
33
|
+
--mono: 'IBM Plex Mono', monospace;
|
|
34
|
+
--serif: 'Playfair Display', serif;
|
|
35
|
+
--max-w: 1120px;
|
|
36
|
+
--section-gap: 120px;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
html { scroll-behavior: smooth; }
|
|
40
|
+
|
|
41
|
+
body {
|
|
42
|
+
font-family: var(--mono);
|
|
43
|
+
font-size: 15px;
|
|
44
|
+
background: var(--bg);
|
|
45
|
+
color: var(--text);
|
|
46
|
+
line-height: 1.65;
|
|
47
|
+
-webkit-font-smoothing: antialiased;
|
|
48
|
+
overflow-x: hidden;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
body::after {
|
|
52
|
+
content: '';
|
|
53
|
+
position: fixed;
|
|
54
|
+
inset: 0;
|
|
55
|
+
pointer-events: none;
|
|
56
|
+
opacity: 0.03;
|
|
57
|
+
background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
|
|
58
|
+
background-size: 256px 256px;
|
|
59
|
+
z-index: 9999;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 32px; }
|
|
63
|
+
|
|
64
|
+
/* -- NAV -- */
|
|
65
|
+
nav {
|
|
66
|
+
position: fixed;
|
|
67
|
+
top: 0;
|
|
68
|
+
left: 0;
|
|
69
|
+
right: 0;
|
|
70
|
+
z-index: 100;
|
|
71
|
+
background: rgba(250, 249, 247, 0.85);
|
|
72
|
+
backdrop-filter: blur(12px);
|
|
73
|
+
-webkit-backdrop-filter: blur(12px);
|
|
74
|
+
border-bottom: 1px solid var(--border);
|
|
75
|
+
transition: box-shadow 0.3s;
|
|
76
|
+
}
|
|
77
|
+
nav.scrolled { box-shadow: 0 1px 8px rgba(0,0,0,0.06); }
|
|
78
|
+
nav .container {
|
|
79
|
+
display: flex;
|
|
80
|
+
align-items: center;
|
|
81
|
+
justify-content: space-between;
|
|
82
|
+
height: 60px;
|
|
83
|
+
}
|
|
84
|
+
.nav-brand {
|
|
85
|
+
display: flex;
|
|
86
|
+
align-items: center;
|
|
87
|
+
gap: 10px;
|
|
88
|
+
text-decoration: none;
|
|
89
|
+
color: var(--text);
|
|
90
|
+
}
|
|
91
|
+
.nav-brand svg { width: 28px; height: 28px; }
|
|
92
|
+
.nav-brand span {
|
|
93
|
+
font-family: var(--mono);
|
|
94
|
+
font-weight: 600;
|
|
95
|
+
font-size: 14px;
|
|
96
|
+
letter-spacing: -0.02em;
|
|
97
|
+
}
|
|
98
|
+
.nav-links { display: flex; align-items: center; gap: 24px; }
|
|
99
|
+
.nav-links a {
|
|
100
|
+
font-size: 13px;
|
|
101
|
+
color: var(--text-secondary);
|
|
102
|
+
text-decoration: none;
|
|
103
|
+
transition: color 0.2s;
|
|
104
|
+
}
|
|
105
|
+
.nav-links a:hover { color: var(--accent); }
|
|
106
|
+
.nav-gh {
|
|
107
|
+
display: flex;
|
|
108
|
+
align-items: center;
|
|
109
|
+
gap: 6px;
|
|
110
|
+
padding: 6px 14px;
|
|
111
|
+
border: 1px solid var(--border);
|
|
112
|
+
border-radius: 6px;
|
|
113
|
+
font-size: 13px;
|
|
114
|
+
color: var(--text);
|
|
115
|
+
text-decoration: none;
|
|
116
|
+
transition: border-color 0.2s, background 0.2s;
|
|
117
|
+
}
|
|
118
|
+
.nav-gh:hover { border-color: var(--accent); background: var(--accent-dim); }
|
|
119
|
+
.nav-gh svg { width: 16px; height: 16px; }
|
|
120
|
+
|
|
121
|
+
/* -- HERO -- */
|
|
122
|
+
.hero {
|
|
123
|
+
padding-top: 140px;
|
|
124
|
+
padding-bottom: var(--section-gap);
|
|
125
|
+
text-align: center;
|
|
126
|
+
}
|
|
127
|
+
.hero-badge {
|
|
128
|
+
display: inline-flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
gap: 8px;
|
|
131
|
+
padding: 6px 16px;
|
|
132
|
+
background: var(--accent-dim);
|
|
133
|
+
border: 1px solid rgba(232, 111, 51, 0.2);
|
|
134
|
+
border-radius: 100px;
|
|
135
|
+
font-size: 12px;
|
|
136
|
+
color: var(--accent);
|
|
137
|
+
font-weight: 500;
|
|
138
|
+
margin-bottom: 32px;
|
|
139
|
+
letter-spacing: 0.02em;
|
|
140
|
+
}
|
|
141
|
+
.hero-badge .dot {
|
|
142
|
+
width: 6px;
|
|
143
|
+
height: 6px;
|
|
144
|
+
border-radius: 50%;
|
|
145
|
+
background: var(--accent);
|
|
146
|
+
animation: pulse 2s ease-in-out infinite;
|
|
147
|
+
}
|
|
148
|
+
@keyframes pulse {
|
|
149
|
+
0%, 100% { opacity: 1; }
|
|
150
|
+
50% { opacity: 0.3; }
|
|
151
|
+
}
|
|
152
|
+
.hero h1 {
|
|
153
|
+
font-family: var(--serif);
|
|
154
|
+
font-size: clamp(40px, 6vw, 68px);
|
|
155
|
+
font-weight: 700;
|
|
156
|
+
line-height: 1.1;
|
|
157
|
+
letter-spacing: -0.03em;
|
|
158
|
+
color: var(--bg-dark);
|
|
159
|
+
margin-bottom: 24px;
|
|
160
|
+
}
|
|
161
|
+
.hero h1 em {
|
|
162
|
+
font-style: italic;
|
|
163
|
+
color: var(--accent);
|
|
164
|
+
}
|
|
165
|
+
.hero-sub {
|
|
166
|
+
font-size: 16px;
|
|
167
|
+
color: var(--text-secondary);
|
|
168
|
+
max-width: 560px;
|
|
169
|
+
margin: 0 auto 40px;
|
|
170
|
+
line-height: 1.7;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
/* Install block */
|
|
174
|
+
.install-block {
|
|
175
|
+
display: inline-flex;
|
|
176
|
+
align-items: center;
|
|
177
|
+
gap: 0;
|
|
178
|
+
background: var(--bg-dark);
|
|
179
|
+
border-radius: 10px;
|
|
180
|
+
overflow: hidden;
|
|
181
|
+
margin-bottom: 56px;
|
|
182
|
+
box-shadow: 0 4px 24px rgba(0,0,0,0.12), 0 0 0 1px rgba(255,255,255,0.05) inset;
|
|
183
|
+
}
|
|
184
|
+
.install-block code {
|
|
185
|
+
display: block;
|
|
186
|
+
padding: 14px 20px 14px 24px;
|
|
187
|
+
font-family: var(--mono);
|
|
188
|
+
font-size: 14px;
|
|
189
|
+
color: #f0f1f3;
|
|
190
|
+
white-space: nowrap;
|
|
191
|
+
letter-spacing: -0.01em;
|
|
192
|
+
}
|
|
193
|
+
.install-block code .prompt { color: var(--accent-light); }
|
|
194
|
+
.install-copy {
|
|
195
|
+
padding: 14px 18px;
|
|
196
|
+
background: none;
|
|
197
|
+
border: none;
|
|
198
|
+
border-left: 1px solid #333;
|
|
199
|
+
color: #888;
|
|
200
|
+
cursor: pointer;
|
|
201
|
+
transition: color 0.2s, background 0.2s;
|
|
202
|
+
display: flex;
|
|
203
|
+
align-items: center;
|
|
204
|
+
}
|
|
205
|
+
.install-copy:hover { color: #fff; background: rgba(255,255,255,0.05); }
|
|
206
|
+
.install-copy svg { width: 16px; height: 16px; }
|
|
207
|
+
.install-copy.copied { color: #3ecf8e; }
|
|
208
|
+
|
|
209
|
+
/* Hero screenshot */
|
|
210
|
+
.hero-screenshot {
|
|
211
|
+
max-width: 960px;
|
|
212
|
+
margin: 0 auto;
|
|
213
|
+
border-radius: 12px;
|
|
214
|
+
overflow: hidden;
|
|
215
|
+
box-shadow:
|
|
216
|
+
0 8px 40px rgba(0,0,0,0.12),
|
|
217
|
+
0 2px 8px rgba(0,0,0,0.06);
|
|
218
|
+
transform: perspective(1200px) rotateX(2deg);
|
|
219
|
+
transition: transform 0.4s ease;
|
|
220
|
+
}
|
|
221
|
+
.hero-screenshot:hover { transform: perspective(1200px) rotateX(0deg); }
|
|
222
|
+
.hero-screenshot { cursor: pointer; }
|
|
223
|
+
.hero-screenshot img {
|
|
224
|
+
width: 100%;
|
|
225
|
+
display: block;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
/* -- FEATURES -- */
|
|
229
|
+
.features { padding-bottom: var(--section-gap); }
|
|
230
|
+
.section-label {
|
|
231
|
+
font-size: 12px;
|
|
232
|
+
font-weight: 600;
|
|
233
|
+
text-transform: uppercase;
|
|
234
|
+
letter-spacing: 0.1em;
|
|
235
|
+
color: var(--accent);
|
|
236
|
+
margin-bottom: 12px;
|
|
237
|
+
}
|
|
238
|
+
.section-title {
|
|
239
|
+
font-family: var(--serif);
|
|
240
|
+
font-size: clamp(28px, 4vw, 40px);
|
|
241
|
+
font-weight: 600;
|
|
242
|
+
color: var(--bg-dark);
|
|
243
|
+
letter-spacing: -0.02em;
|
|
244
|
+
margin-bottom: 56px;
|
|
245
|
+
line-height: 1.2;
|
|
246
|
+
}
|
|
247
|
+
.features-grid {
|
|
248
|
+
display: grid;
|
|
249
|
+
grid-template-columns: repeat(3, 1fr);
|
|
250
|
+
gap: 24px;
|
|
251
|
+
}
|
|
252
|
+
.feature-card {
|
|
253
|
+
padding: 28px;
|
|
254
|
+
background: var(--bg);
|
|
255
|
+
border: 1px solid var(--border);
|
|
256
|
+
border-radius: 10px;
|
|
257
|
+
cursor: default;
|
|
258
|
+
transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
|
|
259
|
+
}
|
|
260
|
+
.feature-card:hover {
|
|
261
|
+
border-color: var(--accent-light);
|
|
262
|
+
box-shadow: 0 4px 20px var(--accent-glow);
|
|
263
|
+
transform: translateY(-2px);
|
|
264
|
+
}
|
|
265
|
+
.feature-icon {
|
|
266
|
+
width: 40px;
|
|
267
|
+
height: 40px;
|
|
268
|
+
display: flex;
|
|
269
|
+
align-items: center;
|
|
270
|
+
justify-content: center;
|
|
271
|
+
background: var(--accent-dim);
|
|
272
|
+
border-radius: 8px;
|
|
273
|
+
margin-bottom: 16px;
|
|
274
|
+
color: var(--accent);
|
|
275
|
+
font-size: 18px;
|
|
276
|
+
}
|
|
277
|
+
.feature-card h3 {
|
|
278
|
+
font-family: var(--mono);
|
|
279
|
+
font-size: 14px;
|
|
280
|
+
font-weight: 600;
|
|
281
|
+
margin-bottom: 8px;
|
|
282
|
+
color: var(--bg-dark);
|
|
283
|
+
}
|
|
284
|
+
.feature-card p {
|
|
285
|
+
font-size: 13px;
|
|
286
|
+
color: var(--text-secondary);
|
|
287
|
+
line-height: 1.6;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/* -- HOW IT WORKS -- */
|
|
291
|
+
.how-it-works {
|
|
292
|
+
padding-bottom: var(--section-gap);
|
|
293
|
+
}
|
|
294
|
+
.steps {
|
|
295
|
+
display: grid;
|
|
296
|
+
grid-template-columns: repeat(3, 1fr);
|
|
297
|
+
gap: 32px;
|
|
298
|
+
position: relative;
|
|
299
|
+
}
|
|
300
|
+
.steps::before {
|
|
301
|
+
content: '';
|
|
302
|
+
position: absolute;
|
|
303
|
+
top: 32px;
|
|
304
|
+
left: calc(33.33% / 2 + 32px);
|
|
305
|
+
right: calc(33.33% / 2 + 32px);
|
|
306
|
+
height: 2px;
|
|
307
|
+
background: var(--border);
|
|
308
|
+
}
|
|
309
|
+
.step {
|
|
310
|
+
text-align: center;
|
|
311
|
+
position: relative;
|
|
312
|
+
}
|
|
313
|
+
.step-num {
|
|
314
|
+
width: 64px;
|
|
315
|
+
height: 64px;
|
|
316
|
+
border-radius: 50%;
|
|
317
|
+
display: flex;
|
|
318
|
+
align-items: center;
|
|
319
|
+
justify-content: center;
|
|
320
|
+
font-family: var(--serif);
|
|
321
|
+
font-size: 24px;
|
|
322
|
+
font-weight: 700;
|
|
323
|
+
color: var(--accent);
|
|
324
|
+
background: var(--bg);
|
|
325
|
+
border: 2px solid var(--border);
|
|
326
|
+
margin: 0 auto 20px;
|
|
327
|
+
position: relative;
|
|
328
|
+
z-index: 1;
|
|
329
|
+
transition: border-color 0.3s, background 0.3s;
|
|
330
|
+
}
|
|
331
|
+
.step:hover .step-num {
|
|
332
|
+
border-color: var(--accent);
|
|
333
|
+
background: var(--accent-dim);
|
|
334
|
+
}
|
|
335
|
+
.step-code {
|
|
336
|
+
display: inline-block;
|
|
337
|
+
padding: 8px 16px;
|
|
338
|
+
background: var(--bg-dark);
|
|
339
|
+
border-radius: 6px;
|
|
340
|
+
font-size: 12px;
|
|
341
|
+
color: #f0f1f3;
|
|
342
|
+
margin-top: 12px;
|
|
343
|
+
font-family: var(--mono);
|
|
344
|
+
}
|
|
345
|
+
.step h3 {
|
|
346
|
+
font-family: var(--mono);
|
|
347
|
+
font-size: 14px;
|
|
348
|
+
font-weight: 600;
|
|
349
|
+
margin-bottom: 8px;
|
|
350
|
+
color: var(--bg-dark);
|
|
351
|
+
}
|
|
352
|
+
.step p {
|
|
353
|
+
font-size: 13px;
|
|
354
|
+
color: var(--text-secondary);
|
|
355
|
+
max-width: 260px;
|
|
356
|
+
margin: 0 auto;
|
|
357
|
+
line-height: 1.6;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
/* -- SCREENSHOTS -- */
|
|
361
|
+
.screenshots {
|
|
362
|
+
padding-bottom: var(--section-gap);
|
|
363
|
+
}
|
|
364
|
+
.screenshots-header {
|
|
365
|
+
display: flex;
|
|
366
|
+
align-items: flex-end;
|
|
367
|
+
justify-content: space-between;
|
|
368
|
+
margin-bottom: 40px;
|
|
369
|
+
}
|
|
370
|
+
.theme-toggle {
|
|
371
|
+
display: flex;
|
|
372
|
+
gap: 4px;
|
|
373
|
+
padding: 4px;
|
|
374
|
+
background: var(--bg-alt);
|
|
375
|
+
border-radius: 8px;
|
|
376
|
+
border: 1px solid var(--border);
|
|
377
|
+
}
|
|
378
|
+
.theme-toggle button {
|
|
379
|
+
padding: 8px 16px;
|
|
380
|
+
border: none;
|
|
381
|
+
border-radius: 6px;
|
|
382
|
+
font-family: var(--mono);
|
|
383
|
+
font-size: 12px;
|
|
384
|
+
font-weight: 500;
|
|
385
|
+
cursor: pointer;
|
|
386
|
+
background: transparent;
|
|
387
|
+
color: var(--text-muted);
|
|
388
|
+
transition: all 0.2s;
|
|
389
|
+
}
|
|
390
|
+
.theme-toggle button.active {
|
|
391
|
+
background: var(--bg);
|
|
392
|
+
color: var(--text);
|
|
393
|
+
box-shadow: 0 1px 4px rgba(0,0,0,0.08);
|
|
394
|
+
}
|
|
395
|
+
.ss-grid {
|
|
396
|
+
display: grid;
|
|
397
|
+
grid-template-columns: 1fr 1fr;
|
|
398
|
+
gap: 24px;
|
|
399
|
+
}
|
|
400
|
+
.screenshot-frame {
|
|
401
|
+
border-radius: 12px;
|
|
402
|
+
overflow: hidden;
|
|
403
|
+
border: 1px solid var(--border);
|
|
404
|
+
box-shadow: 0 8px 40px rgba(0,0,0,0.08);
|
|
405
|
+
cursor: pointer;
|
|
406
|
+
position: relative;
|
|
407
|
+
}
|
|
408
|
+
.screenshot-frame::after {
|
|
409
|
+
content: 'Click to enlarge';
|
|
410
|
+
position: absolute;
|
|
411
|
+
bottom: 12px;
|
|
412
|
+
right: 16px;
|
|
413
|
+
padding: 4px 10px;
|
|
414
|
+
background: rgba(0,0,0,0.6);
|
|
415
|
+
color: #fff;
|
|
416
|
+
font-size: 11px;
|
|
417
|
+
border-radius: 4px;
|
|
418
|
+
opacity: 0;
|
|
419
|
+
transition: opacity 0.2s;
|
|
420
|
+
pointer-events: none;
|
|
421
|
+
}
|
|
422
|
+
.screenshot-frame:hover::after { opacity: 1; }
|
|
423
|
+
.screenshot-frame img {
|
|
424
|
+
width: 100%;
|
|
425
|
+
display: block;
|
|
426
|
+
}
|
|
427
|
+
.screenshot-frame img.hidden { display: none; }
|
|
428
|
+
.ss-label {
|
|
429
|
+
font-size: 12px;
|
|
430
|
+
color: var(--text-muted);
|
|
431
|
+
text-align: center;
|
|
432
|
+
margin-top: 8px;
|
|
433
|
+
font-weight: 500;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/* -- LIGHTBOX -- */
|
|
437
|
+
.lightbox {
|
|
438
|
+
position: fixed;
|
|
439
|
+
inset: 0;
|
|
440
|
+
z-index: 200;
|
|
441
|
+
background: rgba(0, 0, 0, 0.85);
|
|
442
|
+
backdrop-filter: blur(8px);
|
|
443
|
+
display: flex;
|
|
444
|
+
align-items: center;
|
|
445
|
+
justify-content: center;
|
|
446
|
+
padding: 40px;
|
|
447
|
+
cursor: pointer;
|
|
448
|
+
opacity: 0;
|
|
449
|
+
visibility: hidden;
|
|
450
|
+
transition: opacity 0.3s, visibility 0.3s;
|
|
451
|
+
}
|
|
452
|
+
.lightbox.open {
|
|
453
|
+
opacity: 1;
|
|
454
|
+
visibility: visible;
|
|
455
|
+
}
|
|
456
|
+
.lightbox img {
|
|
457
|
+
max-width: 90vw;
|
|
458
|
+
max-height: 90vh;
|
|
459
|
+
border-radius: 12px;
|
|
460
|
+
box-shadow: 0 16px 64px rgba(0,0,0,0.6);
|
|
461
|
+
transform: scale(0.95);
|
|
462
|
+
transition: transform 0.3s ease;
|
|
463
|
+
}
|
|
464
|
+
.lightbox.open img { transform: scale(1); }
|
|
465
|
+
.lightbox-close {
|
|
466
|
+
position: absolute;
|
|
467
|
+
top: 24px;
|
|
468
|
+
right: 32px;
|
|
469
|
+
width: 40px;
|
|
470
|
+
height: 40px;
|
|
471
|
+
border: none;
|
|
472
|
+
background: rgba(255,255,255,0.1);
|
|
473
|
+
border-radius: 50%;
|
|
474
|
+
color: #fff;
|
|
475
|
+
font-size: 20px;
|
|
476
|
+
cursor: pointer;
|
|
477
|
+
display: flex;
|
|
478
|
+
align-items: center;
|
|
479
|
+
justify-content: center;
|
|
480
|
+
transition: background 0.2s;
|
|
481
|
+
}
|
|
482
|
+
.lightbox-close:hover { background: rgba(255,255,255,0.2); }
|
|
483
|
+
|
|
484
|
+
/* -- FAQ -- */
|
|
485
|
+
.faq { padding-bottom: var(--section-gap); }
|
|
486
|
+
.faq-list { max-width: 720px; }
|
|
487
|
+
.faq-item {
|
|
488
|
+
border-bottom: 1px solid var(--border);
|
|
489
|
+
}
|
|
490
|
+
.faq-item:first-child { border-top: 1px solid var(--border); }
|
|
491
|
+
.faq-q {
|
|
492
|
+
display: flex;
|
|
493
|
+
align-items: center;
|
|
494
|
+
justify-content: space-between;
|
|
495
|
+
width: 100%;
|
|
496
|
+
padding: 20px 0;
|
|
497
|
+
background: none;
|
|
498
|
+
border: none;
|
|
499
|
+
font-family: var(--mono);
|
|
500
|
+
font-size: 14px;
|
|
501
|
+
font-weight: 500;
|
|
502
|
+
color: var(--text);
|
|
503
|
+
cursor: pointer;
|
|
504
|
+
text-align: left;
|
|
505
|
+
gap: 16px;
|
|
506
|
+
}
|
|
507
|
+
.faq-q:hover { color: var(--accent); }
|
|
508
|
+
.faq-chevron {
|
|
509
|
+
width: 20px;
|
|
510
|
+
height: 20px;
|
|
511
|
+
flex-shrink: 0;
|
|
512
|
+
transition: transform 0.3s;
|
|
513
|
+
color: var(--text-muted);
|
|
514
|
+
}
|
|
515
|
+
.faq-item.open .faq-chevron { transform: rotate(180deg); }
|
|
516
|
+
.faq-a {
|
|
517
|
+
max-height: 0;
|
|
518
|
+
overflow: hidden;
|
|
519
|
+
transition: max-height 0.35s ease, padding 0.35s ease;
|
|
520
|
+
}
|
|
521
|
+
.faq-item.open .faq-a {
|
|
522
|
+
max-height: 200px;
|
|
523
|
+
padding-bottom: 20px;
|
|
524
|
+
}
|
|
525
|
+
.faq-a p {
|
|
526
|
+
font-size: 13px;
|
|
527
|
+
color: var(--text-secondary);
|
|
528
|
+
line-height: 1.7;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
/* -- FOOTER -- */
|
|
532
|
+
footer {
|
|
533
|
+
padding: 40px 0;
|
|
534
|
+
border-top: 1px solid var(--border);
|
|
535
|
+
}
|
|
536
|
+
footer .container {
|
|
537
|
+
display: flex;
|
|
538
|
+
align-items: center;
|
|
539
|
+
justify-content: space-between;
|
|
540
|
+
}
|
|
541
|
+
.footer-left {
|
|
542
|
+
display: flex;
|
|
543
|
+
align-items: center;
|
|
544
|
+
gap: 20px;
|
|
545
|
+
font-size: 13px;
|
|
546
|
+
color: var(--text-muted);
|
|
547
|
+
}
|
|
548
|
+
.footer-left a {
|
|
549
|
+
color: var(--text-secondary);
|
|
550
|
+
text-decoration: none;
|
|
551
|
+
transition: color 0.2s;
|
|
552
|
+
}
|
|
553
|
+
.footer-left a:hover { color: var(--accent); }
|
|
554
|
+
.footer-right {
|
|
555
|
+
display: flex;
|
|
556
|
+
align-items: center;
|
|
557
|
+
gap: 16px;
|
|
558
|
+
}
|
|
559
|
+
.footer-right a {
|
|
560
|
+
color: var(--text-muted);
|
|
561
|
+
text-decoration: none;
|
|
562
|
+
font-size: 13px;
|
|
563
|
+
transition: color 0.2s;
|
|
564
|
+
}
|
|
565
|
+
.footer-right a:hover { color: var(--accent); }
|
|
566
|
+
|
|
567
|
+
/* -- ANIMATIONS -- */
|
|
568
|
+
.fade-in {
|
|
569
|
+
opacity: 0;
|
|
570
|
+
transform: translateY(20px);
|
|
571
|
+
transition: opacity 0.6s ease, transform 0.6s ease;
|
|
572
|
+
}
|
|
573
|
+
.fade-in.visible {
|
|
574
|
+
opacity: 1;
|
|
575
|
+
transform: translateY(0);
|
|
576
|
+
}
|
|
577
|
+
.fade-in.delay-1 { transition-delay: 0.1s; }
|
|
578
|
+
.fade-in.delay-2 { transition-delay: 0.2s; }
|
|
579
|
+
.fade-in.delay-3 { transition-delay: 0.3s; }
|
|
580
|
+
.fade-in.delay-4 { transition-delay: 0.4s; }
|
|
581
|
+
.fade-in.delay-5 { transition-delay: 0.5s; }
|
|
582
|
+
|
|
583
|
+
/* -- RESPONSIVE -- */
|
|
584
|
+
@media (max-width: 768px) {
|
|
585
|
+
:root { --section-gap: 80px; }
|
|
586
|
+
.container { padding: 0 20px; }
|
|
587
|
+
.hero { padding-top: 110px; }
|
|
588
|
+
.hero-sub { font-size: 14px; }
|
|
589
|
+
.features-grid { grid-template-columns: 1fr; gap: 16px; }
|
|
590
|
+
.steps { grid-template-columns: 1fr; gap: 40px; }
|
|
591
|
+
.steps::before { display: none; }
|
|
592
|
+
.nav-links a:not(.nav-gh) { display: none; }
|
|
593
|
+
.screenshots-header { flex-direction: column; align-items: flex-start; gap: 16px; }
|
|
594
|
+
.hero-screenshot { transform: none; }
|
|
595
|
+
.hero-screenshot:hover { transform: none; }
|
|
596
|
+
.install-block code { font-size: 12px; padding: 12px 14px; }
|
|
597
|
+
footer .container { flex-direction: column; gap: 16px; text-align: center; }
|
|
598
|
+
.ss-grid { grid-template-columns: 1fr; }
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
@media (min-width: 769px) and (max-width: 1024px) {
|
|
602
|
+
.features-grid { grid-template-columns: repeat(2, 1fr); }
|
|
603
|
+
}
|
|
604
|
+
</style>
|
|
605
|
+
</head>
|
|
606
|
+
<body>
|
|
607
|
+
|
|
608
|
+
<!-- NAV -->
|
|
609
|
+
<nav>
|
|
610
|
+
<div class="container">
|
|
611
|
+
<a href="#" class="nav-brand">
|
|
612
|
+
<svg viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
|
|
613
|
+
<rect width="32" height="32" rx="6" fill="#1a1a1a"/>
|
|
614
|
+
<path d="M16 6v20M20 10h-5.5a3.5 3.5 0 000 7h3a3.5 3.5 0 010 7H12" stroke="#e8927c" stroke-width="2" fill="none" stroke-linecap="round"/>
|
|
615
|
+
</svg>
|
|
616
|
+
<span>Claude Code Cost</span>
|
|
617
|
+
</a>
|
|
618
|
+
<div class="nav-links">
|
|
619
|
+
<a href="#features">Features</a>
|
|
620
|
+
<a href="#how-it-works">How it works</a>
|
|
621
|
+
<a href="#faq">FAQ</a>
|
|
622
|
+
<a href="https://github.com/NikiforovAll/claude-code-cost" class="nav-gh" target="_blank" rel="noopener">
|
|
623
|
+
<svg viewBox="0 0 16 16" fill="currentColor"><path d="M8 0C3.58 0 0 3.58 0 8c0 3.54 2.29 6.53 5.47 7.59.4.07.55-.17.55-.38 0-.19-.01-.82-.01-1.49-2.01.37-2.53-.49-2.69-.94-.09-.23-.48-.94-.82-1.13-.28-.15-.68-.52-.01-.53.63-.01 1.08.58 1.23.82.72 1.21 1.87.87 2.33.66.07-.52.28-.87.51-1.07-1.78-.2-3.64-.89-3.64-3.95 0-.87.31-1.59.82-2.15-.08-.2-.36-1.02.08-2.12 0 0 .67-.21 2.2.82.64-.18 1.32-.27 2-.27.68 0 1.36.09 2 .27 1.53-1.04 2.2-.82 2.2-.82.44 1.1.16 1.92.08 2.12.51.56.82 1.27.82 2.15 0 3.07-1.87 3.75-3.65 3.95.29.25.54.73.54 1.48 0 1.07-.01 1.93-.01 2.2 0 .21.15.46.55.38A8.013 8.013 0 0016 8c0-4.42-3.58-8-8-8z"/></svg>
|
|
624
|
+
GitHub
|
|
625
|
+
</a>
|
|
626
|
+
</div>
|
|
627
|
+
</div>
|
|
628
|
+
</nav>
|
|
629
|
+
|
|
630
|
+
<!-- HERO -->
|
|
631
|
+
<section class="hero">
|
|
632
|
+
<div class="container">
|
|
633
|
+
<div class="fade-in">
|
|
634
|
+
<div class="hero-badge">
|
|
635
|
+
<span class="dot"></span>
|
|
636
|
+
Open source · MIT
|
|
637
|
+
</div>
|
|
638
|
+
</div>
|
|
639
|
+
<h1 class="fade-in delay-1">Know what Claude Code<br><em>costs</em> you</h1>
|
|
640
|
+
<p class="hero-sub fade-in delay-2">A cost visualization dashboard for Claude Code. Track spending per day, per project, per session -- with dynamic pricing and drill-down views.</p>
|
|
641
|
+
<div class="fade-in delay-3">
|
|
642
|
+
<div class="install-block">
|
|
643
|
+
<code><span class="prompt">$</span> npx claude-code-cost --open</code>
|
|
644
|
+
<button class="install-copy" onclick="copyInstall(this)" title="Copy to clipboard">
|
|
645
|
+
<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="5" y="5" width="9" height="9" rx="1.5"/><path d="M5 11H3.5A1.5 1.5 0 012 9.5v-7A1.5 1.5 0 013.5 1h7A1.5 1.5 0 0112 2.5V5"/></svg>
|
|
646
|
+
</button>
|
|
647
|
+
</div>
|
|
648
|
+
</div>
|
|
649
|
+
<div class="hero-screenshot fade-in delay-4">
|
|
650
|
+
<img src="assets/sesssion-light.png" alt="Claude Code Cost dashboard">
|
|
651
|
+
</div>
|
|
652
|
+
</div>
|
|
653
|
+
</section>
|
|
654
|
+
|
|
655
|
+
<!-- FEATURES -->
|
|
656
|
+
<section class="features" id="features">
|
|
657
|
+
<div class="container">
|
|
658
|
+
<p class="section-label fade-in">Features</p>
|
|
659
|
+
<h2 class="section-title fade-in">Everything you need to<br>understand your Claude Code spend</h2>
|
|
660
|
+
<div class="features-grid">
|
|
661
|
+
<div class="feature-card fade-in">
|
|
662
|
+
<div class="feature-icon">
|
|
663
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M3 17V7l4-4h6l4 4v10H3z"/><path d="M7 17v-5h6v5"/></svg>
|
|
664
|
+
</div>
|
|
665
|
+
<h3>Top-down drill-down</h3>
|
|
666
|
+
<p>Total cost to per-project to per-session to per-message. Click through to see exactly where your budget goes.</p>
|
|
667
|
+
</div>
|
|
668
|
+
<div class="feature-card fade-in delay-1">
|
|
669
|
+
<div class="feature-icon">
|
|
670
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M10 2v16M14 6h-5.5a3 3 0 000 6h3a3 3 0 010 6H6"/></svg>
|
|
671
|
+
</div>
|
|
672
|
+
<h3>Dynamic pricing</h3>
|
|
673
|
+
<p>Live model prices from LiteLLM. Tiered pricing at 200K tokens, cache token costs, and fast mode multipliers -- all handled automatically.</p>
|
|
674
|
+
</div>
|
|
675
|
+
<div class="feature-card fade-in delay-2">
|
|
676
|
+
<div class="feature-icon">
|
|
677
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="2" y="6" width="3" height="12" rx="1"/><rect x="8.5" y="3" width="3" height="15" rx="1"/><rect x="15" y="8" width="3" height="10" rx="1"/></svg>
|
|
678
|
+
</div>
|
|
679
|
+
<h3>Daily cost chart</h3>
|
|
680
|
+
<p>Bar chart with configurable date range: 1 day, 3 days, 7 days, 30 days, 90 days, or 1 year. See trends at a glance.</p>
|
|
681
|
+
</div>
|
|
682
|
+
<div class="feature-card fade-in delay-3">
|
|
683
|
+
<div class="feature-icon">
|
|
684
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="10" cy="10" r="8"/><path d="M10 10V4"/><path d="M10 10l5 5"/></svg>
|
|
685
|
+
</div>
|
|
686
|
+
<h3>Model breakdown</h3>
|
|
687
|
+
<p>See cost distribution across models. Know how much you spend on Opus vs Sonnet vs Haiku.</p>
|
|
688
|
+
</div>
|
|
689
|
+
<div class="feature-card fade-in delay-4">
|
|
690
|
+
<div class="feature-icon">
|
|
691
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="10" cy="10" r="3"/><path d="M10 3v2M10 15v2M3 10h2M15 10h2M5.05 5.05l1.41 1.41M13.54 13.54l1.41 1.41M5.05 14.95l1.41-1.41M13.54 6.46l1.41-1.41"/></svg>
|
|
692
|
+
</div>
|
|
693
|
+
<h3>Dark / light theme</h3>
|
|
694
|
+
<p>Styled with IBM Plex Mono and Playfair Display. Automatic theme detection or manual toggle. PWA installable.</p>
|
|
695
|
+
</div>
|
|
696
|
+
<div class="feature-card fade-in delay-5">
|
|
697
|
+
<div class="feature-icon">
|
|
698
|
+
<svg width="20" height="20" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M4 4h12v12H4z"/><path d="M4 8h12M8 4v12"/></svg>
|
|
699
|
+
</div>
|
|
700
|
+
<h3>Cache efficiency</h3>
|
|
701
|
+
<p>Track how well prompt caching works across sessions. See cache read ratios and creation costs per message.</p>
|
|
702
|
+
</div>
|
|
703
|
+
</div>
|
|
704
|
+
</div>
|
|
705
|
+
</section>
|
|
706
|
+
|
|
707
|
+
<!-- HOW IT WORKS -->
|
|
708
|
+
<section class="how-it-works" id="how-it-works">
|
|
709
|
+
<div class="container">
|
|
710
|
+
<p class="section-label fade-in">Setup</p>
|
|
711
|
+
<h2 class="section-title fade-in">One command. Full cost visibility.</h2>
|
|
712
|
+
<div class="steps">
|
|
713
|
+
<div class="step fade-in">
|
|
714
|
+
<div class="step-num">1</div>
|
|
715
|
+
<h3>Run it</h3>
|
|
716
|
+
<p>One command to launch. No setup, no config, no hooks. Opens in your browser.</p>
|
|
717
|
+
<div class="step-code">npx claude-code-cost --open</div>
|
|
718
|
+
</div>
|
|
719
|
+
<div class="step fade-in delay-2">
|
|
720
|
+
<div class="step-num">2</div>
|
|
721
|
+
<h3>Browse costs</h3>
|
|
722
|
+
<p>Overview with daily chart, model distribution, and project breakdown. Click any project to drill down.</p>
|
|
723
|
+
<div class="step-code">localhost:3458</div>
|
|
724
|
+
</div>
|
|
725
|
+
<div class="step fade-in delay-4">
|
|
726
|
+
<div class="step-num">3</div>
|
|
727
|
+
<h3>Drill down</h3>
|
|
728
|
+
<p>Project to session to message. See token counts, costs, and cumulative spend for every API call.</p>
|
|
729
|
+
<div class="step-code">total / project / session / message</div>
|
|
730
|
+
</div>
|
|
731
|
+
</div>
|
|
732
|
+
</div>
|
|
733
|
+
</section>
|
|
734
|
+
|
|
735
|
+
<!-- SCREENSHOTS -->
|
|
736
|
+
<section class="screenshots" id="screenshots">
|
|
737
|
+
<div class="container">
|
|
738
|
+
<div class="screenshots-header">
|
|
739
|
+
<div>
|
|
740
|
+
<p class="section-label fade-in">Preview</p>
|
|
741
|
+
<h2 class="section-title fade-in" style="margin-bottom:0">See it in action</h2>
|
|
742
|
+
</div>
|
|
743
|
+
<div class="theme-toggle fade-in">
|
|
744
|
+
<button onclick="showScreenshot('dark', this)">Dark</button>
|
|
745
|
+
<button class="active" onclick="showScreenshot('light', this)">Light</button>
|
|
746
|
+
</div>
|
|
747
|
+
</div>
|
|
748
|
+
<div class="ss-grid">
|
|
749
|
+
<div>
|
|
750
|
+
<div class="screenshot-frame fade-in">
|
|
751
|
+
<img class="ss-dark hidden" src="assets/overview-dark.png" alt="Overview dark">
|
|
752
|
+
<img class="ss-light" src="assets/overview-light.png" alt="Overview light">
|
|
753
|
+
</div>
|
|
754
|
+
<div class="ss-label">Overview</div>
|
|
755
|
+
</div>
|
|
756
|
+
<div>
|
|
757
|
+
<div class="screenshot-frame fade-in delay-1">
|
|
758
|
+
<img class="ss-dark hidden" src="assets/projects-dark.png" alt="Projects dark">
|
|
759
|
+
<img class="ss-light" src="assets/projects-light.png" alt="Projects light">
|
|
760
|
+
</div>
|
|
761
|
+
<div class="ss-label">Projects</div>
|
|
762
|
+
</div>
|
|
763
|
+
<div>
|
|
764
|
+
<div class="screenshot-frame fade-in delay-2">
|
|
765
|
+
<img class="ss-dark hidden" src="assets/session-dark.png" alt="Session dark">
|
|
766
|
+
<img class="ss-light" src="assets/sesssion-light.png" alt="Session light">
|
|
767
|
+
</div>
|
|
768
|
+
<div class="ss-label">Session Detail</div>
|
|
769
|
+
</div>
|
|
770
|
+
</div>
|
|
771
|
+
</div>
|
|
772
|
+
</section>
|
|
773
|
+
|
|
774
|
+
<!-- FAQ -->
|
|
775
|
+
<section class="faq" id="faq">
|
|
776
|
+
<div class="container">
|
|
777
|
+
<p class="section-label fade-in">FAQ</p>
|
|
778
|
+
<h2 class="section-title fade-in">Common questions</h2>
|
|
779
|
+
<div class="faq-list">
|
|
780
|
+
<div class="faq-item fade-in">
|
|
781
|
+
<button class="faq-q" onclick="toggleFaq(this)">
|
|
782
|
+
Where does pricing data come from?
|
|
783
|
+
<svg class="faq-chevron" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M5 8l5 5 5-5"/></svg>
|
|
784
|
+
</button>
|
|
785
|
+
<div class="faq-a"><p>Live from <a href="https://github.com/BerriAI/litellm" target="_blank" rel="noopener" style="color:var(--accent)">LiteLLM's pricing dataset</a> (2000+ models). Cached for 6 hours. If the fetch fails, a bundled offline snapshot of Claude model prices is used.</p></div>
|
|
786
|
+
</div>
|
|
787
|
+
<div class="faq-item fade-in delay-1">
|
|
788
|
+
<button class="faq-q" onclick="toggleFaq(this)">
|
|
789
|
+
Does it work offline?
|
|
790
|
+
<svg class="faq-chevron" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M5 8l5 5 5-5"/></svg>
|
|
791
|
+
</button>
|
|
792
|
+
<div class="faq-a"><p>Yes. The offline pricing fallback covers all current Claude models. PWA support is included for installability.</p></div>
|
|
793
|
+
</div>
|
|
794
|
+
<div class="faq-item fade-in delay-2">
|
|
795
|
+
<button class="faq-q" onclick="toggleFaq(this)">
|
|
796
|
+
Does it modify any files?
|
|
797
|
+
<svg class="faq-chevron" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M5 8l5 5 5-5"/></svg>
|
|
798
|
+
</button>
|
|
799
|
+
<div class="faq-a"><p>No. Completely read-only. It only reads JSONL session files from <code>~/.claude/projects/</code>. Nothing is written or modified.</p></div>
|
|
800
|
+
</div>
|
|
801
|
+
<div class="faq-item fade-in delay-3">
|
|
802
|
+
<button class="faq-q" onclick="toggleFaq(this)">
|
|
803
|
+
Are the costs accurate?
|
|
804
|
+
<svg class="faq-chevron" viewBox="0 0 20 20" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M5 8l5 5 5-5"/></svg>
|
|
805
|
+
</button>
|
|
806
|
+
<div class="faq-a"><p>Costs are estimates based on token counts and publicly available model pricing. They use pre-calculated <code>costUSD</code> when available in session files, otherwise calculate from tokens. Actual billing may differ slightly.</p></div>
|
|
807
|
+
</div>
|
|
808
|
+
</div>
|
|
809
|
+
</div>
|
|
810
|
+
</section>
|
|
811
|
+
|
|
812
|
+
<!-- LIGHTBOX -->
|
|
813
|
+
<div class="lightbox" id="lightbox" onclick="closeLightbox()">
|
|
814
|
+
<button class="lightbox-close" onclick="closeLightbox()">×</button>
|
|
815
|
+
<img id="lightbox-img" src="" alt="">
|
|
816
|
+
</div>
|
|
817
|
+
|
|
818
|
+
<!-- FOOTER -->
|
|
819
|
+
<footer>
|
|
820
|
+
<div class="container">
|
|
821
|
+
<div class="footer-left">
|
|
822
|
+
<span>MIT License</span>
|
|
823
|
+
<a href="https://github.com/NikiforovAll/claude-code-cost" target="_blank" rel="noopener">GitHub</a>
|
|
824
|
+
</div>
|
|
825
|
+
<div class="footer-right">
|
|
826
|
+
<a href="https://github.com/NikiforovAll" target="_blank" rel="noopener">Built by NikiforovAll</a>
|
|
827
|
+
</div>
|
|
828
|
+
</div>
|
|
829
|
+
</footer>
|
|
830
|
+
|
|
831
|
+
<script>
|
|
832
|
+
const nav = document.querySelector('nav');
|
|
833
|
+
window.addEventListener('scroll', () => {
|
|
834
|
+
nav.classList.toggle('scrolled', window.scrollY > 10);
|
|
835
|
+
}, { passive: true });
|
|
836
|
+
|
|
837
|
+
const observer = new IntersectionObserver((entries) => {
|
|
838
|
+
entries.forEach(e => {
|
|
839
|
+
if (e.isIntersecting) {
|
|
840
|
+
e.target.classList.add('visible');
|
|
841
|
+
observer.unobserve(e.target);
|
|
842
|
+
}
|
|
843
|
+
});
|
|
844
|
+
}, { threshold: 0.1, rootMargin: '0px 0px -40px 0px' });
|
|
845
|
+
|
|
846
|
+
document.querySelectorAll('.fade-in').forEach(el => observer.observe(el));
|
|
847
|
+
|
|
848
|
+
function copyInstall(btn) {
|
|
849
|
+
navigator.clipboard.writeText('npx claude-code-cost --open').then(() => {
|
|
850
|
+
btn.classList.add('copied');
|
|
851
|
+
btn.innerHTML = '<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><path d="M3 8.5l3 3 7-7"/></svg>';
|
|
852
|
+
setTimeout(() => {
|
|
853
|
+
btn.classList.remove('copied');
|
|
854
|
+
btn.innerHTML = '<svg viewBox="0 0 16 16" fill="none" stroke="currentColor" stroke-width="1.5"><rect x="5" y="5" width="9" height="9" rx="1.5"/><path d="M5 11H3.5A1.5 1.5 0 012 9.5v-7A1.5 1.5 0 013.5 1h7A1.5 1.5 0 0112 2.5V5"/></svg>';
|
|
855
|
+
}, 2000);
|
|
856
|
+
});
|
|
857
|
+
}
|
|
858
|
+
|
|
859
|
+
document.querySelectorAll('.screenshot-frame, .hero-screenshot').forEach(el => {
|
|
860
|
+
el.addEventListener('click', () => {
|
|
861
|
+
const img = el.querySelector('img:not(.hidden)');
|
|
862
|
+
if (!img) return;
|
|
863
|
+
const lb = document.getElementById('lightbox');
|
|
864
|
+
document.getElementById('lightbox-img').src = img.src;
|
|
865
|
+
lb.classList.add('open');
|
|
866
|
+
document.body.style.overflow = 'hidden';
|
|
867
|
+
});
|
|
868
|
+
});
|
|
869
|
+
|
|
870
|
+
function closeLightbox() {
|
|
871
|
+
const lb = document.getElementById('lightbox');
|
|
872
|
+
lb.classList.remove('open');
|
|
873
|
+
document.body.style.overflow = '';
|
|
874
|
+
}
|
|
875
|
+
|
|
876
|
+
document.addEventListener('keydown', (e) => {
|
|
877
|
+
if (e.key === 'Escape') closeLightbox();
|
|
878
|
+
});
|
|
879
|
+
|
|
880
|
+
function showScreenshot(theme, btn) {
|
|
881
|
+
document.querySelectorAll('.ss-dark').forEach(el => el.classList.toggle('hidden', theme !== 'dark'));
|
|
882
|
+
document.querySelectorAll('.ss-light').forEach(el => el.classList.toggle('hidden', theme !== 'light'));
|
|
883
|
+
btn.parentElement.querySelectorAll('button').forEach(b => b.classList.remove('active'));
|
|
884
|
+
btn.classList.add('active');
|
|
885
|
+
}
|
|
886
|
+
|
|
887
|
+
function toggleFaq(btn) {
|
|
888
|
+
const item = btn.parentElement;
|
|
889
|
+
const wasOpen = item.classList.contains('open');
|
|
890
|
+
document.querySelectorAll('.faq-item.open').forEach(i => i.classList.remove('open'));
|
|
891
|
+
if (!wasOpen) item.classList.add('open');
|
|
892
|
+
}
|
|
893
|
+
</script>
|
|
894
|
+
|
|
895
|
+
</body>
|
|
896
|
+
</html>
|