jacksalici / salinger-theme

A clean and minimalistic Hugo theme for personal blogs and portfolios. Built with TailwindCSS and DaisyUI.
https://github.com/jacksalici/salinger-theme
MIT License
33 stars 12 forks source link

daisui themes #6

Closed till closed 8 months ago

till commented 9 months ago

Hey 👋🏼 ,

thanks for creating this. :)

I was wondering if it's possible to use the theming in daisyui with your theme. https://daisyui.com/docs/themes/

The theming in daisyui lets one pick a color scheme and fonts, etc..

Cheers

till commented 9 months ago

I guess I figured part of it out. You created your own themes and these are loaded only?

jacksalici commented 9 months ago

Hi Till, thank you for using Salinger, and sorry for the late answer.

I was wondering if it's possible to use the theming in DaisyUI with your theme. https://daisyui.com/docs/themes/

The answer is yes but with a few limitations. There is indeed support for DaisyUI theming but as of now, it is only possible to switch between a light ("lit") and a dark ("dim") theme, which can be customizable from the tailwind.config.js. As you can see, they are currently inheriting everything from two of the standard themes but they can also be customized further. Unfortunately, it's not possible to edit them from the hugo.toml file, at least for now... Regarding the fonts, they can also be changed in the same file but the import in the CSS might be arranged consequently.

themes: [
      {
        lit: {
          ...require("daisyui/src/theming/themes")["[data-theme=corporate]"],
        },
      },
      {
        dim: {
          ...require("daisyui/src/theming/themes")["[data-theme=business]"],
        },
      },

I also have noticed that the demo link in the readme points to my website which not uses this theme anymore. I apologize for the confusion and I will change it as soon as possible...

till commented 8 months ago

Thank you, this was helpful!