-
Notifications
You must be signed in to change notification settings - Fork 188
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
Add Dark Mode #115
base: master
Are you sure you want to change the base?
Add Dark Mode #115
Conversation
@@ -0,0 +1 @@ | |||
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }}{{ if strings.HasPrefix .Destination "http" }} target="_blank"{{ end }}>{{ .Text }}</a> |
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.
open links in new tab
lightTheme: ( | ||
text: #111, | ||
low-neutral: #f7f7f7, | ||
neutral-table-border: #eeeeee, | ||
neutral: #9b9b9b, | ||
high-neutral: #717171, | ||
bg: #fff, | ||
accent: #9013FE, | ||
accent-text: #580E99, | ||
accent-bg: #A56AD9, | ||
), | ||
darkTheme: ( | ||
text: #fff, | ||
low-neutral: #717171, | ||
neutral-table-border: #eeeeee, | ||
neutral: #9b9b9b, | ||
high-neutral: #f7f7f7, | ||
bg: #111, | ||
accent: #9013FE, | ||
accent-text: #A56AD9, | ||
accent-bg: #580E99, | ||
), | ||
); |
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.
renamed colors; for the neutrals (formerly light/darkGrey) high means closer to color of text and low mean closer to background (bg)
Much needed feature. Thanks @vishwa35 🥳
|
@vishwa35 I apologize for the late response, real life has been keeping me pretty busy these days. I am going to take a look at the PR now but I also want to note that a few recent PRs as of this morning have caused some conflicts in your branch. Just wanted to ping you so you're aware. Thanks for your effort on this! |
Any updates on this ? Would love to use dark mode for this theme |
<li> | ||
<i class="fas fa-moon" id="dark-mode-toggle"></i> | ||
</li> |
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 we get this item to have cursor: pointer
so that it feels clickable?
if (window.matchMedia('(prefers-color-scheme: dark)').matches) { | ||
setTheme(localStorage.getItem("dark-mode-storage") || "dark"); | ||
} else { | ||
setTheme(localStorage.getItem("dark-mode-storage") || "light"); | ||
} |
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.
Great stuff! Prefer system is a great design decision.
I second @WickedBrat here. I don't find it terribly important that we continue to support these inline Now, as far as the dark mode implementation itself, it looks aces. However, I am also noticing this split-second flash of light mode before dark mode takes effect. Is there are a way to avoid this @vishwa35 ? It isn't a pleasing experience for the end-user. All-in-all this was clearly a ton of effort on your part and I'm glad you've decided to include your PR to this project. I'd love to get it merged ASAP. But we should iron out these few things: TODO
|
I've sent a different PR utilising the EDIT: If a toggle is still wanted/required, you could alternatively replace the |
layouts/_default/_markup/render-link.html
to open all links in new tabs (except internal ones)