Skip to content

Commit b6655ad

Browse files
committed
fix: baffle taglines
1 parent b3b7bb2 commit b6655ad

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

baffle.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.html

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,50 @@
1717
<img src="ip.png" alt="inversepolarity logo" />
1818
<div class="header-text">
1919
<h1>inversepolarity</h1>
20-
<p class="tagline">nobody's computer</p>
20+
<div id="baffle">
21+
<p id="t1" class="tagline">nobody's computer</p>
22+
</div>
2123
</div>
2224
</header>
2325

26+
<script type="text/javascript" src="baffle.js"></script>
27+
28+
29+
<script defer>
30+
const taglines = [
31+
"nobody's computer",
32+
"slipstreamed software",
33+
"functionally federated products",
34+
"intentful solutions",
35+
"hyperreal precision tools",
36+
];
37+
38+
let index = 0;
39+
40+
const b = baffle("#baffle .tagline", {
41+
characters: "█▓▒░<>/[]{}—=+*^!?@#$%&",
42+
speed: 75,
43+
});
44+
45+
function changeTagline() {
46+
// Start obfuscating current text
47+
b.start();
48+
49+
// After brief obfuscation, swap text and reveal
50+
setTimeout(() => {
51+
index = (index + 1) % taglines.length;
52+
b.text(() => taglines[index]);
53+
b.reveal(2000);
54+
}, 500);
55+
}
56+
57+
// Initial reveal
58+
b.start();
59+
b.reveal(2000);
60+
61+
// Cycle through taglines every 5 seconds
62+
setInterval(changeTagline, 5000);
63+
</script>
2464
<main class="main-grid">
2565
<div class="project-card">
2666
<h2>skiboard</h2>

0 commit comments

Comments
 (0)