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

Fix file browser footer while in grid mode #5536

Merged
merged 4 commits into from
May 19, 2023
Merged

Fix file browser footer while in grid mode #5536

merged 4 commits into from
May 19, 2023

Conversation

pistasjis
Copy link
Contributor

I looked at the new file browser template and found it to be pretty good looking. Nice job! I tried it locally and found that the footer looked something like this:
Screenshot 2023-05-16 at 19-38-12 samsungsd
The black space after the footer looks kinda awkward, so I decided to fix it. With this PR, it looks like this:
Screenshot 2023-05-16 at 19-38-43 samsungsd

@CLAassistant
Copy link

CLAassistant commented May 16, 2023

CLA assistant check
All committers have signed the CLA.

@francislavoie
Copy link
Member

francislavoie commented May 16, 2023

I think it looks better before, honestly. I don't think the footer should grow. It also stretches the gradient which causes worse color banding.

What we could do is change the black background below the footer to a different color to better fit. But I don't think the footer should be resized.

@pistasjis
Copy link
Contributor Author

pistasjis commented May 16, 2023

I think it looks better before, honestly. I don't think the footer should grow. It also stretches the gradient which causes worse color banding.

It already has that gradient in list view, but I agree. Maybe you could change the background in grid view?

@mholt
Copy link
Member

mholt commented May 16, 2023

Should the footer be stuck to the bottom (but not span the remaining height) instead?

@francislavoie
Copy link
Member

francislavoie commented May 16, 2023

I suggest removing this background:

@media (prefers-color-scheme: dark) {
	html {
		background: black; /* overscroll */
	}

This makes the gradient bg go all the the way to the bottom of the viewport. Makes the color banding pretty rough in some cases though, stretching the gradient that far. But 🤷‍♂️

@pistasjis
Copy link
Contributor Author

image
Like this?

@pistasjis
Copy link
Contributor Author

image Like this?

image
Here's another where I set the background to the same as the grid view background. I'm not sure if it looks good or not though

@pistasjis
Copy link
Contributor Author

image Like this?

image Here's another where I set the background to the same as the grid view background. I'm not sure if it looks good or not though

image
I kinda like this one

@pistasjis
Copy link
Contributor Author

image Like this?

image Here's another where I set the background to the same as the grid view background. I'm not sure if it looks good or not though

image I kinda like this one

That being said, if you have color suggestions or another suggestion for how it should look, please tell me

@mholt
Copy link
Member

mholt commented May 16, 2023

Sorry, just took a lunch break, and am about to run some errands -- I'll look at this again in a little bit :) Thanks!

Copy link
Member

@mholt mholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK finally had a chance to clone this down and check it out. It definitely looks better, thanks!

I noticed, however, that it pushes the logo all the way to the bottom of the screen. I know I suggested this earlier, but on second thought I don't think it needs to be down there.

Turns out that this is fixed with just the 1 line of CSS.

IMO it looks good on my monitor (no banding that I can see). And I prefer to keep things simple.

If the suggestion is accepted we can just merge this in I think 👍

modules/caddyhttp/fileserver/browse.html Outdated Show resolved Hide resolved
Signed-off-by: Odyssey <odyssey346@disroot.org>
@mholt mholt merged commit 2d236ea into caddyserver:master May 19, 2023
@mholt
Copy link
Member

mholt commented May 19, 2023

Awesome, thank you for the contribution!! If we decide for some reason that the footer is best at the bottom, we know what to do now. :) Thanks again.

@pistasjis
Copy link
Contributor Author

:D

@mholt
Copy link
Member

mholt commented May 19, 2023

@pistasjis Also, you may notice I just pushed bd34cb6 which adds a lot more filetypes for the icons.

@pistasjis
Copy link
Contributor Author

@pistasjis Also, you may notice I just pushed bd34cb6 which adds a lot more filetypes for the icons.

They look nice. I've used Tabler before and they're one of my favourite iconsets

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

Successfully merging this pull request may close these issues.

4 participants