Dark mode theme

From: Richard Yen <richyen3(at)gmail(dot)com>
To: PostgreSQL WWW <pgsql-www(at)lists(dot)postgresql(dot)org>
Subject: Dark mode theme
Date: 2020-02-26 01:37:20
Message-ID: CAKH4vDjJX5nMo+yi=+L+7CcBa8AQRQVr84-RhuM6GkjDFSz70Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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 Content-Type Size
base_dark.css text/css 31.5 KB

Responses

Browse pgsql-www by date

  From Date Subject
Next Message Richard Yen 2020-02-26 01:49:59 Re: Enable development via Docker
Previous Message Jonathan S. Katz 2020-02-25 23:58:59 Re: Non-personal blogs on Planet