Closed danielfdickinson closed 3 years ago
Hey Daniel,
Want you to know that I've seen your PR and plan to review it. My schedule has just been hectic lately.
On Mon, Aug 9, 2021 at 11:56 PM Daniel F. Dickinson < @.***> wrote:
This version is based on the DOM specification used by Firefox, Chrome, and the new Edge. Since it is standards compliant it should work on modern browsers, but dark mode won't be available on IE11 and maybe the old Edge. I have avoided the screen flash on loading the page, and toggling from dark to light (or vice versa) both when dark is default and when light is default.
Hope you like it!
You can view, comment on, or merge this pull request online at:
https://github.com/zwbetz-gh/cupper-hugo-theme/pull/56 Commit Summary
- Add default dark theme for modern browsers
File Changes
- M README.md https://github.com/zwbetz-gh/cupper-hugo-theme/pull/56/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5 (11)
- M assets/js/template-dom-scripts.js https://github.com/zwbetz-gh/cupper-hugo-theme/pull/56/files#diff-b9c24ce23ba05ab3561b8d2e83f5218eca57b6eb2a502959bfc01660c19017ea (32)
- M layouts/partials/head.html https://github.com/zwbetz-gh/cupper-hugo-theme/pull/56/files#diff-96dd75a968976edd5e03170268ed9085733f75c3fb24f992ae613c89e6de42dc (14)
Patch Links:
- https://github.com/zwbetz-gh/cupper-hugo-theme/pull/56.patch
- https://github.com/zwbetz-gh/cupper-hugo-theme/pull/56.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/zwbetz-gh/cupper-hugo-theme/pull/56, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI4WX7FZFZC4BX7SEW74NYLT4CWPZANCNFSM5B3LLELA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
Update exampleSite/config.yaml
and add
defaultDarkTheme: false
That wording looks good.
On Mon, Aug 16, 2021 at 9:12 PM Daniel F. Dickinson < @.***> wrote:
@.**** commented on this pull request.
In README.md https://github.com/zwbetz-gh/cupper-hugo-theme/pull/56#discussion_r689982522 :
@@ -105,6 +105,17 @@ You can provide an optional list of custom JS files, which must be placed inside
See the example site config file for sample usage.
+## Default to Dark Theme
So far, I've got the following text. Please let me know of any edits you'd like.
Note that the default of light or dark theme only applies to the first visit to a site using this theme. Once the site is visited the choice of dark or light theme is stored in 'local storage' in the browser.
To reset to a 'first visit' scenario (e.g. for testing), one needs to either browse in private mode (aka Incognito/InPrivate/etc) or delete 'local storage' for this site. The easiest way to do that, but which affects other sites as well, is to use the 'Clear History' feature of the browser.
Check your browser's help or documentation for details.
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/zwbetz-gh/cupper-hugo-theme/pull/56#discussion_r689982522, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI4WX7AD4RJURMHG6FUVA6DT5HAQLANCNFSM5B3LLELA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
I can squash if you wish, or do you prefer to do that?
No worries. Once I merge, I will squash.
On Mon, Aug 16, 2021 at 9:33 PM Daniel F. Dickinson < @.***> wrote:
I can squash if you wish, or do you prefer to do that?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/zwbetz-gh/cupper-hugo-theme/pull/56#issuecomment-899947124, or unsubscribe https://github.com/notifications/unsubscribe-auth/AI4WX7FHOX7KWF7RMDCDFMDT5HC6XANCNFSM5B3LLELA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .
This version is based on the DOM specification used by Firefox, Chrome, and the new Edge. Since it is standards compliant it should work on modern browsers, but dark mode won't be available on IE11 and maybe the old Edge. I have avoided the screen flash on loading the page, and toggling from dark to light (or vice versa) both when dark is default and when light is default.
Hope you like it!
That is toggling works …