Custom Theme
This doc describes how to add CSS
and JS
to customize the theme.
Before customization, you need to add the related fields to your configuration, below is an example:
[params]
[params.advanced]
customCSS = ["css/custom.css"] # Files in the list will be loaded in order.
customJS = ["js/custom.js"]
The file paths specified in customCSS
and customJS
are related to the static
folder, so you need to put your custom files in the static
folder.
CSS
In v3, Dream uses tailwindcss and daisyUI to build the theme.
The old way to customize the CSS is still available (by adding customCSS
), but now itās harder to style components with
pure css, because the tailwindcss class is more trivial than the Semantic UI used in the past.
Iāll think about how to customize styles based on tailwindcss more easily in the future.
So if you are not familiar with frontend development, recommend you to ignore this part. Mostly, you donāt need to customize the CSS.
JS
In v3, Dream uses Alpine.js to build the theme.
Like the CSS, the old way to customize the JS is still available (by adding customJS
),
but there are no specific hooks for now that allow you to execute JS functions to modify specific places.
Now you can use Alpine.js to do anything you want. I prepare to add some hooks in the future to make it easier to customize the theme with Alpine.js.
So if you are not familiar with frontend development, recommend you to ignore this part. Mostly, you donāt need to customize the JS.