docs: remove header animation

This makes the header a fixed height without animation.

Signed-off-by: Andrew Rynhard <andrew@andrewrynhard.com>
This commit is contained in:
Andrew Rynhard
2019-10-22 00:54:57 +00:00
parent 7f6fdc3e6f
commit 12c650457e
3 changed files with 4 additions and 33 deletions

View File

@@ -48,7 +48,6 @@ nav[aria-label='main'] {
}
header {
@apply sticky top-0;
transition: height 0.3s;
}
nav[aria-label='main'] .tnd-Nav__item a {
@@ -56,17 +55,13 @@ nav[aria-label='main'] {
}
}
header#header img#header-logo {
transition: all 0.3s;
}
header#header.scrolled img#header-logo {
width: 150px;
#header-logo {
height: 70px;
}
header {
@apply font-headings;
font-size: 20px;
font-size: 18px;
}
.dropdown-menu {

View File

@@ -21,7 +21,6 @@
<style>
footer {
@apply bg-white flex flex-col items-center font-sans justify-between py-5;
z-index: 99;
}
footer a {

View File

@@ -1,6 +1,6 @@
<template>
<header id="header" class="flex">
<div class="flex items-center justify-start max-w-6xl mx-auto py-6">
<div class="flex items-center justify-start max-w-6xl mx-auto py-2">
<Logo></Logo>
</div>
<div class="flex items-center justify-end max-w-6xl mx-auto py-6">
@@ -32,29 +32,6 @@ export default {
components: {
Logo,
CommunityDropdown
},
mounted() {
window.addEventListener('scroll', this.handleScroll)
},
destroyed() {
window.removeEventListener('scroll', this.handleScroll)
},
methods: {
handleScroll() {
const distanceY = window.pageYOffset || document.documentElement.scrollTop
const shrinkOn = 240
const shrinkOff = 140
const headerEl = document.getElementById('header')
if (distanceY > shrinkOn) {
headerEl.classList.add('scrolled')
} else if (distanceY < shrinkOff) {
headerEl.classList.remove('scrolled')
}
}
}
}
</script>