(https://just-the-docs.com/docs/customization/#define-a-custom-scheme for reference)

I am using just the docs (jekyll theme) + github pages to create a webpage and trying to have two separate colour schemes: a normal and high contrast option.

I am using a custom style with “_sass/custom/custom.scss” to set all the colours, layout configurations, etc. because there are some options that are not available using “_sass/color_schemes/foo.scss” such as more control over the colours of different elements.

However, I cannot find in the docs how to make it possible to easily switch with a custom.scss. One option is to create two github pages sites, one with high contrast and the other with normal colours, but that’s really janky. just-the-docs seems to only allow you to create switchable colour schemes if you use “color_schemes/foo.scss” rather than “custom/custom.scss”.

Am I forced to create a second github pages site for high contrast, or is there a way to switch between two different custom.scss?

  • orockwell@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    4 hours ago

    Yep! This pattern will work on any website. You only need to be able to write CSS, and apply a class to the body tag.

    AFAIK Jekyll uses Liquid for template flow control - you could set the class; or even load specific CSS that way too

    • sbird@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      4 hours ago

      what if there’s loads of different elements where the colour could he changed such as texts, links, and different ohjects like the nav bar?