Cleaning Header component

This commit is contained in:
2020-12-04 23:06:32 +01:00
parent f39a9a44a7
commit 872a8b6023

View File

@@ -1,36 +1,22 @@
<template> <template>
<nav id="header" class="main-nav"> <nav id="header" class="main-nav">
<router-link to="/">
<img src="https://www.cycloid.io/themes/cycloid/images/owl_logo.png" alt="Cycloid.io" /> <img src="https://www.cycloid.io/themes/cycloid/images/owl_logo.png" alt="Cycloid.io" />
<h1>Fruits</h1> <h1>Fruits</h1>
</router-link>
</nav> </nav>
</template> </template>
<script> <script>
export default { export default {
name: "Header", name: "Header"
created() {
// const header = document.getElementById("header");
// this.observeElmt(header);
},
methods: {
// observeElmt(elmt) {
// const observer = new IntersectionObserver(
// ([e]) => e.target.classList.toggle("box-shadow", e.intersectionRatio < 1),
// { threshold: [1] }
// );
// observer.observe(elmt);
// }
}
}; };
</script> </script>
<style lang="less"> <style lang="less">
nav { nav {
display: flex;
align-items: center;
background-color: @secondary-color; background-color: @secondary-color;
padding: 0.5rem; padding: 0.5rem;
// TODO: Use
box-shadow: 0 0px 14px 0px #cecece; box-shadow: 0 0px 14px 0px #cecece;
h1 { h1 {
@@ -49,6 +35,11 @@ nav {
height: calc(58px - 0.5rem * 2); height: calc(58px - 0.5rem * 2);
z-index: 15; z-index: 15;
a {
display: flex;
align-items: center;
}
img { img {
width: 35px; width: 35px;
height: 35px; height: 35px;