Skip to content

Commit

Permalink
Merge branch 'Header-component-#12' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
Daan645 authored Oct 1, 2024
2 parents 20d0af0 + 140e3a7 commit 8281ec6
Show file tree
Hide file tree
Showing 6 changed files with 206 additions and 1 deletion.
166 changes: 166 additions & 0 deletions src/lib/header/Header.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
<script>
// logic goes here
</script>
<header class="header">
<div class="header-left">
<button>
<span></span>
<span></span>
<span></span>
</button>
<figure>
<img width="93px" alt="veronica logo" src="/veronica-logo.svg">
</figure>
<nav>
<ol>
<li><a href="#">Home</a></li>
<li><a href="#">Ondek</a></li>
<li><a href="#">Radio</a></li>
</ol>
</nav>
</div>
<div class="header-right">
<button class="whatsapp">
<figure>
<img width="24px" alt="whatsapp naar ons" src="/whatsapp-white-icon.svg">
</figure>
</button>
<button class="search">
<figure>
<img width="24px" alt="whatsapp naar ons" src="/whatsapp-white-icon.svg">
</figure>
</button>
</div>
</header>


<style>
.header{
padding: 0rem 0rem;
background-color: #0091ff;
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
width: 100vw;
@media only screen and (min-width: 1000px) {
justify-content: space-between;
padding: 0rem 2rem;
}
}
/* left box of the flex */
.header .header-left{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
gap: 1rem;
}
.header .header-left button{
padding: 0px;
border: none;
}
/* dropdown button */
.header .header-left button span{
height: 2px;
width: 24px;
background-color: white;
position: absolute;
}
.header .header-left button span:nth-child(1){
margin-top: -10px;
}
.header .header-left button span:nth-child(2){
margin-top: -2px;
}
.header .header-left button span:nth-child(3){
margin-top: 6px;
}
/* navigation menu */
.header .header-left > button, nav{
display: none;
/* on large screen */
@media only screen and (min-width: 1000px) {
display: block;
}
}
.header .header-left ol{
display: flex;
flex-direction: row;
gap: 2rem;
padding-inline-start: 0px;
}
.header .header-left ol li{
list-style-type: none;
}
.header .header-left ol li > a{
text-decoration: none;
color: white;
font-size: 1em;
text-transform: uppercase;
}
.header .header-left ol li > a:hover{
text-decoration: 2px underline white;
text-underline-offset: 0.25rem;
color: white;
font-size: 1em;
}
/* right box of the flex */
.header .header-right{
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
/* mobile whatsapp button */
.header .header-right .whatsapp{
padding: 0px;
background-color: #0091ff;
border: none;
right: 1rem;
position: absolute;
}
.header .header-right figure{
margin: 1rem;
/* on large screen */
@media only screen and (min-width: 1000px) {
display: none;
}
}
/* desktop search button whatsapp button */
.header .header-right .search{
display: none;
@media only screen and (min-width: 1000px) {
display: block;
padding: 0px;
background-color: #0091ff;
border: none;
}
}
.header .header-right .search figure{
display: none;
/* on large screen */
@media only screen and (min-width: 1000px) {
display: block;
margin-right: 4rem;
}
}
</style>
6 changes: 6 additions & 0 deletions src/routes/+layout.svelte
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<script>
import Header from "../lib/header/Header.svelte";
</script>
<Header>
</Header>
<slot></slot>
1 change: 1 addition & 0 deletions src/routes/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@
<h1>lose-your-head-the-client-case</h1>

</main>

1 change: 0 additions & 1 deletion static/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,6 @@ main,
section,
article {
container-type: initial;
}

/* Voorbeeld CSS media gebruik */

Expand Down
32 changes: 32 additions & 0 deletions static/veronica-logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions static/whatsapp-white-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 8281ec6

Please sign in to comment.