From 4db531acd90744b1f4949744689540307a53e5dc Mon Sep 17 00:00:00 2001 From: wongcw Date: Tue, 23 Aug 2022 17:13:26 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dissue=E5=86=85=E7=9A=84?= =?UTF-8?q?=E5=8E=86=E5=8F=B2=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改自定义README --- README.md | 16 +++------------- footer.html | 4 ++-- header.html | 2 +- js/history.js | 6 +++--- 4 files changed, 9 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index 7aa8f55..5c718d4 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,11 @@ -NGINX FancyIndex Theme +NGINX 文件服务器自定义主题 === -A prettier theme for nginx' fancyindex module. Further details about this excellent -module can be found at the dev's [github page](https://github.com/aperezdc/ngx-fancyindex). +原主题作者:[github](https://github.com/TheInsomniac/Nginx-Fancyindex-Theme) -####NOTE: -NGX-FANCYINDEX truncates the file name to 50 characters subtracts 3 and then -appends a "..>" to the truncated name. This can be fixed by recompiling -NGX-FANCYINDEX after changing line 55 of "ngx_http_fancyindex_module.c": +插件详见:[github page](https://github.com/aperezdc/ngx-fancyindex). -From: - #define NGX_HTTP_FANCYINDEX_NAME_LEN 50 - -To: - - #define NGX_HTTP_FANCYINDEX_NAME_LEN 500 (or some other number greater than 50) #####Usage: - Compile nginx with the fancyindex module. diff --git a/footer.html b/footer.html index 5d0c4ce..80b3c28 100644 --- a/footer.html +++ b/footer.html @@ -1,12 +1,12 @@ diff --git a/js/history.js b/js/history.js index 6818ece..638dc36 100644 --- a/js/history.js +++ b/js/history.js @@ -29,12 +29,12 @@ if (!!(window.history && history.pushState)) { var updateCrumbs = function() { window.document.title = window.location.pathname; setTimeout(function () { - var loc = window.location.pathname; + var loc = decodeURI(window.location.pathname); var segments = loc.split('/'); var breadcrumbs = ''; var currentPath = '/'; for (var i = 0; i < segments.length; i++) { - if (segments[i] !== '') { + if (segments[i] != '') { currentPath += segments[i] + '/'; breadcrumbs += '' + window.unescape(segments[i]) + '<\/a>'; } else if (segments.length -1 !== i) { @@ -86,7 +86,7 @@ if (!!(window.history && history.pushState)) { }; addEvent(window, 'popstate', function (e) { - swapPage(window.location.pathname); + swapPage(decodeURI(window.location.pathname)); updateCrumbs(); });