-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve UI & UX #155
base: develop
Are you sure you want to change the base?
Improve UI & UX #155
Conversation
32a67f1
to
97112dd
Compare
Thank you for this interesting merge request. I'll have a look at it and will test it soon. Meanwhile, can you please update your commit messages in order to fulfil the commit message convention "conventional changelog" as stated the CONTRIBUTING.md guide. |
I've force pushed the commits with corrected messages. |
I've tested your merge request with an apache 2.4 and an apache 2.2 (thanks to Docker), and it seems to work. I plan to make some more tests before merging. |
I talked with some friends and it appear that apache 2.2 is no longer supported:
I can understand that some people do not have the choice of the version of apache they are running. On the other side, I think that it is not a wise choice to offer a version of apaxy that is adapted for a version of apache that is no longer supported and has multiple vulnerabilities that won't ever be fixed.
Hence I propose you to remove the changes in this merge request that are related to apache 2.2 so that this merge request contains only changes related to the following items:
And the changes related to apache 2.2 could be posted as a git patch in an issue for those who are hardly obliged to use an unsupported version of apache. |
- Allow wrapping of long breadcrumbs line that leads to horizontal scrolling and breaks lightGallery zooming - Maximize filenames column width and shrink icons column
That fix seems to be needed to bypass an Apache bug and now became useless.
Module autoindex in Apache-2.2 generates table not specifying any CSS classes (they were appeared in Apache-2.4), but Apaxy CSS selectors requires those.
Actually, most of the Apaxy CSS selectors still work with Apache-2.2. The Apache-2.4 dependency have been introduced in a couple of places via recent commits. If there is a wish to drop apache-2.2 requirement completely, other places in Apaxy should be possibly cleaned up to take advantage of named CSS-classes... This PR doesn't address this.
I've removed the commits concerning Apache-2.2 from this PR, and also changed the README accordingly (it was referencing apache-2.2 as requirement).
I've made the patch against the HEAD of this branch. The contents is bellow. But it can also be posted in a new issue after this PR will be merged. Fix: support for Apache 2.2
Module autoindex in Apache-2.2 generates table not specifying any CSS classes (they were appeared in Apache-2.4). Rewrite Apaxy CSS selectors to not reference that.
---
apaxy/theme/apaxy-lightgallery.js | 16 ++++++++--------
apaxy/theme/style.css | 8 ++++----
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/apaxy/theme/apaxy-lightgallery.js b/apaxy/theme/apaxy-lightgallery.js
index 4e5ba24..61c4446 100644
--- a/apaxy/theme/apaxy-lightgallery.js
+++ b/apaxy/theme/apaxy-lightgallery.js
@@ -1,14 +1,14 @@
var imageSelector = [
- 'tr:not(.parent) td.indexcolname a[href$=".jpg"]',
- 'tr:not(.parent) td.indexcolname a[href$=".JPG"]',
- 'tr:not(.parent) td.indexcolname a[href$=".heic"]',
- 'tr:not(.parent) td.indexcolname a[href$=".HEIC"]',
- 'tr:not(.parent) td.indexcolname a[href$=".png"]',
- 'tr:not(.parent) td.indexcolname a[href$=".PNG"]',
- 'tr:not(.parent) td.indexcolname a[href$=".gif"]'
+ 'tr:not(.parent) td+td a[href$=".jpg"]',
+ 'tr:not(.parent) td+td a[href$=".JPG"]',
+ 'tr:not(.parent) td+td a[href$=".heic"]',
+ 'tr:not(.parent) td+td a[href$=".HEIC"]',
+ 'tr:not(.parent) td+td a[href$=".png"]',
+ 'tr:not(.parent) td+td a[href$=".PNG"]',
+ 'tr:not(.parent) td+td a[href$=".gif"]'
].join(', ');
-lightGallery(document.getElementById('indexlist'), {
+lightGallery(document.getElementsByTagName('table')[0], {
selector: imageSelector,
mode: 'lg-slide',
hideBarsDelay: 2000,
diff --git a/apaxy/theme/style.css b/apaxy/theme/style.css
index d597313..0c5b681 100644
--- a/apaxy/theme/style.css
+++ b/apaxy/theme/style.css
@@ -133,11 +133,11 @@ table {
}
}
-.odd {
+tr:nth-child(odd) {
background-color: rgb(244, 244, 244);
}
@media (prefers-color-scheme: dark) {
- .odd {
+ tr:nth-child(odd) {
background-color: rgb(50, 50, 50);
}
}
@@ -230,9 +230,9 @@ tr.parent a[href^="/"] {
padding: 10px;
}
/* 2nd Column: Filename */
- .indexcolname { width: 95%; }
+ th + th { width: 95%; }
/* 3rd Column: Last Modified */
- .indexcollastmod { display: none; }
+ td:nth-child(3), th:nth-child(3) { display: none; }
.wrapper { max-width: 100%; }
} |
fixes #
proposed changes