ee46088985
Add a thumbnailScale field (xs/sm/md/lg/xl) to gallery layout settings that adjusts column counts for Grid, Masonry (columns mode), and Mosaic layouts. Each scale maps to a column offset applied on top of the layout's base columns, letting photographers control photo density. - Add thumbnailScale to GalleryLayoutSettings type - Apply scale offset in Grid, Masonry, and Mosaic layout components - Add thumbnail scale dropdown to admin theme customizer - Conditionally show dropdown only for applicable layouts - Safelist dynamic grid-cols classes in Tailwind config - Add i18n keys for EN, DE, PT, RU locales Co-authored-by: Paul Nothaft <paul@MacStudio-von-Paul.local>
97 lines
2.6 KiB
JavaScript
97 lines
2.6 KiB
JavaScript
/** @type {import('tailwindcss').Config} */
|
|
export default {
|
|
darkMode: 'class',
|
|
content: [
|
|
"./index.html",
|
|
"./src/**/*.{js,ts,jsx,tsx}",
|
|
],
|
|
theme: {
|
|
extend: {
|
|
colors: {
|
|
primary: {
|
|
50: '#f0fdf4',
|
|
100: '#dcfce7',
|
|
200: '#bbf7d0',
|
|
300: '#86efac',
|
|
400: '#4ade80',
|
|
500: '#22c55e',
|
|
600: '#5C8762', // Main brand color from scrappbook.de
|
|
700: '#4a6f4f',
|
|
800: '#3f5d42',
|
|
900: '#365238',
|
|
},
|
|
sand: {
|
|
50: '#fdfcfb',
|
|
100: '#f7f5f2',
|
|
200: '#f0ebe5',
|
|
300: '#e6ddd4',
|
|
400: '#d4c2b0',
|
|
500: '#c2a68c',
|
|
600: '#b18b68',
|
|
},
|
|
neutral: {
|
|
50: '#fafafa',
|
|
100: '#f5f5f5',
|
|
200: '#e5e5e5',
|
|
300: '#d4d4d4',
|
|
400: '#a3a3a3',
|
|
500: '#737373',
|
|
600: '#525252',
|
|
700: '#404040',
|
|
800: '#262626',
|
|
900: '#171717',
|
|
}
|
|
},
|
|
fontFamily: {
|
|
sans: ['Inter', 'Noto Sans', 'system-ui', '-apple-system', 'sans-serif'],
|
|
},
|
|
animation: {
|
|
'fade-in': 'fadeIn 0.5s ease-in-out',
|
|
'slide-up': 'slideUp 0.3s ease-out',
|
|
'scale-in': 'scaleIn 0.2s ease-out',
|
|
'shimmer': 'shimmer 2s cubic-bezier(0.4, 0, 0.6, 1) infinite',
|
|
},
|
|
keyframes: {
|
|
fadeIn: {
|
|
'0%': { opacity: '0' },
|
|
'100%': { opacity: '1' },
|
|
},
|
|
slideUp: {
|
|
'0%': { transform: 'translateY(10px)', opacity: '0' },
|
|
'100%': { transform: 'translateY(0)', opacity: '1' },
|
|
},
|
|
scaleIn: {
|
|
'0%': { transform: 'scale(0.95)', opacity: '0' },
|
|
'100%': { transform: 'scale(1)', opacity: '1' },
|
|
},
|
|
shimmer: {
|
|
'0%': { backgroundPosition: '-200% 0' },
|
|
'100%': { backgroundPosition: '200% 0' },
|
|
},
|
|
},
|
|
spacing: {
|
|
'18': '4.5rem',
|
|
'88': '22rem',
|
|
},
|
|
borderRadius: {
|
|
'xl': '1rem',
|
|
'2xl': '1.25rem',
|
|
},
|
|
boxShadow: {
|
|
'soft': '0 2px 8px rgba(0, 0, 0, 0.04)',
|
|
'medium': '0 4px 16px rgba(0, 0, 0, 0.08)',
|
|
'large': '0 8px 32px rgba(0, 0, 0, 0.12)',
|
|
},
|
|
},
|
|
},
|
|
safelist: [
|
|
// Dynamic grid-cols classes used by thumbnail scale offsets
|
|
...Array.from({ length: 12 }, (_, i) => `grid-cols-${i + 1}`),
|
|
...Array.from({ length: 12 }, (_, i) => `sm:grid-cols-${i + 1}`),
|
|
...Array.from({ length: 12 }, (_, i) => `lg:grid-cols-${i + 1}`),
|
|
...Array.from({ length: 12 }, (_, i) => `xl:grid-cols-${i + 1}`),
|
|
],
|
|
plugins: [],
|
|
}
|
|
|