diff --git a/layout/includes/head.pug b/layout/includes/head.pug index 4db8966..436835b 100644 --- a/layout/includes/head.pug +++ b/layout/includes/head.pug @@ -99,7 +99,7 @@ if theme.algolia_search.enable if (theme.gitalk && theme.gitalk.enable) link(rel="stylesheet" type="text/css" href=url_for(theme.CDN.gitalk_css)) script(src=url_for(theme.CDN.gitalk)) - script(src=url_for(theme.CDN.blueimp-md5)) + script(src=url_for(theme.CDN.blueimp_md5)) if theme.baidu_analytics link(rel="dns-prefetch" href="https://hm.baidu.com") diff --git a/source/css/_global/index.styl b/source/css/_global/index.styl index e687842..b018618 100644 --- a/source/css/_global/index.styl +++ b/source/css/_global/index.styl @@ -204,6 +204,8 @@ img[src=""],img:not([src]) opacity: 0 .justified-gallery + margin: 1rem 0 + img opacity 0 .fancybox diff --git a/source/css/_layout/sidebar.styl b/source/css/_layout/sidebar.styl index 333b4af..16e17f6 100644 --- a/source/css/_layout/sidebar.styl +++ b/source/css/_layout/sidebar.styl @@ -11,7 +11,7 @@ box-shadow: -0.25rem 0 0.25rem rgba(232, 237, 250, 0.6) inset opacity: 0.9 will-change: transform - transition: transform .2s + transition: ease-in-out .2s .sidebar-toc ol, diff --git a/source/js/main.js b/source/js/main.js index 4aed215..4f574c1 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -7,14 +7,13 @@ $(function () { */ const ph_width = $("#page-header").width() const search_width = $('#search_button').outerWidth() + const blogName_width = $('#blog_name').width() var mw = 0; for (var i = 0; i < $('#page-header .menus_item').length; i++) { mw = mw + $('#page-header .menus_item').eq(i).outerWidth() } - if ($('#page-header').height() > 37 || window.innerWidth < 7) { - header_adjust() - } + $('#page-header').height() > 45 ? header_adjust() : '' function header_adjust() { $("#page-header .toggle-menu").addClass("is_visible") @@ -34,11 +33,11 @@ $(function () { function is_adjust(n) { var t; if (n == '1') { - t = $('#blog_name').width() + search_width + mw > $("#page-header").width() - 300 ? true : false + t = blogName_width + search_width + mw > $("#page-header").width() - 300 ? true : false } else if (n == '2') { - t = $('#blog_name').width() + search_width + mw > $("#page-header").width() ? true : false + t = blogName_width + search_width + mw > $("#page-header").width() ? true : false } else if (n == "3") { - t = $('#blog_name').width() + search_width + mw > $("#page-header").width() ? true : false + t = blogName_width + search_width + mw > $("#page-header").width() ? true : false } if (t) { header_adjust()