I want to make the sidebar on my website only visible on large screen devices, and to be hidden by default in small and medium size devices and make a button to show it, I want the same behavior of this site : https://colorlib.com/preview/theme/elen/index.html
I've make this code :
HTML :
<template>
<div id="app">
<div class="main-container">
<div class="side-panel">
<div class="side-panel bg-golden h-100">
<div class="container h-100">
<div class="row h-100 pt-5 justify-content-center align-items-center">
<div class="col-12 text-center text-secondary">
<h5>AYMAN TARIG</h5>
<ul class="list-group pt-5 pb-4">
<li class="list-group-item bg-transparent">HOME</li>
<li class="list-group-item bg-transparent">ABOUT</li>
<li class="list-group-item bg-transparent">ARTICLES</li>
<li class="list-group-item bg-transparent">CONTACT</li>
</ul>
<div id="footer">
<h6 class="pt-5">Copyright ©2019 All rights reserved | Ayman Tarig</h6>
<h6 class="pt-4">
<i class="fab fa-facebook-f p-2"></i>
<i class="fab fa-google-plus-g p-2"></i>
</h6>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="content">
<div id="background" class="h-100">
<div class="container p-5 h-100">
<div class="row h-100 justify-content-center align-items-center">
<div class="col-12">
<h3 class="text-center text-dark pt-4">AYMAN TARIG</h3>
<h6
class="text-center text-secondary pb-4"
>Lorem ipsum dolor, sit amet consectetur adipisicing elit. Accusantium, voluptatem sit? Nihil architecto deserunt, consequuntur distinctio expedita molestiae a, provident eos tenetur nostrum odit. Minus optio veritatis tenetur iure eos, officia dolorem sit obcaecati aliquam, ipsum beatae atque. Dolor, deleniti!</h6>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
CSS :
<style scoped>
.main-container {
display: flex;
align-items: stretch;
min-height: 100vh;
}
h1 {
text-decoration: underline #3a3939;
}
#background {
background: url("./imgs/80911.jpg");
background-size: cover;
}
h2 > i {
cursor: pointer;
}
.side-panel {
position: fixed;
height: 100vh;
width: 25%;
}
ul {
list-style: none;
}
li:hover {
background-color: #eeeeee !important;
color: #02131f !important;
}
i:hover {
color: #ffffff;
}
.bg-golden {
background-color: #02131f;
}
.content {
width: 100%;
margin-left: 25%;
}
@media (max-width: 540px) {
.main-container {
display: block;
flex-wrap: wrap;
}
.content {
width: 100%;
margin-left: 0;
}
.side-panel {
position: static;
width: 100%;
min-height: 250px;
height: auto;
}
#footer {
display: none;
}
}
</style>
Can anyone help me to change my code and achievement