feat: add dasyui for backpex

This commit is contained in:
Moritz 2025-07-03 16:37:54 +02:00
parent 5d0e8b5f78
commit a958b49a7c
Signed by: moritz
GPG key ID: 1020A035E5DD0824
7 changed files with 35 additions and 3 deletions

View file

@ -2,6 +2,10 @@
@import "tailwindcss/components";
@import "tailwindcss/utilities";
@plugin "daisyui" {
themes: light, dark;
}
@source "../../deps/backpex/**/*.*ex";
@source '../../deps/backpex/assets/js/**/*.*js'

View file

@ -23,6 +23,9 @@ import {LiveSocket} from "phoenix_live_view"
import { Hooks as BackpexHooks } from 'backpex'
import topbar from "../vendor/topbar"
// Set stored theme as soon as possible
BackpexHooks.BackpexThemeSelector.setStoredTheme()
let csrfToken = document.querySelector("meta[name='csrf-token']").getAttribute("content")
let liveSocket = new LiveSocket("/live", Socket, {
longPollFallbackMs: 2500,

20
assets/package-lock.json generated Normal file
View file

@ -0,0 +1,20 @@
{
"name": "assets",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"daisyui": "^5.0.43"
}
},
"node_modules/daisyui": {
"version": "5.0.43",
"resolved": "https://registry.npmjs.org/daisyui/-/daisyui-5.0.43.tgz",
"integrity": "sha512-2pshHJ73vetSpsbAyaOncGnNYL0mwvgseS1EWy1I9Qpw8D11OuBoDNIWrPIME4UFcq2xuff3A9x+eXbuFR9fUQ==",
"funding": {
"url": "https://github.com/saadeghi/daisyui?sponsor=1"
}
}
}
}

5
assets/package.json Normal file
View file

@ -0,0 +1,5 @@
{
"dependencies": {
"daisyui": "^5.0.43"
}
}

View file

@ -19,7 +19,6 @@ module.exports = {
},
},
plugins: [
require("@tailwindcss/forms"),
// Allows prefixing tailwind classes with LiveView classes to add rules
// only when LiveView classes are applied, for example:
//