mirror of
https://github.com/ae-utbm/sith.git
synced 2025-06-07 11:45:20 +00:00
Remove shadow and disable hovering on mobile view
This commit is contained in:
parent
f71fd40d54
commit
3173405360
@ -126,10 +126,13 @@ nav.navbar {
|
|||||||
|
|
||||||
ul.content {
|
ul.content {
|
||||||
list-style-type: none;
|
list-style-type: none;
|
||||||
box-shadow: 3px 3px 3px 0 #dfdfdf;
|
|
||||||
background: white;
|
background: white;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
|
||||||
|
@media (min-width: 500px) {
|
||||||
|
box-shadow: 3px 3px 3px 0 #dfdfdf;
|
||||||
|
}
|
||||||
|
|
||||||
>li>a {
|
>li>a {
|
||||||
display: flex;
|
display: flex;
|
||||||
padding: 15px 20px;
|
padding: 15px 20px;
|
||||||
|
@ -123,12 +123,19 @@
|
|||||||
{% block script %}
|
{% block script %}
|
||||||
<script>
|
<script>
|
||||||
const menuItems = document.querySelectorAll(".navbar details[name='navbar'].menu");
|
const menuItems = document.querySelectorAll(".navbar details[name='navbar'].menu");
|
||||||
|
const isMobile = () => {
|
||||||
|
return window.innerWidth >= 500;
|
||||||
|
}
|
||||||
for (const item of menuItems){
|
for (const item of menuItems){
|
||||||
item.addEventListener("mouseover", () => {
|
item.addEventListener("mouseover", () => {
|
||||||
item.setAttribute("open", "");
|
if (isMobile()){
|
||||||
|
item.setAttribute("open", "");
|
||||||
|
}
|
||||||
})
|
})
|
||||||
item.addEventListener("mouseout", () => {
|
item.addEventListener("mouseout", () => {
|
||||||
item.removeAttribute("open");
|
if (isMobile()){
|
||||||
|
item.removeAttribute("open");
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user