From a33e7e1d89c1f6b73a76fe8ee6d339b64835a2f8 Mon Sep 17 00:00:00 2001 From: Jerry Date: Thu, 7 Nov 2019 01:23:29 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E4=BF=AE=E5=BE=A9gitalk=E5=A0=B1path.star?= =?UTF-8?q?tsWith=20is=20not=20a=20function=E7=9A=84bug=20#66=202.=20?= =?UTF-8?q?=E4=BF=AE=E5=BE=A9=E5=9C=A8=E5=B1=8F=E5=B9=95=E7=B8=AE=E6=94=BE?= =?UTF-8?q?=E5=AD=97=E9=AB=94=E5=A4=A7=E5=B0=8F=E8=80=8C=E5=B0=8E=E8=87=B4?= =?UTF-8?q?menu=E8=AE=8A=E7=88=B2sidebar=E6=A8=A1=E5=BC=8F=E7=9A=84bug=20#?= =?UTF-8?q?64=203.=20just-gallery=E5=A2=9E=E5=8A=A0=E4=B8=8A=E4=B8=8B?= =?UTF-8?q?=E9=82=8A=E8=B7=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/includes/head.pug | 2 +- source/css/_global/index.styl | 2 ++ source/css/_layout/sidebar.styl | 2 +- source/js/main.js | 11 +++++------ 4 files changed, 9 insertions(+), 8 deletions(-) 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()