From 47604a2d00086620415edead37f4bdde7b3cec91 Mon Sep 17 00:00:00 2001 From: Kenneth Jao Date: Sat, 9 Nov 2024 13:02:46 +0800 Subject: [PATCH] Fixed parent directory icon and folder breadcrumb naming --- fancy-pages/css/style.css | 8 ++++---- fancy-pages/js/script.js | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fancy-pages/css/style.css b/fancy-pages/css/style.css index f9668cc..65a91bd 100644 --- a/fancy-pages/css/style.css +++ b/fancy-pages/css/style.css @@ -474,7 +474,7 @@ footer#section-footer .row { padding-left: 2.2rem; } - tbody a[href*="."]:before, tbody a[href*="/"]:before { + tbody a[href*="."]:before { background: url('../icons/file-blank.svg') left center/1.1rem no-repeat; content: ""; width: 1.5rem; @@ -515,7 +515,7 @@ footer#section-footer .row { padding-left: 3rem; } - tbody a[href*="."]:before, tbody a[href*="/"]:before { + tbody a[href*="."]:before { background: url('../icons/file-blank.svg') left center/1.1rem no-repeat; content: ""; width: 1.5rem; @@ -544,11 +544,11 @@ tbody a[href*="/"]:after { content: ""; } -tbody a[href$="/"]:before, tbody a[href*="/?"]:before { +tbody a[href$="/"]:before { background: url('../icons/folder.svg') left center/1.1rem no-repeat; } -tbody a[href$="../"]:before { +tbody a[href*="../"]:before { background: url('../icons/angle-left.svg') left center/0.6rem no-repeat; top: -0.5rem; left: 1.2em; diff --git a/fancy-pages/js/script.js b/fancy-pages/js/script.js index a8e6784..9be8db9 100644 --- a/fancy-pages/js/script.js +++ b/fancy-pages/js/script.js @@ -21,7 +21,7 @@ var TITLEIZE = false; * Underscore string's titleize. */ function titleize(str) { - return decodeURI(str).toLowerCase().replace(/(?:^|\s|-)\S/g, c => c.toUpperCase()); + return decodeURIComponent(str).toLowerCase().replace(/(?:^|\s|-)\S/g, c => c.toUpperCase()); } /** @@ -29,7 +29,7 @@ var TITLEIZE = false; * current location. */ function setTitle() { - let cleanPath = decodeURI(window.location.pathname.replace(/\/$/g, '')), + let cleanPath = decodeURIComponent(window.location.pathname.replace(/\/$/g, '')), titleText, breadcrumbHtml = '', index = 0,