The fonts are better, maybe one more try for the "normal" font section that still seems a bit boring. But the big problem is the logo: make it an svg, because the current use of naked html elements and CSS is catastropic.
Browse files- index.html +10 -9
- script.js +16 -5
- style.css +5 -6
index.html
CHANGED
|
@@ -44,16 +44,17 @@
|
|
| 44 |
<!-- Logo -->
|
| 45 |
<div class="absolute top-8 left-8 z-20 group">
|
| 46 |
<a href="#">
|
| 47 |
-
<
|
| 48 |
-
<
|
| 49 |
-
|
| 50 |
-
<text x="
|
| 51 |
-
|
| 52 |
-
|
| 53 |
-
<tspan
|
|
|
|
| 54 |
</text>
|
| 55 |
-
</
|
| 56 |
-
</
|
| 57 |
</a>
|
| 58 |
</div>
|
| 59 |
<!-- Navigation -->
|
|
|
|
| 44 |
<!-- Logo -->
|
| 45 |
<div class="absolute top-8 left-8 z-20 group">
|
| 46 |
<a href="#">
|
| 47 |
+
<svg viewBox="0 0 120 120" class="w-20 h-20 rounded-full border border-zinc-300 group-hover:border-zinc-100 transition-all duration-300">
|
| 48 |
+
<circle cx="60" cy="60" r="58" fill="none" stroke="currentColor" stroke-width="1.5" class="text-zinc-300 group-hover:text-zinc-100 transition-colors duration-300"/>
|
| 49 |
+
<g font-family="EB Garamond" font-size="48" font-weight="500" fill="currentColor" class="text-zinc-300 group-hover:text-zinc-100 transition-colors duration-300">
|
| 50 |
+
<text x="60" y="70" text-anchor="middle" dominant-baseline="middle">S</text>
|
| 51 |
+
<path d="M72 60 L72 60" stroke="currentColor" stroke-width="2" stroke-linecap="round"/>
|
| 52 |
+
<text x="60" y="70" text-anchor="middle" dominant-baseline="middle">
|
| 53 |
+
<tspan>O</tspan>
|
| 54 |
+
<tspan x="60" y="70" stroke="currentColor" stroke-width="1">/</tspan>
|
| 55 |
</text>
|
| 56 |
+
</g>
|
| 57 |
+
</svg>
|
| 58 |
</a>
|
| 59 |
</div>
|
| 60 |
<!-- Navigation -->
|
script.js
CHANGED
|
@@ -2,28 +2,39 @@
|
|
| 2 |
document.addEventListener('DOMContentLoaded', () => {
|
| 3 |
// Animate the logo on hover
|
| 4 |
const logo = document.querySelector('.group');
|
|
|
|
|
|
|
|
|
|
| 5 |
logo.addEventListener('mouseenter', () => {
|
| 6 |
gsap.to(logo.querySelector('svg'), {
|
| 7 |
rotation: 360,
|
| 8 |
duration: 1.5,
|
| 9 |
ease: 'elastic.out(1, 0.5)'
|
| 10 |
});
|
| 11 |
-
gsap.to(
|
| 12 |
strokeWidth: 2.5,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 13 |
duration: 0.5,
|
| 14 |
-
|
| 15 |
});
|
| 16 |
});
|
|
|
|
| 17 |
logo.addEventListener('mouseleave', () => {
|
| 18 |
gsap.to(logo.querySelector('svg'), {
|
| 19 |
rotation: 0,
|
| 20 |
duration: 1,
|
| 21 |
ease: 'back.out(1.7)'
|
| 22 |
});
|
| 23 |
-
gsap.to(
|
| 24 |
strokeWidth: 1.5,
|
| 25 |
-
duration: 0.5
|
| 26 |
-
|
|
|
|
|
|
|
|
|
|
| 27 |
});
|
| 28 |
});
|
| 29 |
// Smooth scrolling for anchor links
|
|
|
|
| 2 |
document.addEventListener('DOMContentLoaded', () => {
|
| 3 |
// Animate the logo on hover
|
| 4 |
const logo = document.querySelector('.group');
|
| 5 |
+
const logoCircle = logo.querySelector('circle');
|
| 6 |
+
const logoText = logo.querySelector('g');
|
| 7 |
+
|
| 8 |
logo.addEventListener('mouseenter', () => {
|
| 9 |
gsap.to(logo.querySelector('svg'), {
|
| 10 |
rotation: 360,
|
| 11 |
duration: 1.5,
|
| 12 |
ease: 'elastic.out(1, 0.5)'
|
| 13 |
});
|
| 14 |
+
gsap.to(logoCircle, {
|
| 15 |
strokeWidth: 2.5,
|
| 16 |
+
duration: 0.5
|
| 17 |
+
});
|
| 18 |
+
gsap.to(logoText, {
|
| 19 |
+
scale: 1.1,
|
| 20 |
duration: 0.5,
|
| 21 |
+
transformOrigin: 'center center'
|
| 22 |
});
|
| 23 |
});
|
| 24 |
+
|
| 25 |
logo.addEventListener('mouseleave', () => {
|
| 26 |
gsap.to(logo.querySelector('svg'), {
|
| 27 |
rotation: 0,
|
| 28 |
duration: 1,
|
| 29 |
ease: 'back.out(1.7)'
|
| 30 |
});
|
| 31 |
+
gsap.to(logoCircle, {
|
| 32 |
strokeWidth: 1.5,
|
| 33 |
+
duration: 0.5
|
| 34 |
+
});
|
| 35 |
+
gsap.to(logoText, {
|
| 36 |
+
scale: 1,
|
| 37 |
+
duration: 0.5
|
| 38 |
});
|
| 39 |
});
|
| 40 |
// Smooth scrolling for anchor links
|
style.css
CHANGED
|
@@ -1,13 +1,12 @@
|
|
| 1 |
|
| 2 |
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700;1,800&family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
|
| 3 |
-
|
| 4 |
body {
|
| 5 |
-
font-family: '
|
| 6 |
-
font-weight:
|
| 7 |
-
line-height: 1.
|
| 8 |
-
letter-spacing: 0.
|
|
|
|
| 9 |
}
|
| 10 |
-
|
| 11 |
h1, h2, h3, h4, h5, h6 {
|
| 12 |
font-family: 'Cormorant Garamond', serif;
|
| 13 |
font-weight: 500;
|
|
|
|
| 1 |
|
| 2 |
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,500;1,600;1,700&family=EB+Garamond:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700;1,800&family=Montserrat:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
|
|
|
|
| 3 |
body {
|
| 4 |
+
font-family: 'EB Garamond', serif;
|
| 5 |
+
font-weight: 400;
|
| 6 |
+
line-height: 1.7;
|
| 7 |
+
letter-spacing: 0.3px;
|
| 8 |
+
font-size: 1.125rem;
|
| 9 |
}
|
|
|
|
| 10 |
h1, h2, h3, h4, h5, h6 {
|
| 11 |
font-family: 'Cormorant Garamond', serif;
|
| 12 |
font-weight: 500;
|