jmlemetayer / abba

Apache Bootstrap & Bootswatch Autoindex
https://jmlemetayer.github.io/abba/previews/default/
MIT License
80 stars 5 forks source link

installation at non root location #23

Open ThierryBesancon opened 2 years ago

ThierryBesancon commented 2 years ago

Hello

Thanks for ABBA that i start to use. I face a small problem.

I use it at a non root location. I mean that i use it to browse documents located on my web site at "/documents" not located at "/". I patched foooter.shtml and header.shtml but i have just realised that the house icon in the breadcrumb line points to "/" which is not a good thing in my case. I would prefer to control where it has to go ("/documents" or maybe something else depending on other things).

If you know where to fix this in the code, i can go for a patch that is not committed to the distrib due to lack on general interest.

I don't know if it is due to the non root location but i don't get file icons as well. For example PDF files don't get the fa-file-pdf icon. I must precise that i use ABBA disconnected from internet (I know it loads "Source Sans Pro" font from google which fails on my system but i get another font instead and it is ok ; i will probably fix the google font by my own later).

Thanks in advance for any idea. Best regards, Thierry

jmlemetayer commented 2 years ago

Hi Thierry,

I had a similar request in the past (see #17) which have been closed due to inactivity and lack of time.

Apache is behaving correctly (you can disable abba by renaming the .htaccess and check it), the issue is the dynamically generated breadcrumb.

When I first saw the issue, I was thinking of creating a root_dir variable which can be used by the js (like the server_date that uses the mod_include module to get its initial value).

If you have something that works. Please post a pull request, I will be happy to merge it.

I think the "non root location" also leads to the issue with the icons, because they are stored in a font which is installed with abba (check .abba/webfonts). This is definitely something to fix to have a working "non root location" feature.

The google font is from bootswatch (see here). It will be hard to fix.