Skip to content

Commit dd6e05d

Browse files
CSLclaude
andcommitted
delight: add micro-interactions and surprises to website
- Time-based greeting (morning/afternoon/evening/night owl) - Copy button with success feedback animation - Button press and hover micro-interactions - Feature card hover with icon animation - Shadow lift on cards - Easter egg: Konami code triggers page wiggle Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 7204893 commit dd6e05d

2 files changed

Lines changed: 91 additions & 5 deletions

File tree

docs/_layouts/default.html

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,11 +200,16 @@
200200
font-weight: 600;
201201
font-size: 14px;
202202
text-decoration: none;
203-
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
203+
transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
204204
cursor: pointer;
205205
border: none;
206206
font-family: inherit;
207207
letter-spacing: -0.01em;
208+
position: relative;
209+
}
210+
211+
.btn:active {
212+
transform: scale(0.97);
208213
}
209214

210215
.btn-primary {
@@ -217,6 +222,14 @@
217222
box-shadow: 0 8px 30px rgba(232, 255, 107, 0.3);
218223
}
219224

225+
.btn-primary svg {
226+
transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
227+
}
228+
229+
.btn-primary:hover svg {
230+
transform: translateY(-1px);
231+
}
232+
220233
.btn-secondary {
221234
background: var(--surface-elevated);
222235
color: var(--text);
@@ -370,6 +383,30 @@
370383
}
371384
`;
372385
document.head.appendChild(style);
386+
387+
// Easter egg: Konami code for a surprise
388+
const konamiCode = ['ArrowUp', 'ArrowUp', 'ArrowDown', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'ArrowLeft', 'ArrowRight', 'b', 'a'];
389+
let konamiIndex = 0;
390+
391+
document.addEventListener('keydown', (e) => {
392+
if (e.key === konamiCode[konamiIndex]) {
393+
konamiIndex++;
394+
if (konamiIndex === konamiCode.length) {
395+
// Trigger surprise!
396+
document.body.style.transition = 'transform 0.5s';
397+
document.body.style.transform = 'rotate(1deg)';
398+
setTimeout(() => {
399+
document.body.style.transform = 'rotate(-1deg)';
400+
setTimeout(() => {
401+
document.body.style.transform = '';
402+
}, 200);
403+
}, 200);
404+
konamiIndex = 0;
405+
}
406+
} else {
407+
konamiIndex = 0;
408+
}
409+
});
373410
});
374411
</script>
375412
</body>

docs/index.html

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,11 @@
149149
align-items: center;
150150
gap: 16px;
151151
margin-top: 24px;
152+
transition: border-color 0.3s;
153+
}
154+
155+
.install-box:hover {
156+
border-color: var(--border-light);
152157
}
153158

154159
.install-box code {
@@ -161,16 +166,25 @@
161166
background: var(--surface-elevated);
162167
border: 1px solid var(--border);
163168
border-radius: 8px;
164-
padding: 8px 12px;
169+
padding: 8px 14px;
165170
color: var(--text-secondary);
166171
cursor: pointer;
167172
transition: all 0.2s;
168173
font-size: 12px;
174+
font-family: inherit;
175+
font-weight: 500;
169176
}
170177

171178
.install-box .copy-btn:hover {
172179
background: var(--surface-hover);
173180
color: var(--text);
181+
border-color: var(--border-light);
182+
}
183+
184+
.install-box .copy-btn.copied {
185+
background: var(--primary);
186+
color: var(--background);
187+
border-color: var(--primary);
174188
}
175189

176190
@keyframes fadeInUp {
@@ -273,6 +287,7 @@
273287
transform: translateY(-4px);
274288
border-color: var(--border-light);
275289
background: var(--surface-elevated);
290+
box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.3);
276291
}
277292

278293
.feature-card:hover::before {
@@ -291,6 +306,11 @@
291306
justify-content: center;
292307
font-size: 22px;
293308
margin-bottom: 24px;
309+
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
310+
}
311+
312+
.feature-card:hover .feature-icon {
313+
transform: scale(1.1) rotate(3deg);
294314
}
295315

296316
.feature-card h3 {
@@ -564,9 +584,9 @@
564584
<section class="hero">
565585
<div class="container">
566586
<div class="hero-content">
567-
<div class="hero-badge">
587+
<div class="hero-badge" id="greeting-badge">
568588
<span class="dot"></span>
569-
Open Source & Free Forever
589+
<span id="greeting-text">Open Source & Free Forever</span>
570590
</div>
571591
<h1>Collect materials<br><em>effortlessly</em></h1>
572592
<p>An elegant macOS app for saving links, images, and text. Your personal library for inspiration and ideas.</p>
@@ -604,7 +624,7 @@ <h1>Collect materials<br><em>effortlessly</em></h1>
604624

605625
<div class="install-box">
606626
<code>curl -sL https://github.com/SSBun/Seahorse/raw/main/install_latest.sh | bash</code>
607-
<button class="copy-btn" onclick="navigator.clipboard.writeText('curl -sL https://github.com/SSBun/Seahorse/raw/main/install_latest.sh | bash')">Copy</button>
627+
<button class="copy-btn" onclick="copyInstallCmd(this)">Copy</button>
608628
</div>
609629
</div>
610630

@@ -843,3 +863,32 @@ <h2>Ready to start collecting?</h2>
843863
</div>
844864
</div>
845865
</section>
866+
867+
<script>
868+
// Time-based greeting
869+
(function() {
870+
const hour = new Date().getHours();
871+
let greeting = 'Open Source & Free Forever';
872+
if (hour >= 5 && hour < 12) greeting = 'Good morning';
873+
else if (hour >= 12 && hour < 18) greeting = 'Good afternoon';
874+
else if (hour >= 18 && hour < 22) greeting = 'Good evening';
875+
else greeting = 'Night owl? Nice';
876+
877+
const greetingEl = document.getElementById('greeting-text');
878+
if (greetingEl) greetingEl.textContent = greeting;
879+
})();
880+
881+
// Copy install command with feedback
882+
function copyInstallCmd(btn) {
883+
const cmd = 'curl -sL https://github.com/SSBun/Seahorse/raw/main/install_latest.sh | bash';
884+
navigator.clipboard.writeText(cmd).then(() => {
885+
const originalText = btn.textContent;
886+
btn.textContent = 'Copied!';
887+
btn.classList.add('copied');
888+
setTimeout(() => {
889+
btn.textContent = originalText;
890+
btn.classList.remove('copied');
891+
}, 2000);
892+
});
893+
}
894+
</script>

0 commit comments

Comments
 (0)