Skip to content

Commit 6df33b6

Browse files
committed
chore: add navbar animation and fix article footer size
1 parent 6e2b1d0 commit 6df33b6

6 files changed

Lines changed: 78 additions & 3 deletions

File tree

src/components/Heading/Heading.module.scss

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
@keyframes drawRedLine {
2+
from {
3+
clip-path: inset(0 100% 0 0);
4+
}
5+
6+
to {
7+
clip-path: inset(0 0% 0 0);
8+
}
9+
}
10+
111
.headingAndUnderline {
212
.headingWrapper {
313
.heading {
@@ -51,10 +61,17 @@
5161
}
5262
}
5363

54-
.underline,
64+
.underline {
65+
width: 100%;
66+
padding: 16px 0 24px 0;
67+
}
68+
5569
.redUnderline {
5670
width: 100%;
5771
padding: 16px 0 24px 0;
72+
animation: drawRedLine 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
73+
animation-delay: 0.1s;
74+
clip-path: inset(0 100% 0 0);
5875
}
5976

6077
.left {

src/components/longevity/LongevitySubSection/LongevitySubSection.module.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
@import '@styles/fonts.scss';
22

3+
@keyframes drawRedLine {
4+
from {
5+
clip-path: inset(0 100% 0 0);
6+
}
7+
8+
to {
9+
clip-path: inset(0 0% 0 0);
10+
}
11+
}
12+
313
.subSection {
414
max-width: 948px;
515
padding-bottom: 40px;
@@ -55,6 +65,9 @@
5565
background-image: url('/keepsimple_/assets/longevity/red-short-line.png');
5666
background-size: contain;
5767
background-repeat: no-repeat;
68+
clip-path: inset(0 100% 0 0);
69+
animation: drawRedLine 1.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
70+
animation-delay: 0.2s;
5871
}
5972
}
6073

@@ -204,6 +217,7 @@
204217
}
205218
}
206219
}
220+
207221
.whyDoThisMobileModal {
208222
display: flex;
209223
flex-direction: column;
@@ -216,9 +230,11 @@
216230
0% {
217231
filter: drop-shadow(0px 0px 18px rgba(53, 35, 13, 0.2));
218232
}
233+
219234
70% {
220235
filter: drop-shadow(0px 0px 18px rgba(255, 0, 0, 0.8));
221236
}
237+
222238
100% {
223239
filter: drop-shadow(0px 0px 18px rgba(53, 35, 13, 0.2));
224240
}

src/components/longevity/Navigation/Navigation.module.scss

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,26 @@
2222

2323
&:hover {
2424
cursor: pointer;
25+
}
26+
}
27+
28+
.item {
29+
position: relative;
30+
31+
&::after {
32+
content: '';
33+
position: absolute;
34+
inset: 0;
2535
background-image: url('/keepsimple_/assets/longevity/navbar-borders.svg');
2636
background-color: #fff;
37+
background-repeat: no-repeat;
38+
background-size: cover;
39+
opacity: 0;
40+
transition: opacity 200ms ease;
41+
}
42+
43+
&:hover::after {
44+
opacity: 1;
2745
}
2846
}
2947

@@ -51,6 +69,11 @@
5169
cursor: pointer;
5270
background-image: url('/keepsimple_/assets/longevity/nav-hover-bg.png');
5371
background-size: cover;
72+
73+
&::after {
74+
display: none;
75+
}
76+
5477
.subLink,
5578
.link {
5679
color: #fff;
@@ -64,7 +87,6 @@
6487

6588
&:hover {
6689
cursor: pointer;
67-
6890
background-image: url('/keepsimple_/assets/longevity/nav-hover-bg.png');
6991
}
7092
}
@@ -128,10 +150,12 @@
128150
justify-content: center;
129151
align-items: center;
130152
gap: 4px;
153+
transition: color 200ms ease;
131154

132155
svg {
133156
path {
134157
fill: #bdbdbd;
158+
transition: fill 200ms ease;
135159
}
136160
}
137161
}

src/layouts/ArticleLayout/ArticleLayout.module.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@
6363
@media (max-width: 960px) {
6464
.footerImage {
6565
height: 50px;
66+
width: 100%;
6667
}
6768
.main {
6869
display: block;

src/layouts/ArticleLayout/ArticleLayout.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ const ArticleLayout: FC<ArticleLayoutProps> = ({ children }) => {
3030
height={314}
3131
className={styles.coverImage}
3232
width={1920}
33-
// unoptimized
3433
priority
3534
/>
3635
)}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,21 @@
11
.section {
22
background-color: #ffffff;
3+
4+
.coverImage,
5+
.footerImage {
6+
width: 100%;
7+
object-position: center;
8+
object-fit: cover;
9+
}
10+
11+
.footerImage {
12+
margin-top: 64px;
13+
}
14+
}
15+
16+
@media (max-width: 960px) {
17+
.footerImage {
18+
height: 50px;
19+
width: 100%;
20+
}
321
}

0 commit comments

Comments
 (0)