Dark mode theme - Mailing list pgsql-www

From Richard Yen
Subject Dark mode theme
Date
Msg-id CAKH4vDjJX5nMo+yi=+L+7CcBa8AQRQVr84-RhuM6GkjDFSz70Q@mail.gmail.com
Whole thread Raw
Responses Re: Dark mode theme  (Magnus Hagander <magnus@hagander.net>)
List pgsql-www
I'm looking to start a dark mode theme for the PG website.  Attached is my first hack at it--you should be able to replace the /dyncss/base.css reference with /media/css/base_dark.css in base.html and see what it looks like.

Some lingering questions/issues:
  • How can I get my hands on some sample data for /docs? I would need to edit some styles to make sure the colors match up
  • I need to make the javascript to do the toggling on/off of the dark mode.  Most sites out there seem to just swap the stylesheet from *_light.css to *_dark.css, so it shouldn't be too tricky -- who do I talk to re. deciding where to put the button/toggle switch?
  • I'd also think we need to persist the preference, meaning we'd need to use cookies.  Seems like we use cookies for some google analytics, but otherwise the use of cookies seems very sparse--is that by policy?  ok to add another param?
  • I basically hacked the existing base.css, which seems to be an override + extension of the standard bootstrap library.  There are some bootstrap templates for dark mode (i.e., https://bootswatch.com/darkly/), but from the looks of it we may need to toggle two pairs of files instead of one pair.  Who gets to decide on the color scheme, etc.?
Thanks for reading!
--Richard


Attachment

pgsql-www by date:

Previous
From: "Jonathan S. Katz"
Date:
Subject: Re: Non-personal blogs on Planet
Next
From: Richard Yen
Date:
Subject: Re: Enable development via Docker