Skip to content

Commit

Permalink
修复issue内的历史问题
Browse files Browse the repository at this point in the history
修改自定义README
  • Loading branch information
redgreat committed Aug 23, 2022
1 parent e96e2ad commit 4db531a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 19 deletions.
16 changes: 3 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions footer.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
</div>
</div>
<script>
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 += '<a href="' + currentPath + '">' + window.unescape(segments[i]) + '<\/a>';
} else if (segments.length -1 !== i) {
Expand Down
2 changes: 1 addition & 1 deletion header.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<title>Files...</title>
<link rel="stylesheet" href="/fancyindex/css/fancyindex.css">
<script>
window.document.title = window.location.pathname;
window.document.title = decodeURI(window.location.pathname);
</script>
</head>
<body>
Expand Down
6 changes: 3 additions & 3 deletions js/history.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 += '<a href="' + currentPath + '">' + window.unescape(segments[i]) + '<\/a>';
} else if (segments.length -1 !== i) {
Expand Down Expand Up @@ -86,7 +86,7 @@ if (!!(window.history && history.pushState)) {
};

addEvent(window, 'popstate', function (e) {
swapPage(window.location.pathname);
swapPage(decodeURI(window.location.pathname));
updateCrumbs();
});

Expand Down

0 comments on commit 4db531a

Please sign in to comment.