Skip to content

Commit 2e53bdd

Browse files
committed
feat: replace custom SVG underline with rough-notation for hand-drawn effect
- Add rough-notation library from CDN for authentic hand-drawn annotations - Use RoughNotation.annotate() to create sketchy underline on hero text - Remove inline SVG underline, keep clean strong tag with id - Configured with brand color, 2.5px stroke, 2 iterations for natural look
1 parent 17cc390 commit 2e53bdd

2 files changed

Lines changed: 18 additions & 1 deletion

File tree

site/index.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ <h1 class="hero-title">
281281
</h1>
282282

283283
<p class="hero-subtitle">
284-
ZeroHost provides powerful <strong>free cloud hosting</strong> based on Hydrodactyl.
284+
ZeroHost provides powerful <strong id="hero-highlight">free cloud hosting</strong> based on Hydrodactyl.
285285
Deploy Discord bots, APIs, Minecraft Vanilla servers, and apps — all for <strong>$0</strong>, no credit card required.
286286
</p>
287287

@@ -768,6 +768,7 @@ <h5 class="footer-col-title">Legal</h5>
768768
</div>
769769
</div>
770770

771+
<script src="https://unpkg.com/rough-notation/lib/rough-notation.iife.js"></script>
771772
<script src="script.js"></script>
772773
</body>
773774
</html>

site/script.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,4 +351,20 @@ document.querySelectorAll('a[href^="#"]').forEach(a => {
351351
});
352352
})();
353353

354+
/* ---------- ROUGH NOTATION UNDERLINE ---------- */
355+
(function () {
356+
const heroHighlight = document.getElementById('hero-highlight');
357+
if (!heroHighlight || typeof RoughNotation === 'undefined') return;
358+
359+
const annotation = RoughNotation.annotate(heroHighlight, {
360+
type: 'underline',
361+
color: '#ee8132',
362+
strokeWidth: 2.5,
363+
padding: 4,
364+
iterations: 2,
365+
animationDuration: 800
366+
});
367+
annotation.show();
368+
})();
369+
354370

0 commit comments

Comments
 (0)