Skip to content

Commit 54b7581

Browse files
committed
hardcode link transforms
1 parent 338e2c2 commit 54b7581

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

index.animated.html

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
a {
2929
color: #aaa;
30+
display: inline-block;
3031
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu,
3132
Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
3233
font-weight: 700;
@@ -47,27 +48,27 @@
4748
</style>
4849

4950
<header>
50-
<a class="randomized" href="mailto:gabrielj.harel@gmail.com">CONTACT</a>
51-
<a class="randomized" href="https://npmjs.com/package/blobs">NPM</a>
52-
<a class="randomized" href="https://github.com/g-harel/blobs">GITHUB</a>
51+
<a
52+
href="mailto:gabrielj.harel@gmail.com"
53+
style="transform: rotate(1deg) translateY(3px);"
54+
>CONTACT</a
55+
>
56+
<a
57+
href="https://npmjs.com/package/blobs"
58+
style="transform: rotate(-2deg) translateY(-1px);"
59+
>NPM</a
60+
>
61+
<a
62+
href="https://github.com/g-harel/blobs"
63+
style="transform: rotate(4deg) translateY(1px);"
64+
>GITHUB</a
65+
>
5366
</header>
5467

5568
<main>
5669
<canvas id="canvas"></canvas>
5770
</main>
5871

59-
<script>
60-
// Randomly rotate and move elements with "randomized" class.
61-
const randomize = (elem) => {
62-
elem.style.display = "inline-block";
63-
elem.style.transform = `
64-
rotate(${-3 + 6 * Math.random()}deg)
65-
translate(${-5 + 10 * Math.random()}px, ${-5 + 10 * Math.random()}px)
66-
`;
67-
};
68-
Array.from(document.querySelectorAll(".randomized")).map(randomize);
69-
</script>
70-
7172
<script>
7273
// Set blob size relative to window, but limit to 600.
7374
const size = Math.min(600, window.innerWidth - 64);

0 commit comments

Comments
 (0)