-
Notifications
You must be signed in to change notification settings - Fork 161
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
nginx-directory: add light/dark style #1394
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🌔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cheers! i think there's scope for visual improvement here... just had some questions to get the ball rolling and I'll ask for more input
</ul> | ||
</body> | ||
|
||
</html> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you fix the missing trailing newline here?
} | ||
|
||
body { | ||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps we could borrow Tailwind's default?
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; | |
font-family: ui-sans-serif, system-ui, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol', 'Noto Color Emoji'; |
} | ||
|
||
ul { | ||
list-style: none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you say more about why you chose this?
display: inline-block; | ||
padding: 8px; | ||
color: #424242; | ||
text-decoration: none; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And this one... to me (just looked at the screenshots) it seems less obvious that it's a list of links now
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; | ||
margin: 0; | ||
padding: 24px; | ||
color: #424242; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we consider using CSS variables to make the theme easier to grok / modify? could be a way to do the light/dark theme too.
padding: 4px 12px; | ||
} | ||
|
||
@media (prefers-color-scheme: dark) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
as I understand this, it will always sync with the "system" setting, right?
no opinion on that right now - just wanted to call it out and see what others think. might be that if we did this we'd like a toggle that saves the preference in local storage, because not all folks will like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to consider that we stuff this file into a ConfigMap, the size matters (<1mb), I bet it does fit, just raising awareness.
I'd personally argue not to style this page, the point is to keep the page dead simple. Adding styles opens the door for all kinds of personal preferences. There are plugins that can configure any page to dark-style: https://darkreader.org/ and there is also some browsers supporting user-stylesheets, if you must I'd suggest looking at that. |
Yep, that was one of my main considerations in doing this as a few lines of inline CSS (total page weighs in around 2.9K) instead of anything heavier.
Fair enough. I'll close the PR, thanks for the review 👍 |
Adds light/dark theme support to the nginx directory index.html page.
Adds some basic styling as well. Including making the help "tooltip" feature bigger since it's difficult to mouse over in its current size.
Dark mode:
![image](https://private-user-images.githubusercontent.com/1048831/411085663-0ba2311b-b2db-4f7e-b2cc-301b1a519ba2.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyMzMyOTcsIm5iZiI6MTczOTIzMjk5NywicGF0aCI6Ii8xMDQ4ODMxLzQxMTA4NTY2My0wYmEyMzExYi1iMmRiLTRmN2UtYjJjYy0zMDFiMWE1MTliYTIucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMSUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTFUMDAxNjM3WiZYLUFtei1Fe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