Create Header component + Add styles
This commit is contained in:
35
src/components/Header.vue
Normal file
35
src/components/Header.vue
Normal file
@@ -0,0 +1,35 @@
|
||||
<template>
|
||||
<nav class="main-nav">
|
||||
<img src="https://www.cycloid.io/themes/cycloid/images/owl_logo.png" alt="Cycloid.io" />
|
||||
<h1>Fruits</h1>
|
||||
</nav>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "Header"
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
nav {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: @secondary-color;
|
||||
padding: 0.5rem;
|
||||
box-shadow: 0 19px 34px -15px #d2d2f2;
|
||||
|
||||
&.main-nav {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: calc(58px - 0.5rem * 2);
|
||||
img {
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
margin-right: 1rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user