Skip to content

Commit

Permalink
Fikser hamburgermeny
Browse files Browse the repository at this point in the history
  • Loading branch information
Vetle Hjelle committed May 2, 2024
1 parent 43c4da5 commit 3e6bc1f
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 135 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -279,4 +279,3 @@ <h3 id="contact-form-status" class="subtitle is-3"></h3>
<script src="/js/splide.min.js"></script>
<script src="/js/splide-extension-auto-scroll.min.js"></script>
<link href="/css/splide.min.css" rel="stylesheet">
<script src="/js/index.js" async="defer"></script>
2 changes: 2 additions & 0 deletions layouts/partials/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@
<meta name="twitter:description" content="We find your weaknesses before the hackers do.
Kovert thinks like the hackers, and specialize in cybersecurity testing.">
<meta name="twitter:image" content="https://kovert.no/images/logos/kovert-widescreen.png">

<script src="/js/index.js"></script>
143 changes: 9 additions & 134 deletions static/js/index.js
Original file line number Diff line number Diff line change
@@ -1,139 +1,14 @@
document.addEventListener('DOMContentLoaded', () => {
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);
document.addEventListener('DOMContentLoaded', () => {
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll('.navbar-burger'), 0);

$navbarBurgers.forEach( el => {
el.addEventListener('click', () => {
$navbarBurgers.forEach(el => {
el.addEventListener('click', () => {

const target = el.dataset.target;
const $target = document.getElementById(target);
const target = el.dataset.target;
const $target = document.getElementById(target);

el.classList.toggle('is-active');
$target.classList.toggle('is-active');
el.classList.toggle('is-active');
$target.classList.toggle('is-active');
});
});
});
});

new Splide( '#image-carousel', {
type: 'loop',
perPage: 3,
speed: 40,
arrows: false,
pagination: false,
autoScroll: {
speed: 1,
pauseOnHover: false,
pauseOnFocus: false
},

} ).mount( window.splide.Extensions );


particlesJS("particles-js", {
"particles": {
"number": {
"value": 50,
"density": {
"enable": true,
"value_area": 1000
}
},
"color": {
"value": ["#0ca438"]
},
"shape": {
"type": "circle",
"stroke": {
"width": 5,
"color": "#0ca438"
},
"polygon": {
"nb_sides": 5
},
"image": {
"src": "img/github.svg",
"width": 100,
"height": 100
}
},
"opacity": {
"value": 0.6,
"random": false,
"anim": {
"enable": false,
"speed": 1,
"opacity_min": 0.1,
"sync": false
}
},
"size": {
"value": 2,
"random": true,
"anim": {
"enable": false,
"speed": 40,
"size_min": 0.1,
"sync": false
}
},
"line_linked": {
"enable": true,
"distance": 120,
"color": "#0ca438",
"opacity": 0.2,
"width": 1.6
},
"move": {
"enable": true,
"speed": 2,
"direction": "top",
"random": false,
"straight": false,
"out_mode": "out",
"bounce": false,
"attract": {
"enable": false,
"rotateX": 600,
"rotateY": 1200
}
}
},
"interactivity": {
"detect_on": "canvas",
"events": {
"onhover": {
"enable": true,
"mode": "grab"
},
"onclick": {
"enable": false
},
"resize": true
},
"modes": {
"grab": {
"distance": 140,
"line_linked": {
"opacity": 1
}
},
"bubble": {
"distance": 400,
"size": 40,
"duration": 2,
"opacity": 8,
"speed": 3
},
"repulse": {
"distance": 200,
"duration": 0.4
},
"push": {
"particles_nb": 4
},
"remove": {
"particles_nb": 2
}
}
},
"retina_detect": true
});

0 comments on commit 3e6bc1f

Please sign in to comment.