Website/js/main.js

40 lines
1.4 KiB
JavaScript
Raw Normal View History

---
layout: null
sitemap:
2025-09-17 19:20:50 +02:00
exclude: 'yes'
---
2025-09-17 19:20:50 +02:00
$(document).ready(function () {
{% if site.disable_landing_page != true %}
$('a.blog-button').click(function (e) {
if ($('.panel-cover').hasClass('panel-cover--collapsed')) return
currentWidth = $('.panel-cover').width()
if (currentWidth < 960) {
$('.panel-cover').addClass('panel-cover--collapsed')
$('.content-wrapper').addClass('animated slideInRight')
} else {
$('.panel-cover').css('max-width', currentWidth)
$('.panel-cover').animate({ 'max-width': '530px', 'width': '40%' }, 400, swing = 'swing', function () { })
}
})
if (window.location.hash && window.location.hash == '#blog') {
$('.panel-cover').addClass('panel-cover--collapsed')
}
2025-09-17 19:20:50 +02:00
if (window.location.pathname !== '{{ site.baseurl }}/' && window.location.pathname !== '{{ site.baseurl }}/index.html') {
$('.panel-cover').addClass('panel-cover--collapsed')
}
{% endif %}
2025-09-17 19:20:50 +02:00
$('.btn-mobile-menu').click(function () {
$('.navigation-wrapper').toggleClass('visible animated bounceInDown')
$('.btn-mobile-menu__icon').toggleClass('icon-list icon-x-circle animated fadeIn')
})
2025-09-17 19:20:50 +02:00
$('.navigation-wrapper .blog-button').click(function () {
$('.navigation-wrapper').toggleClass('visible')
$('.btn-mobile-menu__icon').toggleClass('icon-list icon-x-circle animated fadeIn')
})
2025-09-17 19:20:50 +02:00
})