justint / papaya

A clean Zola theme for blogging and projects.
https://justintennant.me/papaya/
MIT License
45 stars 24 forks source link

Add dark mode, anchor links, utterances support #8

Closed opeik closed 1 year ago

opeik commented 2 years ago

Hi there,

I've added basic dark mode support as well as some other niceties.

justint commented 2 years ago

Hey, thanks a bunch for the contributions. I should have some time to take a look in the next couple of weeks.

justint commented 2 years ago

The dark theming & usage of the CSS custom properties looks great. We should adjust some of the dark theme colors to meet the AA contrast ratio minimums. I can take a pass at this and push another commit for you to review sometime this week.

Utterances is cool, did not know that existed! I'd love to see it in use with Papaya once you've configured it for your instance, if you plan to use it.

One question I have, is why you chose to replace the existing anchor link?

opeik commented 2 years ago

We should adjust some of the dark theme colors to meet the AA contrast ratio minimums. I can take a pass at this and push another commit for you to review sometime this week.

Fair point, I'm flat out at the moment so feel free.

One question I have, is why you chose to replace the existing anchor link?

It was a hot minute ago so I'm struggling to recall 😅 There was some issue, I think in regards to the actual anchor becoming visible on hover?

justint commented 2 years ago

Ah interesting, I've been able to see the current anchor links myself on hover; I'm using Google Chrome. Are you on a different browser?

Will get to the color contrast adjustments soon, when I find time.

opeik commented 2 years ago

Are you on a different browser?

Yeah, I use Safari on macOS with Chromium as a backup. That might have been it.

justint commented 2 years ago

Ok, I've updated the colors to be AA contrast compliant.

However, I've just noticed the current code highlighting is a bit of an eyesore in dark mode: Capture

It's easy to switch to another code theme that works better with dark mode, but it could be tricky to find one theme that looks good in both light and dark mode. I wonder if it's worth supporting custom code themes for either light or dark mode separately, using Zola's classed syntax highlighting?

opeik commented 2 years ago

I wonder if it's worth supporting custom code themes for either light or dark mode separately, using Zola's classed syntax highlighting?

This sounds like an ideal solution. I think monokai looked okay in light mode but having seperate light/dark themes would be really nice!

justint commented 1 year ago

Hey @opeik, my apologies for ghosting this thread. I think providing dark/light themes for papaya would indeed be really nice, I'm going to re-open this and look into supporting custom code themes next week.

justint commented 1 year ago

Hey @opeik, thanks so much again for these contributions. I've finally found the time to resume work on this and was able to get the syntax highlighting working for light/dark mode.

I'm having some weird issues with getting my changes into this PR, so in case you wish to follow along further I've pushed the changes to a new branch and will be merging into main & releasing soon.