Giter Club home page Giter Club logo

Comments (5)

apreshill avatar apreshill commented on June 1, 2024 2

Just wanted to share a few themes I found yesterday that do this:

https://themes.gohugo.io/theme/anatole/ (top right)

https://themes.gohugo.io/theme/hugo-coder/ (bottom right)

https://cupper-hugo-theme.netlify.app/ (scroll down)

from hugo-prose.

yihui avatar yihui commented on June 1, 2024 1

The README says this is work-in-progress. I'm not ready for feedback yet. The colors are kind of arbitrarily chosen. Thanks!

from hugo-prose.

apreshill avatar apreshill commented on June 1, 2024 1

Hi @yihui,

I'm playing with this today, and finding it really tricky to use/customize with the this inversion (even if the colors were changed). I think you could disable altogether (I did this on my personal site), as doing any kind of browser accessibility checks may be an endless vortex very time-consuming, as you'd have to ensure that both light and dark schemes meet minimum accessibility requirements.

If you want to keep, I do like having actual control over this setting within the browser window itself, as the academic theme does with the button in the top navbar:

https://academic-demo.netlify.app/

Without icons like feather or fontawesome (which I think eventually we'll need to make the theme more usable for people and teams, because folks need to link out to all the various things like GitHub, Twitter, Instagram, ImpactStory, ORCID, Patreon, Twitch, etc.), I can imagine you could do a CSS version of this kind of thing:

il_570xN 1162909777_562b

But I don't believe I've stumbled upon a site that uses this CSS trick, so it makes it surprisingly hard to work with. Also, as I am imagining teaching, it would be a nightmare to have screenshots, and to have different people sitting next to each other seeing drastically different websites locally, based on a setting they probably don't even realize they have on their own workstation.

At the least, I think we should move that bit of CSS to a partial layout file so you can turn it on/off with a setting in the configuration file. There may be a better way that I'm not familiar with too, but the main idea being that we make it a very clear "knob" in the main config file. I can offer a PR to do this, but wanted to open up the discussion first. But again, I'm not certain this is an actually important feature. As in, I think some users like to be able to switch between light/dark modes (that they can control), but I don't think it is the deciding factor for site authors between one theme vs another for most (vs say, search :))

from hugo-prose.

apreshill avatar apreshill commented on June 1, 2024 1

Ah hooray! Sorry for the pedantic issue then 😉

from hugo-prose.

yihui avatar yihui commented on June 1, 2024

@apreshill Rest assured that the dark mode will be both improved and configurable eventually. The simple inverse trick was there only as a proof of concept in the four-day old project, and definitely not meant to be delivered in the final product. Sorry I should have clarified that earlier, so you wouldn't need to spend the time trying to convince me. Thank you!

from hugo-prose.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.