Feat/upgrade daisy UI (#12)

* prune: remove daisyui config

* upgrade daisyui and implement new themes

* Update .env checksum
This commit is contained in:
Julien Calixte
2025-03-01 21:27:35 +01:00
committed by GitHub
parent 8a637bf4c1
commit 6c62f6afa0
17 changed files with 478 additions and 636 deletions

View File

@@ -1,69 +1,59 @@
/** @type {import('tailwindcss').Config} */
const dotenv = require('dotenv')
import typography from '@tailwindcss/typography'
import daisyui from 'daisyui'
const dotenv = require("dotenv")
dotenv.config()
const LIGHT_MODE = process.env.VITE_LIGHT_MODE
const DARK_MODE = process.env.VITE_DARK_MODE
const defaultTitleStyles = Array.from(
{ length: 6 },
(_, k) => `h${k + 1}`
(_, k) => `h${k + 1}`,
).reduce(
(acc, heading) => ({
...acc,
[heading]: {
'margin-top': '0',
'margin-bottom': '0.5em'
}
"margin-top": "0",
"margin-bottom": "0.5em",
},
}),
{}
{},
)
module.exports = {
content: ['./src/**/*.{vue,js,ts}'],
content: ["./src/**/*.{vue,js,ts}"],
theme: {
extend: {
typography: () => ({
DEFAULT: {
css: {
'font-size': '13pt',
'font-family': '"Courier Prime", monospace',
"font-size": "13pt",
"font-family": '"Courier Prime", monospace',
...defaultTitleStyles,
p: {
'margin-top': '0.8em',
'margin-bottom': '0.8em',
'text-align': 'justify'
"margin-top": "0.8em",
"margin-bottom": "0.8em",
"text-align": "justify",
},
img: {
'margin-top': 0,
'margin-bottom': 0,
'border-radius': '1rem'
"margin-top": 0,
"margin-bottom": 0,
"border-radius": "1rem",
},
a: {
'text-decoration': 'none',
color: 'oklch(var(--s))'
"text-decoration": "none",
color: "var(--color-primary)",
},
'a:hover': {
'text-decoration': 'underline'
"a.btn-primary": {
color: "var(--color-secondary-content)",
},
"a:hover": {
"text-decoration": "underline",
},
li: {
'margin-top': 0,
'margin-bottom': 0
}
}
}
})
}
"margin-top": 0,
"margin-bottom": 0,
},
},
},
}),
},
},
plugins: [typography, daisyui],
daisyui: {
themes: [LIGHT_MODE, DARK_MODE],
base: true,
styled: true,
utils: true
}
}