diff --git a/tailwind/custom/components/widgets.css b/tailwind/custom/components/widgets.css index a89a67c..3fc61ff 100644 --- a/tailwind/custom/components/widgets.css +++ b/tailwind/custom/components/widgets.css @@ -12,7 +12,7 @@ .top-title { order: 1; grid-area: 1 / 2 / 2 / 3; - @apply bg-glass shadow text-4xl font-bold text-center p-2; + margin-bottom: var(--wowp-gap); } .content { diff --git a/tailwind/tailwind.config.js b/tailwind/tailwind.config.js index a68d856..458e02f 100644 --- a/tailwind/tailwind.config.js +++ b/tailwind/tailwind.config.js @@ -1,5 +1,6 @@ // Set the Preflight flag based on the build target. const includePreflight = 'editor' === process.env._TW_TARGET ? false : true; +import themejson from '@_tw/themejson'; import plugin from 'tailwindcss/plugin'; module.exports = { @@ -17,29 +18,12 @@ module.exports = { extend: { }, }, - daisyui: { - themes: [ - { - wowpress: { - "primary": "#a991f7", - "secondary": "#f6d860", - "accent": "#37cdbe", - "neutral": "#fff", - "base-100": "#ffffff", - "primary-content": "#fff", - "--rounded-box": "0rem", // border radius rounded-box utility class, used in card and other large boxes - "--rounded-btn": "0rem", // border radius rounded-btn utility class, used in buttons and similar element - "--rounded-badge": "0rem", - } - } - ] - }, corePlugins: { // Disable Preflight base styles in builds targeting the editor. preflight: includePreflight, }, plugins: [ - // require('daisyui'), + // require('daisyui'), // Add Tailwind Typography (via _tw fork). require('@_tw/typography'), @@ -47,52 +31,53 @@ module.exports = { require('@_tw/themejson'), // Uncomment below to add additional first-party Tailwind plugins. - require('@tailwindcss/forms'), - require('@tailwindcss/aspect-ratio'), - require('@tailwindcss/container-queries'), - plugin(function({theme, addUtilities}) { - const colorUtilities={}; + require('@tailwindcss/forms'), + require('@tailwindcss/aspect-ratio'), + require('@tailwindcss/container-queries'), + plugin(function ({ theme, addUtilities }) { + const colorUtilities = {}; const colors = theme('colors'); - for (const color in colors){ - if(typeof colors[color] === 'object'){ - colorUtilities[`.button-${color}`] = { - 'background': colors[color]['400'], - 'color': colors[color]['800'], - 'border': '1px solid '+colors[color]['800'], - 'outline': colors[color]['800'], - '&:hover': { - 'background': colors[color]['300'], - 'border': '1px solid'+ colors[color]['900'] - } - } - colorUtilities[`.badge-${color}`] = { - 'background': colors[color]['200'], - 'color': colors[color]['800'], - 'border-color': colors[color]['800'], - } - colorUtilities[`.alert-${color}`] = { - 'background': colors[color]['200'], - 'color': colors[color]['800'], - 'border-color': colors[color]['800'], - } - colorUtilities[`.disabled-${color}`] = { - '--disabled-color' : colors[color]['500'], - } - colorUtilities[`.enabled-${color}`] = { - '--enabled-color' : colors[color]['500'], - } + const themecolors = themejson().config.theme.extend.colors; + for (const color in themecolors){ + colorUtilities[`.btn-${color}`] = { + '--btn-color': themecolors[color] } } - + for (const color in colors) { + if (typeof colors[color] === 'object') { + if (colors[color]['500'] !== undefined) { + colorUtilities[`.btn-${color}`] = { + '--btn-color': colors[color]['500'] + } + colorUtilities[`.badge-${color}`] = { + 'background': colors[color]['200'], + 'color': colors[color]['800'], + 'border-color': colors[color]['800'], + } + colorUtilities[`.alert-${color}`] = { + 'background': colors[color]['200'], + 'color': colors[color]['800'], + 'border-color': colors[color]['800'], + } + colorUtilities[`.disabled-${color}`] = { + '--disabled-color': colors[color]['500'], + } + colorUtilities[`.enabled-${color}`] = { + '--enabled-color': colors[color]['500'], + } + } + } + } + + addUtilities(colorUtilities); }) ], safelist: [ - {pattern: /button-+/}, - {pattern: /badge-+/}, - {pattern: /alert-+/}, - {pattern: /bg-[^/]+-200$/}, - {pattern: /text-+/}, - {pattern: /border-[^/]+-700$/}, + { pattern: /btn-([a-zA-Z]+)$/ }, + { pattern: /bg-([a-zA-Z]+)$/, variants: ['has-\[\:checked\]']}, + { pattern: /text-([a-zA-Z]+)$/, variants: ['hover', 'group-hover','has-\[\:checked\]'] }, + { pattern: /shadow-([a-zA-Z]+)$/ }, + { pattern: /border-([a-zA-Z]+)$/ }, ] }; diff --git a/tailwind/tailwind.css b/tailwind/tailwind.css index bd6a934..c63060b 100644 --- a/tailwind/tailwind.css +++ b/tailwind/tailwind.css @@ -57,11 +57,16 @@ padding: var(--wowp-gap); } +.gap-auto{ + gap: var(--wowp-gap); +} + body { background-color: unset; --body-bg: url('https://nebelkrieger.de/wp-content/uploads/2023/05/F8lCEpyWoAAFCFS-scaled.jpg'); position: relative; z-index: -10; + @apply min-h-screen; } .bg-glass { diff --git a/theme/components/toggle-button.php b/theme/components/toggle-button.php new file mode 100644 index 0000000..1b2a1b6 --- /dev/null +++ b/theme/components/toggle-button.php @@ -0,0 +1,25 @@ + +