forestryio / hugo-theme-novela

Novela, the simplest way to start publishing with Hugo and Forestry.
https://hugo-novela-forestry.netlify.app/
MIT License
360 stars 192 forks source link

How can I default this to dark mode? & also default to list mode? #83

Open TomLewis opened 2 years ago

TomLewis commented 2 years ago

Sorry I'm brand new to Hugo (And static generators as a whole!) and I'm starting with this theme as I love the look of it!

Is there a setting/config option to default to the dark mode & set the default posts view to list mode?

SleepyCofe commented 2 years ago

You can change the default mode by editing assets/js/initColors.js

function initColors(){
    if (localStorage.getItem("isLight") === null) {
        localStorage.setItem("isLight", 'true'); <- change to false for dark mode by default
    }