From fd78df33e432078a53b94f027af8ef0206849905 Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Mon, 10 Oct 2022 15:53:52 +0200 Subject: [PATCH] feat: new home page --- src/assets/home/line.svg | 6 ++ src/assets/home/logo.svg | 17 ++++ src/components/Home.vue | 203 ++++++++++++++++++++++++++++++++++++--- 3 files changed, 212 insertions(+), 14 deletions(-) create mode 100644 src/assets/home/line.svg create mode 100644 src/assets/home/logo.svg diff --git a/src/assets/home/line.svg b/src/assets/home/line.svg new file mode 100644 index 0000000..ec570e4 --- /dev/null +++ b/src/assets/home/line.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/assets/home/logo.svg b/src/assets/home/logo.svg new file mode 100644 index 0000000..fa13dc4 --- /dev/null +++ b/src/assets/home/logo.svg @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/src/components/Home.vue b/src/components/Home.vue index b78a46b..13aad30 100644 --- a/src/components/Home.vue +++ b/src/components/Home.vue @@ -1,13 +1,38 @@ @@ -31,18 +56,165 @@ $width: 100vw; $height: 100vh; + $logo-size: 8rem; + + $scroll-btn-top: 10rem; + $scroll-btn-size: 5rem; + $wave-height: 6.3rem; #home { + display: grid; position: relative; - top: 0; - left: 0; - width: $width; - height: $height; + top: 0; + left: 0; + width: $width; + min-height: $height; background: #202228; + + grid-template-columns: 1fr #{$logo-size} 1fr; + grid-template-rows: min-content $logo-size auto $scroll-btn-top; + align-items: center; } + .contact { + grid-column: 1 / 4; + grid-row: 1; + + display: flex; + position: relative; + + margin: 1em 0; + + flex-flow: row nowrap; + justify-content: space-around; + + color: #9ea6b3; + font-size: 1.2em; + font-weight: 400; + } + + + .logo { + grid-column: 2; + grid-row: 2; + + height: $logo-size; + } + + .name { + grid-column: 1; + grid-row: 3; + + display: block; + position: relative; + + margin-top: 3em; + margin-right: 5em; + margin-left: auto; + margin-bottom: auto; + + color: #fff; + text-align: right; + + h1 { font-size: 7em; font-weight: 800; line-height: 1em; } + h2 { font-size: 2.5em; font-weight: 400; white-space: nowrap; } + } + + .separator { + grid-column: 2; + grid-row: 3; + + width: $logo-size; + height: 100%; + + background: url('../assets/home/line.svg'); + background-repeat: no-repeat; + background-position: 0 0; + background-size: 100% auto; + } + + .readme { + grid-column: 3; + grid-row: 3; + + display: block; + position: relative; + width: auto; + max-width: 80rem; + height: auto; + + margin: 0 5em; + margin-left: calc( 5em - #{$logo-size}/2 ); + margin-top: 3em; + margin-bottom: auto; + + font-size: 1.5em; + font-family: 'Fira Code'; + font-weight: 400; + + background: #202228; + border: .15rem solid #323841; + border-radius: .4rem / .4rem; + + .header { + font-size: 1em; + text-align: center; + + padding: .3em; + + color: #b5bac4ff; + background: #2a2e36; + + border-bottom: .15rem solid #323841; + } + + p { + color: #fff; + margin: 1em; + line-height: 1.5em; + + // offset to the right and inverse indent the first line for the + // ::before (> arrow) to always be on the left + margin-left: calc( 1em + 1.2em ); + text-indent: -1.2em; + + u { + display: inline; + position: relative; + + text-decoration: none; + + &:after { + content: ''; + + display: inline-block; + position: absolute; + top: 60%; + left: -.2em; + width: calc( 100% + 2*.2em ); + height: 30%; + + background: #6553d0; + + z-index: -1; + } + + z-index: 10; + } + + &:before { + content: '> '; + + color: #6553d0; + font-weight: 700; + } + } + + } + + @keyframes wave-x { from{ background-position-x: 1px; } to{ background-position-x: 100vw; } @@ -56,7 +228,7 @@ .wave { display: block; position: absolute; - top: calc( #{$height*1.001} - #{$wave-height} ); + top: calc( 100% * 1.005 - #{$wave-height} ); left: 0; width: 100vw; height: $wave-height; @@ -73,20 +245,23 @@ animation: 20s ease-in-out wave-x infinite alternate-reverse; } - z-index: 900; + z-index: 200; } - $scroll-btn-size: 5rem; .scroll-arrow { + grid-column: 2; + grid-row: 4; + align-self: start; + display: flex; - position: absolute; - top: calc( 100% - #{1.5*$wave-height} ); - left: calc( 50% - #{$scroll-btn-size/2} ); + position: relative; width: $scroll-btn-size; height: $scroll-btn-size; - opacity: .7; + margin: 0 auto; + + opacity: .9; background: #fff; border-radius: 50% / 50%; @@ -108,7 +283,7 @@ } &:hover { - opacity: .9; + opacity: 1; } }