-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
595 lines (542 loc) · 18.4 KB
/
index.html
File metadata and controls
595 lines (542 loc) · 18.4 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
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DiffSense - AI Git Commit Generator</title>
<style>
:root {
--bg-color: #0d1117;
--card-bg: #161b22;
--border-color: #30363d;
--text-primary: #c9d1d9;
--text-secondary: #8b949e;
--accent-green: #2ea043;
--accent-blue: #58a6ff;
--accent-orange: #f0883e;
--font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace;
}
/* Global link styles */
a {
color: var(--accent-blue);
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
body {
background-color: var(--bg-color);
color: var(--text-primary);
font-family: var(--font-mono);
margin: 0;
padding: 0;
display: flex;
flex-direction: column;
align-items: center;
line-height: 1.6;
}
.container {
max-width: 800px;
width: 100%;
position: relative;
padding: 40px 20px 30px 20px;
display: flex;
flex-direction: column;
align-items: center;
gap: 28px;
}
header {
text-align: center;
margin-bottom: 4px;
}
/* Badge row */
.badge-row {
display: flex;
flex-wrap: wrap;
gap: 8px;
justify-content: center;
margin-bottom: 12px;
}
.badge {
font-size: 0.75rem;
padding: 4px 10px;
border-radius: 999px;
border: 1px solid var(--border-color);
background: #111827;
color: var(--text-secondary);
display: inline-flex;
align-items: center;
gap: 6px;
text-decoration: none;
}
.badge-label { color: var(--text-primary); }
.badge-value {
padding: 1px 6px;
border-radius: 999px;
background: #1f2937;
color: var(--accent-orange);
min-width: 2ch;
text-align: center;
}
/* Product Hunt badge */
.producthunt-badge-wrapper {
text-align: center;
margin-top: 10px;
}
.producthunt-badge {
display: inline-flex;
align-items: center;
}
.producthunt-badge img {
height: auto;
max-width: 200px;
}
/* Cat head above title */
.cat-head-wrapper {
margin-bottom: 10px;
}
.cat-head-img {
width: 144px;
height: auto;
}
h1 {
font-size: 3rem;
margin: 0 0 10px 0;
color: #ffffff;
letter-spacing: -1px;
}
.subtitle {
font-size: 1.2rem;
color: var(--text-primary);
margin-bottom: 8px;
}
/* CTA: button + curl row */
.cta-stack {
display: flex;
flex-direction: column;
align-items: center;
gap: 10px;
margin-bottom: 12px;
}
/* Row that contains button (label positioned absolutely) */
.step1-row {
position: relative;
display: flex;
justify-content: center;
align-items: center;
min-height: 1.2em; /* ensure space for label */
}
/* Step 1 label: absolutely positioned to left of button */
.step1-label {
position: absolute;
right: 100%;
margin-right: 8px;
font-size: 0.85rem;
color: var(--text-secondary);
white-space: nowrap;
}
.step-label {
font-size: 0.85rem;
color: var(--text-secondary);
}
.step3-label {
font-size: 0.85rem;
color: var(--text-secondary);
text-align: center;
margin-bottom: 4px;
}
.primary-button {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 8px 16px;
border-radius: 999px;
border: 1px solid var(--accent-blue);
background: linear-gradient(135deg, #1f2933, #111827);
color: #ffffff;
font-size: 0.9rem;
text-decoration: none;
cursor: pointer;
gap: 8px;
}
.primary-button:hover {
background: linear-gradient(135deg, #243447, #111827);
}
.primary-button span.icon { font-size: 1.1rem; }
.curl-row {
display: flex;
align-items: center;
gap: 8px;
flex-wrap: wrap;
justify-content: center;
}
.curl-label {
font-size: 0.85rem;
color: var(--text-secondary);
}
.curl-field {
display: inline-flex;
align-items: center;
width: fit-content;
max-width: 100%;
background: #010409;
border-radius: 6px;
border: 1px solid var(--border-color);
padding: 6px 10px;
font-size: 0.85rem;
color: var(--text-primary);
box-shadow: inset 0 0 0 1px rgba(0,0,0,0.4);
}
.curl-prefix {
color: var(--accent-green);
margin-right: 6px;
}
.curl-command {
white-space: nowrap;
user-select: all;
}
.copy-button {
padding: 6px 10px;
font-size: 0.78rem;
border-radius: 6px;
border: 1px solid var(--border-color);
background: #111827;
color: var(--text-primary);
cursor: pointer;
display: inline-flex;
align-items: center;
gap: 4px;
}
.copy-button:hover {
background: #1f2937;
}
/* Hero section */
.hero-section {
position: relative;
width: 100%;
max-width: 650px;
display: flex;
flex-direction: column;
align-items: center;
margin-bottom: 18px;
}
.terminal-window {
width: 100%;
background: #010409;
border: 1px solid var(--border-color);
border-radius: 8px;
box-shadow: 0 20px 40px rgba(0,0,0,0.4);
overflow: hidden;
font-size: 0.9rem;
text-align: left;
z-index: 1;
}
.window-header {
background: #161b22;
padding: 8px 12px;
display: flex;
gap: 6px;
border-bottom: 1px solid var(--border-color);
}
.dot { width: 10px; height: 10px; border-radius: 50%; }
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }
.terminal-body {
padding: 15px;
color: var(--text-primary);
}
.prompt { color: var(--accent-green); }
.branch { color: var(--accent-blue); }
.output { color: var(--text-secondary); }
.cursor {
display: inline-block;
width: 8px;
height: 15px;
background: var(--text-secondary);
animation: blink 1s infinite;
vertical-align: middle;
}
@keyframes blink { 0%,100% {opacity:1;} 50% {opacity:0;} }
.popover-window {
position: absolute;
bottom: -30px;
right: -20px;
background: #1f2428;
border: 1px solid var(--accent-blue);
border-radius: 6px;
padding: 15px;
width: 320px;
box-shadow: 0 15px 30px rgba(0,0,0,0.5);
z-index: 2;
animation: float 4s ease-in-out infinite;
}
@keyframes float {
0% { transform: translateY(0px); }
50% { transform: translateY(-5px); }
100% { transform: translateY(0px); }
}
.popover-content {
font-size: 0.95rem;
color: #ffffff;
border-left: 3px solid var(--accent-blue);
padding-left: 10px;
}
.features-container {
width: 100%;
text-align: center;
margin-bottom: 12px;
}
.feature-title {
font-size: 1.5rem;
margin-bottom: 25px;
border-bottom: 1px solid var(--border-color);
display: inline-block;
padding-bottom: 5px;
}
.feature-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
gap: 15px;
text-align: left;
}
.feature-box {
background: transparent;
border: 1px solid var(--border-color);
padding: 15px;
border-radius: 6px;
transition: border-color 0.2s;
}
.feature-box:hover { border-color: var(--text-secondary); }
.feature-box h3 {
margin: 0 0 8px 0;
font-size: 1rem;
color: #ffffff;
}
.feature-box p {
margin: 0;
font-size: 0.9rem;
color: var(--text-secondary);
}
/* Sleeping cat near footer */
.footer-cat-wrapper {
margin-top: -20px;
margin-bottom: 2px;
}
.cat-sleeping-img {
width: 110px;
height: auto;
opacity: 0.9;
}
footer {
margin-top: -24px;
color: var(--text-secondary);
font-size: 0.8rem;
text-align: center;
}
@media (max-width: 600px) {
.popover-window {
position: relative;
bottom: auto;
right: auto;
margin-top: -10px;
width: 90%;
}
h1 { font-size: 2.2rem; }
.producthunt-badge img {
max-width: 150px;
}
}
</style>
</head>
<body>
<div class="container">
<header>
<!-- Cat head SVG (file, not edited) -->
<div class="cat-head-wrapper">
<img src="https://edgeleap.github.io/head.svg"
alt="DiffSense cat head"
class="cat-head-img">
</div>
<h1>DiffSense</h1>
<div class="subtitle">A free git commit message generator powered by Apple Intelligence</div>
<!-- Badges now below subtitle -->
<div class="badge-row">
<a class="badge" href="https://github.com/edgeleap/diffsense/releases">
<span class="badge-label">Total downloads</span>
<span class="badge-value" id="downloads-count">0</span>
</a>
<a class="badge" href="https://github.com/edgeleap/diffsense/stargazers">
<span class="badge-label">Stars on GitHub</span>
<span class="badge-value" id="stars-count">0</span>
</a>
<a class="badge" href="https://github.com/edgeleap/diffsense/forks">
<span class="badge-label">Forks on GitHub</span>
<span class="badge-value" id="forks-count">0</span>
</a>
</div>
<!-- CTA stack -->
<div class="cta-stack">
<div class="step1-row">
<a class="primary-button" href="https://github.com/edgeleap/diffsense/releases/latest/download/Diffsense.shortcut">
<span class="icon">⬇️</span>
<span>Download Shortcut</span>
</a>
</div>
<div class="curl-row">
<span class="curl-label">Install in Terminal:</span>
<div class="curl-field" id="curl-field">
<span class="curl-prefix">$</span>
<span class="curl-command" id="curl-command">curl -fsSL https://edgeleap.github.io/install.sh | bash</span>
</div>
<button class="copy-button" type="button" id="copy-btn">
📋 Copy
</button>
</div>
<!-- Product Hunt badge placed just below Install in Terminal -->
<div class="producthunt-badge-wrapper">
<a href="https://www.producthunt.com/products/diffsense?embed=true&utm_source=badge-top-post-badge&utm_medium=badge&utm_campaign=badge-diffsense" target="_blank" rel="noopener noreferrer"><img alt="DiffSense - Local AI git commit generator for Apple Silicon | Product Hunt" width="250" height="54" src="https://api.producthunt.com/widgets/embed-image/v1/top-post-badge.svg?post_id=1053209&theme=light&period=daily&t=1766739969848"></a>
</div>
</div>
</header>
<!-- Hero Section -->
<div class="hero-section">
<div class="terminal-window">
<div class="window-header">
<div class="dot red"></div>
<div class="dot yellow"></div>
<div class="dot green"></div>
</div>
<div class="terminal-body">
<div><span class="prompt">$</span> git status</div>
<div class="output">
On branch <span class="branch">main</span><br>
Changes not staged for commit:<br>
modified: src/app.js<br>
modified: styles.css
</div>
<div style="margin-top: 10px;">
<span class="prompt">$</span> git add .
</div>
<div>
<span class="prompt">$</span> diffsense<span class="cursor"></span>
</div>
</div>
</div>
<div class="popover-window">
<div class="popover-content">
Add user authentication validation<br>
Implement token validation and error handling
</div>
</div>
</div>
<!-- Features -->
<div class="features-container">
<div class="feature-title">Features</div>
<div class="feature-grid">
<div class="feature-box">
<h3>🔓 Local & private on Apple Silicon</h3>
<p>DiffSense turns your git diff into clear, privacy-friendly commit messages</p>
</div>
<div class="feature-box">
<h3>⚙️ Customizable git message</h3>
<p>Default, minimal, verbose, byo rules. Editable before committing</p>
</div>
<div class="feature-box">
<h3>⚡️ Fast diff algorithm</h3>
<p>Handles any diff size with ease. Instantly</p>
</div>
<div class="feature-box">
<h3>🦜 Multiple AI models</h3>
<p>Local AI, Private Cloud Compute or ChatGPT</p>
</div>
<div class="feature-box">
<h3>🦁 Powerful alias macros</h3>
<p>Prepend git add . or append git push in alias</p>
</div>
<div class="feature-box">
<h3>🤖 AI Agent Compatible</h3>
<p>Use the --nopopup to skip the review popup</p>
</div>
</div>
</div>
<!-- Sleeping cat and footer -->
<div class="footer-cat-wrapper">
<img src="https://edgeleap.github.io/sleeping.svg"
alt="Sleeping cat"
class="cat-sleeping-img">
</div>
<footer>
2025 © <a href="https://github.com/edgeleap/">EdgeLeap</a>
</footer>
</div>
<!-- Badge + copy scripts -->
<script>
// Copy CURL command
document.getElementById('copy-btn').addEventListener('click', function () {
var text = document.getElementById('curl-command').textContent.trim();
navigator.clipboard.writeText(text).then(function () {
var btn = document.getElementById('copy-btn');
var old = btn.textContent;
btn.textContent = '✓ Copied';
setTimeout(function () { btn.textContent = old; }, 1500);
});
});
// Function to get badge values from shields.io (primary) with GitHub API fallback
async function getBadgeValue(owner, repo, metric) {
// Try shields.io first
try {
let url;
if (metric === 'downloads') {
url = `https://img.shields.io/github/downloads/${owner}/${repo}/total.json`;
} else if (metric === 'stars') {
url = `https://img.shields.io/github/stars/${owner}/${repo}.json`;
} else if (metric === 'forks') {
url = `https://img.shields.io/github/forks/${owner}/${repo}.json`;
}
const response = await fetch(url);
if (response.ok) {
const data = await response.json();
return data.message; // e.g., "1,234"
}
} catch (e) {
console.warn(`Shields.io failed for ${metric}, trying GitHub API`);
}
// Fallback to GitHub API
try {
if (metric === 'downloads') {
const res = await fetch(`https://api.github.com/repos/${owner}/${repo}/releases`);
const releases = await res.json();
let total = 0;
releases.forEach(r => {
(r.assets || []).forEach(a => total += a.download_count || 0);
});
return total.toLocaleString();
} else if (metric === 'stars') {
const res = await fetch(`https://api.github.com/repos/${owner}/${repo}`);
const data = await res.json();
return (data.stargazers_count ?? 0).toLocaleString();
} else if (metric === 'forks') {
const res = await fetch(`https://api.github.com/repos/${owner}/${repo}`);
const data = await res.json();
return (data.forks_count ?? 0).toLocaleString();
}
} catch (e) {
console.error(`Both shields.io and GitHub API failed for ${metric}:`, e);
return '0';
}
}
// Load badge values
(async function() {
const owner = 'edgeleap';
const repo = 'diffsense';
const downloads = await getBadgeValue(owner, repo, 'downloads');
const stars = await getBadgeValue(owner, repo, 'stars');
const forks = await getBadgeValue(owner, repo, 'forks');
document.getElementById('downloads-count').textContent = downloads;
document.getElementById('stars-count').textContent = stars;
document.getElementById('forks-count').textContent = forks;
})();
</script>
</body>
</html>