Skip to content
This repository has been archived by the owner on Oct 16, 2021. It is now read-only.

Dark mode / Light mode toggle

Compare
Choose a tag to compare
@Andy-set-studio Andy-set-studio released this 01 Jul 10:58
· 130 commits to master since this release
4635024

Hylia now has a theme toggle! It honours your system color preference by default but then gives you the opportunity to override it with a Web Component-based toggle that uses local storage to save your preference.

New files

  • src/js/components/theme-toggle.js
  • src/scss/components/_button.scss
  • src/scss/mixins/_dark-mode.scss

Files that have changed

  • .eleventy.js
  • package.json
  • src/_data/tokens.json
  • src/_includes/layouts/base.njk
  • src/_includes/partials/global/site-foot.njk
  • src/scss/_config.scss
  • src/scss/_theme.scss
  • src/scss/components/_intro.scss
  • src/scss/components/_post-list.scss
  • src/scss/components/_post.scss
  • src/scss/components/_site-foot.scss
  • src/scss/global.scss