diff --git a/src/_includes/layouts/primary.njk b/src/_includes/layouts/primary.njk index ffdbd01..ef7a994 100644 --- a/src/_includes/layouts/primary.njk +++ b/src/_includes/layouts/primary.njk @@ -20,7 +20,7 @@ {% include 'components/nav.njk' %} - {% include 'sections/header.njk' %} + {% include 'sections/hero.njk' %} {{ content | safe }} diff --git a/src/_includes/sections/header.njk b/src/_includes/sections/hero.njk similarity index 98% rename from src/_includes/sections/header.njk rename to src/_includes/sections/hero.njk index 2ab4d47..2caacf7 100644 --- a/src/_includes/sections/header.njk +++ b/src/_includes/sections/hero.njk @@ -1,4 +1,4 @@ -
+
@@ -135,7 +135,7 @@ -
+
diff --git a/src/assets/scss/modules/_header.scss b/src/assets/scss/modules/_header.scss index 644ba12..89ba20b 100644 --- a/src/assets/scss/modules/_header.scss +++ b/src/assets/scss/modules/_header.scss @@ -1,27 +1,4 @@ .header { - overflow: hidden; - display: flex; - isolation: isolate; - align-items: center; - justify-content: center; - max-height: 50em; - flex-direction: column; - background-color: var(--clr-background); - z-index: 3; - position: relative; - - .decoration { - position: absolute; - width: 100%; - height: 100%; - user-select: none; - pointer-events: none; - - .relative { - position: relative; - } - } - &_article { all: unset; position: relative; @@ -41,32 +18,4 @@ height: auto; } } - - &-svg { - &_bottom { - z-index: -1; - position: absolute; - bottom: 0; - left: 0; - width: 100%; - overflow: hidden; - line-height: 0; - transform: rotate(180deg); - - svg { - position: relative; - display: block; - width: calc(100% + 0.08125rem); - height: 9.375rem; - - @include breakpoint-down("small") { - height: 3.125rem; - } - } - - .shape-fill { - fill: var(--clr-background-900); - } - } - } } diff --git a/src/assets/scss/modules/component/_hero.scss b/src/assets/scss/modules/component/_hero.scss new file mode 100644 index 0000000..a5252f3 --- /dev/null +++ b/src/assets/scss/modules/component/_hero.scss @@ -0,0 +1,52 @@ +.hero { + overflow: hidden; + display: flex; + isolation: isolate; + align-items: center; + justify-content: center; + max-height: 50em; + flex-direction: column; + background-color: var(--clr-background); + z-index: 3; + position: relative; + + .decoration { + position: absolute; + width: 100%; + height: 100%; + user-select: none; + pointer-events: none; + + .relative { + position: relative; + } + } + + &-svg { + &_bottom { + z-index: -1; + position: absolute; + bottom: 0; + left: 0; + width: 100%; + overflow: hidden; + line-height: 0; + transform: rotate(180deg); + + svg { + position: relative; + display: block; + width: calc(100% + 0.08125rem); + height: 9.375rem; + + @include breakpoint-down("small") { + height: 3.125rem; + } + } + + .shape-fill { + fill: var(--clr-background-900); + } + } + } +} diff --git a/src/assets/scss/style.scss b/src/assets/scss/style.scss index 0d2e267..2f0c8d8 100644 --- a/src/assets/scss/style.scss +++ b/src/assets/scss/style.scss @@ -14,6 +14,7 @@ @import "./modules/component/preload"; @import "./modules/component/aboutme"; +@import "./modules/component/hero"; @import "./modules/component/featured"; @import "./modules/component/post"; @import "./modules/component/article";