diff --git a/assets/FOOTER.html b/assets/FOOTER.html
index d1ded3f..5acd39d 100644
--- a/assets/FOOTER.html
+++ b/assets/FOOTER.html
@@ -3,7 +3,7 @@
diff --git a/assets/css/style.css b/assets/css/style.css
index cb29a81..1f73be6 100644
--- a/assets/css/style.css
+++ b/assets/css/style.css
@@ -6,7 +6,7 @@
* |__/ |___/
*
* This file is part of kristuff/apache-fancy-pages.
- * Version 0.1.6 - Copyright (c) 2021 Kristuff
+ * Version 0.1.7 - Copyright (c) 2021 Kristuff
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -228,6 +228,10 @@ table#indexlist tr[class*="dir"] td.indexcolname a {
font-weight: 600;
}
+table#indexlist .sorticon {
+ margin-left: 6px;
+}
+
/**
table#indexlist tr {
background: var(--color-table-bg--even);
diff --git a/assets/js/script.js b/assets/js/script.js
index 561d6c2..01dedaf 100644
--- a/assets/js/script.js
+++ b/assets/js/script.js
@@ -6,7 +6,7 @@
* |__/ |___/
*
* This file is part of kristuff/apache-fancy-pages.
- * Version 0.1.6 - Copyright (c) 2021 Kristuff
+ * Version 0.1.7 - Copyright (c) 2021 Kristuff
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
@@ -34,7 +34,7 @@
let titleText, breadcrumbHtml = '', index = 0, origin = window.location.origin + '/';
if (cleanPath) {
- const parts = cleanPath.split('/');
+ let parts = cleanPath.split('/');
cleanPath = parts[parts.length - 1];
titleText = titleize(cleanPath).replace(/-|_/g, ' ');
@@ -60,11 +60,27 @@
const titleContainer = document.querySelector('h1#title');
const breadContainer = document.querySelector('div#breadcrumb');
- titleContainer.innerHTML = titleText;
- breadContainer.innerHTML = breadcrumbHtml;
+ if (titleContainer) titleContainer.innerHTML = titleText;
+ if (breadContainer) breadContainer.innerHTML = breadcrumbHtml;
document.title = titleText;
}
+ // Add sort icon according to query search
+ function setSortIcon(){
+ let args = window.location.search;
+ let sortIcon = '▾';
+ let column = document.querySelector('th.indexcolname');
+
+ if (args.includes('O=D')) sortIcon = '▴';
+ if (args.includes('C=M')) column = document.querySelector('th.indexcollastmod');
+ if (args.includes('C=S')) column = document.querySelector('th.indexcolsize');
+ if (args.includes('C=D')) column = document.querySelector('th.indexcoldesc');
+ if (column){
+ column.innerHTML = column.innerHTML + '' + sortIcon + '';
+ }
+ }
+
+ // table filtering
var tableFilter = (function(Arr) {
var _input;
@@ -95,6 +111,7 @@
// Go
documentReady(function(){
setTitle();
+ setSortIcon();
tableFilter.init();
});
diff --git a/conf/fancy-error.conf b/conf/fancy-error.conf
index 23dc1c5..6bd4db6 100644
--- a/conf/fancy-error.conf
+++ b/conf/fancy-error.conf
@@ -5,7 +5,7 @@
# |__/ |___/
#
# This file is part of kristuff/apache-fancy-pages.
-# Version 0.1.6
+# Version 0.1.7
# Copyright (c) 2021 Kristuff
#
# For the full copyright and license information, please view the LICENSE
diff --git a/conf/fancy-index-tests.conf b/conf/fancy-index-tests.conf
index fe928ae..18f42d6 100644
--- a/conf/fancy-index-tests.conf
+++ b/conf/fancy-index-tests.conf
@@ -5,7 +5,7 @@
# |__/ |___/
#
# This file is part of kristuff/apache-fancy-pages.
-# Version 0.1.6
+# Version 0.1.7
# Copyright (c) 2021 Kristuff
#
# For the full copyright and license information, please view the LICENSE
diff --git a/conf/fancy-index.conf b/conf/fancy-index.conf
index 2bd0e96..9240c37 100644
--- a/conf/fancy-index.conf
+++ b/conf/fancy-index.conf
@@ -5,7 +5,7 @@
# |__/ |___/
#
# This file is part of kristuff/apache-fancy-pages.
-# Version 0.1.6
+# Version 0.1.7
# Copyright (c) 2021 Kristuff
#
# For the full copyright and license information, please view the LICENSE
diff --git a/create_package.sh b/create_package.sh
index 4d28b47..2e062a6 100644
--- a/create_package.sh
+++ b/create_package.sh
@@ -7,7 +7,7 @@
# |__/ |___/
#
# This file is part of kristuff/apache-fancy-pages.
-# Version 0.1.6
+# Version 0.1.7
# Copyright (c) 2021 Kristuff
#
# For the full copyright and license information, please view the LICENSE
diff --git a/deb/control b/deb/control
index 456e787..d2a4adf 100644
--- a/deb/control
+++ b/deb/control
@@ -1,5 +1,5 @@
Package: apache-fancy-pages
-Version: 0.1.6
+Version: 0.1.7
Maintainer: kristuff
Architecture: all
Depends: apache2