Skip to content

Commit 5c15405

Browse files
authored
rename: header — to hero section (#70)
rename: `header` — to hero section
2 parents 02c8a9c + e6ea702 commit 5c15405

File tree

5 files changed

+56
-54
lines changed

5 files changed

+56
-54
lines changed

src/_includes/layouts/primary.njk

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
{% include 'components/nav.njk' %}
2222

23-
{% include 'sections/header.njk' %}
23+
{% include 'sections/hero.njk' %}
2424

2525
{{ content | safe }}
2626

src/_includes/sections/header.njk renamed to src/_includes/sections/hero.njk

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<header class="header">
1+
<header class="hero">
22
<div class="decoration">
33
<div class="relative"></div>
44
</div>
@@ -135,7 +135,7 @@
135135
<img src="/images/top-header-image.png" alt="">
136136
</section>
137137
</section>
138-
<div class="header-svg_bottom">
138+
<div class="hero-svg_bottom">
139139
<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none">
140140
<path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25" class="shape-fill"></path>
141141
<path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5" class="shape-fill"></path>

src/assets/scss/modules/_header.scss

-51
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,4 @@
11
.header {
2-
overflow: hidden;
3-
display: flex;
4-
isolation: isolate;
5-
align-items: center;
6-
justify-content: center;
7-
max-height: 50em;
8-
flex-direction: column;
9-
background-color: var(--clr-background);
10-
z-index: 3;
11-
position: relative;
12-
13-
.decoration {
14-
position: absolute;
15-
width: 100%;
16-
height: 100%;
17-
user-select: none;
18-
pointer-events: none;
19-
20-
.relative {
21-
position: relative;
22-
}
23-
}
24-
252
&_article {
263
all: unset;
274
position: relative;
@@ -41,32 +18,4 @@
4118
height: auto;
4219
}
4320
}
44-
45-
&-svg {
46-
&_bottom {
47-
z-index: -1;
48-
position: absolute;
49-
bottom: 0;
50-
left: 0;
51-
width: 100%;
52-
overflow: hidden;
53-
line-height: 0;
54-
transform: rotate(180deg);
55-
56-
svg {
57-
position: relative;
58-
display: block;
59-
width: calc(100% + 0.08125rem);
60-
height: 9.375rem;
61-
62-
@include breakpoint-down("small") {
63-
height: 3.125rem;
64-
}
65-
}
66-
67-
.shape-fill {
68-
fill: var(--clr-background-900);
69-
}
70-
}
71-
}
7221
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
.hero {
2+
overflow: hidden;
3+
display: flex;
4+
isolation: isolate;
5+
align-items: center;
6+
justify-content: center;
7+
max-height: 50em;
8+
flex-direction: column;
9+
background-color: var(--clr-background);
10+
z-index: 3;
11+
position: relative;
12+
13+
.decoration {
14+
position: absolute;
15+
width: 100%;
16+
height: 100%;
17+
user-select: none;
18+
pointer-events: none;
19+
20+
.relative {
21+
position: relative;
22+
}
23+
}
24+
25+
&-svg {
26+
&_bottom {
27+
z-index: -1;
28+
position: absolute;
29+
bottom: 0;
30+
left: 0;
31+
width: 100%;
32+
overflow: hidden;
33+
line-height: 0;
34+
transform: rotate(180deg);
35+
36+
svg {
37+
position: relative;
38+
display: block;
39+
width: calc(100% + 0.08125rem);
40+
height: 9.375rem;
41+
42+
@include breakpoint-down("small") {
43+
height: 3.125rem;
44+
}
45+
}
46+
47+
.shape-fill {
48+
fill: var(--clr-background-900);
49+
}
50+
}
51+
}
52+
}

src/assets/scss/style.scss

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
@import "./modules/component/preload";
1515

1616
@import "./modules/component/aboutme";
17+
@import "./modules/component/hero";
1718
@import "./modules/component/featured";
1819
@import "./modules/component/post";
1920
@import "./modules/component/article";

0 commit comments

Comments
 (0)