mirror of
https://github.com/jerryc127/hexo-theme-butterfly.git
synced 2026-04-16 18:40:53 +08:00
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:
@@ -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")
|
||||
|
||||
|
||||
//-------------------------------------------------------------------------------------------------------
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
function show_date_time(){
|
||||
// get user config
|
||||
var start_date = document.getElementById("runtionshow").getAttribute("start_date")
|
||||
|
||||
function show_date_time() {
|
||||
window.setTimeout("show_date_time()", 1000);
|
||||
BirthDay=new Date("6/7/2018 00:00:00");//這個日期是可以修改的
|
||||
BirthDay=new Date(start_date);//這個日期是可以修改的
|
||||
today=new Date();
|
||||
timeold=(today.getTime()-BirthDay.getTime());//其實僅僅改了這裏
|
||||
// sectimeold=timeold/1000
|
||||
|
||||
Reference in New Issue
Block a user