Add the option to close the sidebar autopen

Fix the code font-size
Add the post view
fix runtimeshow bugs
This commit is contained in:
Jerry
2019-06-08 22:37:30 +08:00
Unverified
parent 1357f218e5
commit ee434f7dc4
16 changed files with 86 additions and 98 deletions

View File

@@ -1,32 +1,37 @@
$(function () {
if ($(".sidebar-toc__content").children().length > 0 ) {
$(".layout_post").animate({}, function () {
{
setTimeout(function () {
$('#page-header').addClass('open-sidebar')
$("#toggle-sidebar").addClass('on')
$('body').animate({
paddingLeft: 300
}, 200)
$('#sidebar').animate({}, function () {
$('#sidebar').css({
'transform': 'translateX(300px)'
},200)
})
$('#toggle-sidebar').animate({}, function () {
$('#toggle-sidebar').css({
'transform': 'rotateZ(180deg)',
'color': '#99a9bf',
'opacity': "1"
if ($('#sidebar').hasClass('auto_open')) {
if ($(".sidebar-toc__content").children().length > 0) {
$(".layout_post").animate({}, function () {
{
setTimeout(function () {
$('#page-header').addClass('open-sidebar')
$("#toggle-sidebar").addClass('on')
$('body').animate({
paddingLeft: 300
}, 200)
$('#sidebar').animate({}, function () {
$('#sidebar').css({
'transform': 'translateX(300px)'
}, 200)
})
$('#toggle-sidebar').animate({}, function () {
$('#toggle-sidebar').css({
'transform': 'rotateZ(180deg)',
'color': '#99a9bf',
'opacity': "1"
})
})
})
}, 200);
}
})
}, 200);
}
})
}
else
$("#toggle-sidebar").css("display", "none")
}
else {
$('#toggle-sidebar').css('opacity', '1')
}
else
$("#toggle-sidebar").css("display", "none")
//-------------------------------------------------------------------------------------------------------