[bisq-network/bisq-website] Dark mode (#378)
m52go
notifications at github.com
Thu Jul 30 03:30:00 UTC 2020
@m52go requested changes on this pull request.
I tested again throughout the site and everything seems to work fine. It looks so good (!).
I've attached a couple of nitpicks in the JavaScript...there's a stray `console.out()` still there from debugging and an unused condition in 2 of the if statements.
That's it from my end. @pedromvpg I will ACK once you make those changes, and merge a short while afterward if there's no other feedback.
> @@ -120,6 +121,21 @@
</head>
<body class="home page-template-default page page-id-6 custom-background">
+ <script>
+ if (Cookies.get('darkmode') === undefined && window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches) {
```suggestion
if (Cookies.get('darkmode') === undefined && window.matchMedia('(prefers-color-scheme: light)').matches) {
```
> @@ -120,6 +121,21 @@
</head>
<body class="home page-template-default page page-id-6 custom-background">
+ <script>
+ if (Cookies.get('darkmode') === undefined && window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches) {
+ console.log('no cookie');
```suggestion
```
> @@ -120,6 +121,21 @@
</head>
<body class="home page-template-default page page-id-6 custom-background">
+ <script>
+ if (Cookies.get('darkmode') === undefined && window.matchMedia && window.matchMedia('(prefers-color-scheme: light)').matches) {
+ console.log('no cookie');
+ Cookies.set("darkmode", 0);
+ }else if(Cookies.get('darkmode') === undefined && window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches) {
```suggestion
}else if(Cookies.get('darkmode') === undefined && window.matchMedia('(prefers-color-scheme: dark)').matches) {
```
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq-website/pull/378#pullrequestreview-458044691
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20200729/a5f69aa1/attachment.html>
More information about the bisq-github
mailing list