Giter Site home page Giter Site logo

Comments (3)

lukasnxyz avatar lukasnxyz commented on May 20, 2024 1

Hey @janraasch!

Thanks for the quick response! I've used your solution as it makes a bit more sense from a deployment perspective.

Kind regards,
Lukas

from hugo-bearblog.

lukasnxyz avatar lukasnxyz commented on May 20, 2024

As a temporary solution I've commented out @media (prefers-color-scheme: dark) { in `layouts/partials/style.html' on line 129.

from hugo-bearblog.

janraasch avatar janraasch commented on May 20, 2024

Hi @systemb4, thank you for getting in touch. It's nice to meet you ๐Ÿงค.

There's no such configuration option. Your solution is definitely an OK way to go. Here's another way you could go if you so choose:

If you'd rather not edit the theme's files, but keep your changes local to your own hugo base directory, you could

  • copy & paste the contents of the @media (prefers-color-scheme: dark) { ... }-directive
  • into a custom_head.html-file located at layouts/partials/custom_head.html in your site's base directory.

The file should look something like this:

<style>
    body {
      background-color: #333;
      color: #ddd;
    }

    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    strong,
    b {
      color: #eee;
    }

    a {
      color: #8cc2dd;
    }

    code {
      background-color: #777;
    }

    pre code {
      color: #ddd;
    }

    blockquote {
      color: #ccc;
    }

    textarea,
    input {
      background-color: #252525;
      color: #ddd;
    }

    .helptext {
      color: #aaa;
    }
</style>

This file will be picked up by the theme. Here's the respective section on the README.

I hope that helps ๐Ÿค“.

Kind regards to Austria ๐Ÿ‡ฆ๐Ÿ‡น๐Ÿ‘‹,
Jan

PS:

๐Ÿ’ก Just from the top of my head: I think in the future we might move to css variables and have separate partials for root- and dark mode-variables. With that people could simply overwrite those partials in their local layouts-folder and set their own color variables.

from hugo-bearblog.

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.