Skip to content
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

cannot get it to work #1

Open
oberon-manjaro opened this issue Nov 9, 2020 · 4 comments
Open

cannot get it to work #1

oberon-manjaro opened this issue Nov 9, 2020 · 4 comments

Comments

@oberon-manjaro
Copy link

Sorry to ask for your help like this. Certainly it's just my lack of understanding that I can't seem to get this to work on my site. I would however love to use this beautiful dark theme and I'd be very grateful if you could give the necessary pointers.
My caddy version is 2.2.1 and I am using it simply to display a file tree in /var/www/html.
My /etc/caddy/Caddyfile currently looks like this:

my.domain
root * /var/www/html
file_server browse

I have now tried to simply clone your repo to /var/www/html and adjust the Caddyfile, but it seems I haven't figured out how to do that properly.
Using root * /var/www/html/caddy-browse-template of course just starts the file browser inside the cloned repo 😜 and pointing root to /var/www/html/caddy-browse-template/template.html fails to display anything.
This doesn't work either:

my.domain
{
    root /var/www/html/caddy-browse-template/static
    browse / /var/www/html/caddy-browse-template/template.html
}

Your help will be much appreciated.

@oberon-manjaro
Copy link
Author

oberon-manjaro commented Nov 10, 2020

I have now moved the theme repo outside the fileserver’s root (to /var/www/caddy-browse-template) and tried changing the Caddyfile to

teddy.dnsuser.de {
    root * /var/www/html
    file_server {
        browse /var/www/caddy-browse-template/template.html
    }
}

In Firefox this gives me a broken styling and clicking on any directory gives an error message that the page isn’t available.
At the same time in Chromium I can open directories and it displays a somewhat better styling. But still not I guess what it's supposed to look like:

image

Looking at the content of template.html I see links like /icons/favicon.svg or /style.css.
So I tried moving template.html inside the static/ dir so it can “see” those files.
The effect now being that I can actually open directories also in Firefox, but styling is still broken like before:

image

In Chromium it still looks the same as before, with the bright background…

@oberon-manjaro
Copy link
Author

Another attempt now was

teddy.dnsuser.de {
        root * /var/www/html
        file_server {
                browse /var/www/html/template.html
        }
}

while moving the whole content of static/ plus template.html inside /var/www/html.
In Chromium the result looks more or less ok-ish, although quite big:

image

Firefox now:

image

And after clicking on for any of the directories:

image

@cs91chris
Copy link
Owner

Hi,
it's seems an issue of service worker with firefox, try to disable it commenting 4-5 rows of app.js and clear site data

@oberon-manjaro
Copy link
Author

oberon-manjaro commented Nov 11, 2020

This doesn't make a difference, unfortunately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants