Re: Dark mode styling for the website

From: Dave Page <dpage(at)pgadmin(dot)org>
To: "Jonathan S(dot) Katz" <jkatz(at)postgresql(dot)org>
Cc: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>, Dago A Carralero <tocarralero(at)gmail(dot)com>, Vik Fearing <vik(at)postgresfriends(dot)org>, PostgreSQL WWW <pgsql-www(at)lists(dot)postgresql(dot)org>
Subject: Re: Dark mode styling for the website
Date: 2023-01-05 16:29:14
Message-ID: CA+OCxoxBzgifxqEV2_eE4+jJztm986oLaWOCFc60FxyhQUOOQw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-www

Hi

On Thu, 5 Jan 2023 at 14:59, Jonathan S. Katz <jkatz(at)postgresql(dot)org> wrote:

>
> However, I'll +1 the application of the patch, with noted +0s above.
>

You were correct about the CSP issue; I could have sworn I had CSP in
enforcing mode on my test server, but apparently not (hence the commit &
revert on the main repo).

[For those wondering why we don't use a nonce instead, that wouldn't work
with our caching infrastructure].

Here's a minor update that resolves it. The inline JS in the header is
pushed out to a new file (because we need it to load in the header, to
avoid color flashing as much as possible), and the buttons onclick
attribute is replaced with an event handler. The inline CSS to hide the
form wrapping the button (for non-JS browsers) has been replaced with the
d-none class.

If you can give it a quick once-over, I'll get it committed and wrap this
up ASAP.

Thanks.

--
Dave Page
Blog: https://pgsnake.blogspot.com
Twitter: @pgsnake

EDB: https://www.enterprisedb.com

Attachment Content-Type Size
darkmode_update_v2.diff application/octet-stream 14.0 KB

In response to

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Melih Mutlu 2023-01-10 11:25:25 Broken Slack links
Previous Message Jonathan S. Katz 2023-01-05 14:59:16 Re: Dark mode styling for the website