FEATURE Passing a light green color to the theme scope
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Nonimart 2025-07-01 17:47:49 +02:00
parent ede021029a
commit e0895d6642
2 changed files with 11 additions and 21 deletions

View File

@ -3,9 +3,7 @@ const tailpress = require('@jeffreyvr/tailwindcss-tailpress');
// Fonction pour obtenir la couleur de base depuis theme.json // Fonction pour obtenir la couleur de base depuis theme.json
const getBaseColor = (slug) => { const getBaseColor = (slug) => {
const color = theme.settings.color.palette.find( const color = theme.settings.color.palette.find((c) => c.slug === slug);
(c) => c.slug === slug
);
return color ? color.color : null; return color ? color.color : null;
}; };
@ -27,11 +25,9 @@ module.exports = {
}, },
extend: { extend: {
colors: { colors: {
...tailpress.colorMapper( ...tailpress.colorMapper(tailpress.theme('settings.color.palette', theme)),
tailpress.theme('settings.color.palette', theme)
),
'carhop-green': { 'carhop-green': {
50: '#f1fcf9', 50: getBaseColor('carhop-green-light'),
100: '#cef9ee', 100: '#cef9ee',
200: '#9df2de', 200: '#9df2de',
300: '#64e4c9', 300: '#64e4c9',
@ -83,25 +79,14 @@ module.exports = {
950: '#2b0665', 950: '#2b0665',
}, },
}, },
fontSize: tailpress.fontSizeMapper( fontSize: tailpress.fontSizeMapper(tailpress.theme('settings.typography.fontSizes', theme)),
tailpress.theme(
'settings.typography.fontSizes',
theme
)
),
}, },
screens: { screens: {
xs: '480px', xs: '480px',
sm: '600px', sm: '600px',
md: '782px', md: '782px',
lg: tailpress.theme( lg: tailpress.theme('settings.layout.contentSize', theme),
'settings.layout.contentSize', xl: tailpress.theme('settings.layout.wideSize', theme),
theme
),
xl: tailpress.theme(
'settings.layout.wideSize',
theme
),
'2xl': '1441px', '2xl': '1441px',
}, },
}, },

View File

@ -19,6 +19,11 @@
"slug": "carhop-green", "slug": "carhop-green",
"color": "#136f63" "color": "#136f63"
}, },
{
"name": "Carhop Green Light",
"slug": "carhop-green-light",
"color": "#f1fcf9"
},
{ {
"name": "Carhop Orange", "name": "Carhop Orange",
"slug": "carhop-orange", "slug": "carhop-orange",