From 00f3ad4c49dcad5d731ccb60f119d6b03113080f Mon Sep 17 00:00:00 2001 From: gitduk Date: Fri, 7 Jul 2023 16:12:41 +0800 Subject: [PATCH 1/2] =?UTF-8?q?fix:=20=E9=A1=B5=E9=9D=A2=E6=BB=9A=E5=8A=A8?= =?UTF-8?q?=E5=88=B0=E9=A1=B6=E7=AB=AF=20nav=20=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=20fix:=20=E5=A4=96=E9=93=BE=E5=9B=BE=E7=89=87=E6=97=A0?= =?UTF-8?q?=E6=B3=95=E6=AD=A3=E5=B8=B8=E6=98=BE=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/_partial/head.ejs | 1 + source/js/main.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/layout/_partial/head.ejs b/layout/_partial/head.ejs index 91806da5a..c80e06681 100644 --- a/layout/_partial/head.ejs +++ b/layout/_partial/head.ejs @@ -4,6 +4,7 @@ + <%- open_graph({ image: thumbnail(page), fb_app_id: theme.open_graph.fb_app_id, diff --git a/source/js/main.js b/source/js/main.js index 666906b68..22cf7f2f4 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -59,7 +59,7 @@ $(document).ready(function() { var topDistance = menu.offset().top; // hide only the navigation links on desktop - if (!nav.is(":visible") && topDistance < 50) { + if (!nav.is(":visible") && topDistance < 100) { nav.show(); } else if (nav.is(":visible") && topDistance > 100) { nav.hide(); From 0d28508e3a73b518476707b29f35d18f13e18f91 Mon Sep 17 00:00:00 2001 From: gitduk Date: Fri, 7 Jul 2023 16:23:22 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix:=20=E7=82=B9=E5=87=BB=20menu=20?= =?UTF-8?q?=E6=8C=89=E9=92=AE=EF=BC=8Cnav=20=E4=B8=8D=E6=98=BE=E7=A4=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98=20fix:=20=E9=83=A8=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=BB=9A=E5=8A=A8=E5=88=B0=E9=A1=B6=E7=AB=AF=20nav=20?= =?UTF-8?q?=E4=B8=8D=E6=98=BE=E7=A4=BA=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- source/js/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/js/main.js b/source/js/main.js index 22cf7f2f4..2818e9a42 100644 --- a/source/js/main.js +++ b/source/js/main.js @@ -43,6 +43,7 @@ $(document).ready(function() { menuIcon.click(function() { if (menu.is(":hidden")) { menu.show(); + nav.show(); menuIcon.addClass("active"); } else { menu.hide(); @@ -56,7 +57,8 @@ $(document).ready(function() { */ if (menu.length) { $(window).on("scroll", function() { - var topDistance = menu.offset().top; + /* var topDistance = menu.offset().top; */ + var topDistance = $(window).scrollTop(); // hide only the navigation links on desktop if (!nav.is(":visible") && topDistance < 100) {