Move to Page based design
This commit is contained in:
parent
4fde39a50b
commit
5370e2e6c3
9 changed files with 694 additions and 315 deletions
|
|
@ -1,51 +1,34 @@
|
|||
function toggleMobileMenu() {
|
||||
$('.navigation-wrapper').toggleClass('visible');
|
||||
$('.btn-mobile-menu__icon').toggleClass('hidden');
|
||||
$('.btn-mobile-close__icon').toggleClass('hidden');
|
||||
}
|
||||
$(document).ready(function () {
|
||||
|
||||
$('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 () { })
|
||||
}
|
||||
})
|
||||
|
||||
$(document).ready(function () {
|
||||
$('a.panel-button').click(function (e) {
|
||||
if ($('.content-wrapper').hasClass('showing')){
|
||||
$('.content-wrapper').removeClass('animated slideInRight')
|
||||
$('.panel-cover').removeClass('panel-cover--collapsed')
|
||||
$('.panel-cover').css('max-width', '100%')
|
||||
$('.panel-cover').animate({'width': '100%'}, 400, swing = 'swing', function () {})
|
||||
$('.content-wrapper').removeClass('showing')
|
||||
history.pushState("", document.title, window.location.pathname + window.location.search);
|
||||
//window.location.hash = '' // leaves #
|
||||
e.preventDefault();
|
||||
return;
|
||||
if (window.location.hash && window.location.hash == '#blog') {
|
||||
$('.panel-cover').addClass('panel-cover--collapsed')
|
||||
}
|
||||
|
||||
if (window.location.pathname !== '/' && window.location.pathname !== '/index.html') {
|
||||
$('.panel-cover').addClass('panel-cover--collapsed')
|
||||
}
|
||||
|
||||
$('.panel-cover').addClass('panel-cover--collapsed');
|
||||
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 () {})
|
||||
}
|
||||
$('.content-wrapper').addClass('showing');
|
||||
})
|
||||
|
||||
if (window.location.hash && window.location.hash == '#projects') {
|
||||
$('a.panel-button').click();
|
||||
}
|
||||
$('.btn-mobile-menu').click(function () {
|
||||
$('.navigation-wrapper').toggleClass('visible animated bounceInDown')
|
||||
$('.btn-mobile-menu__icon').toggleClass('icon-list icon-x-circle animated fadeIn')
|
||||
})
|
||||
|
||||
if (window.location.pathname !== '/' && window.location.pathname !== '/index.html') {
|
||||
$('.panel-cover').addClass('panel-cover--collapsed')
|
||||
}
|
||||
$('.navigation-wrapper .blog-button').click(function () {
|
||||
$('.navigation-wrapper').toggleClass('visible')
|
||||
$('.btn-mobile-menu__icon').toggleClass('icon-list icon-x-circle animated fadeIn')
|
||||
})
|
||||
|
||||
$('.btn-mobile-menu').click(function () {
|
||||
if (!$('.navigation-wrapper').hasClass('animated bounceInDown')){
|
||||
$('.navigation-wrapper').addClass('animated bounceInDown');
|
||||
}
|
||||
toggleMobileMenu();
|
||||
})
|
||||
|
||||
$('.navigation-wrapper .projects-button').click(function () {
|
||||
toggleMobileMenu();
|
||||
})
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue