From b5db23185fc794a861a2db02b9f1b1d26a93bbfa Mon Sep 17 00:00:00 2001 From: "E. Almqvist" Date: Thu, 17 Mar 2022 10:32:59 +0100 Subject: [PATCH] Stuff --- src/public/js/sticky.js | 12 ------------ src/views/index.slim | 10 ++++++++-- src/views/layout.slim | 1 - src/views/stylesheets/style.sass | 13 ++++++++++++- 4 files changed, 20 insertions(+), 16 deletions(-) delete mode 100644 src/public/js/sticky.js diff --git a/src/public/js/sticky.js b/src/public/js/sticky.js deleted file mode 100644 index ad795ea..0000000 --- a/src/public/js/sticky.js +++ /dev/null @@ -1,12 +0,0 @@ -window.onscroll = function() {toggleStickyHeader()}; - -var header = document.querySelector("header"); -var sticky = header.offsetTop; - -function toggleStickyHeader() { - if (window.pageYOffset > sticky) { - header.classList.add("sticky"); - } else { - header.classList.remove("sticky"); - } -} diff --git a/src/views/index.slim b/src/views/index.slim index 3e2ba99..40c874a 100644 --- a/src/views/index.slim +++ b/src/views/index.slim @@ -1,2 +1,8 @@ -h1.tcenter The Auction House -p.tcenter = "I use Arch btw " * 5 +article + h1.tcenter The Auction House + p.tcenter + | Welcome to the Auction House! With our convenient online auction platform, you can easily browse through listings and find great deals on everything from clothes to electronics. + +article + h2.tcenter Stuff + a href="/" = "jahiofhsoifhio" diff --git a/src/views/layout.slim b/src/views/layout.slim index 460bd3a..ef7fa3d 100644 --- a/src/views/layout.slim +++ b/src/views/layout.slim @@ -30,4 +30,3 @@ html lang="en" .content-container ==yield - script src="/js/sticky.js" diff --git a/src/views/stylesheets/style.sass b/src/views/stylesheets/style.sass index d1ba5c2..1564905 100644 --- a/src/views/stylesheets/style.sass +++ b/src/views/stylesheets/style.sass @@ -38,6 +38,7 @@ html display: flex flex-direction: column justify-content: center + align-items: center width: auto height: 100% @@ -49,7 +50,6 @@ body header height: 48px background-color: $bg_clr - border-bottom: $border_size solid $shadow_clr padding: .1rem .8rem white-space: nowrap img.avatar @@ -64,6 +64,7 @@ header margin: 0 auto align-items: center justify-content: center + border-bottom: $border_size solid $shadow_clr #logo_container display: flex @@ -103,6 +104,16 @@ header justify-content: center margin: 0 8px +article + width: 70rem + + h1 + font-size: 2rem + + p + opacity: .7 + padding: 0 10rem + .inlbutton transition: opacity .2s