Skip to content

Commit

Permalink
- update package scripts so it compiles all styles for core, admin, s…
Browse files Browse the repository at this point in the history
…ocial and jobs
  • Loading branch information
joshtorres committed Jan 23, 2024
1 parent e99e69f commit 88da372
Show file tree
Hide file tree
Showing 10 changed files with 395 additions and 40 deletions.
18 changes: 13 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,21 @@
"private": true,
"type": "module",
"scripts": {
"dev:styles": "npx tailwind -i resources/css/index.css -o resources/dist/catalyst-core-plugin.css --postcss --watch",
"dev:styles-social": "npx tailwind -i resources/css/filament/social/theme.css -o resources/dist/catalyst-core-social.css --postcss --watch",
"dev:core-styles": "npx tailwind -i resources/css/index.css -o resources/dist/catalyst-core-plugin.css --postcss --watch",
"dev:admin-styles": "npx tailwind -i resources/css/filament/admin/theme.css -o resources/dist/catalyst-admin.css --postcss --watch",
"dev:social-styles": "npx tailwind -i resources/css/filament/social/theme.css -o resources/dist/catalyst-social.css --postcss --watch",
"dev:jobs-styles": "npx tailwind -i resources/css/filament/jobs/theme.css -o resources/dist/catalyst-jobs.css --postcss --watch",
"dev:scripts": "node bin/build.js --dev",
"build:admin-styles": "npx tailwind -i resources/css/filament/admin/theme.css -o resources/dist/catalyst-core-admin.css --postcss --minify && npm run purge",
"build:social-styles": "npx tailwind -i resources/css/filament/social/theme.css -o resources/dist/catalyst-core-social.css --postcss --minify && npm run purge",
"build:core-styles": "npx tailwind -i resources/css/index.css -o resources/dist/catalyst-core-plugin.css --postcss --minify && npm run purge",
"build:admin-styles": "npx tailwind -i resources/css/filament/admin/theme.css -o resources/dist/catalyst-admin.css --postcss --minify && npm run purge",
"build:social-styles": "npx tailwind -i resources/css/filament/social/theme.css -o resources/dist/catalyst-social.css --postcss --minify && npm run purge",
"build:jobs-styles": "npx tailwind -i resources/css/filament/jobs/theme.css -o resources/dist/catalyst-core-jobs.css --postcss --minify && npm run purge",
"build:scripts": "node bin/build.js",
"purge": "filament-purge -i resources/dist/catalyst-core-plugin.css -o resources/dist/catalyst-core-plugin.css -v 3.x",
"purge:core-styles": "filament-purge -i resources/dist/catalyst-core-plugin.css -o resources/dist/catalyst-core-plugin.css -v 3.x",
"purge:admin-styles": "filament-purge -i resources/dist/catalyst-admin.css -o resources/dist/catalyst-admin.css -v 3.x",
"purge:social-styles": "filament-purge -i resources/dist/catalyst-social.css -o resources/dist/catalyst-social.css -v 3.x",
"purge:jobs-styles": "filament-purge -i resources/dist/catalyst-jobs.css -o resources/dist/catalyst-jobs.css -v 3.x",
"purge": "npm-run-all purge:*",
"dev": "npm-run-all --parallel dev:*",
"build": "npm-run-all build:*"
},
Expand Down
174 changes: 174 additions & 0 deletions resources/css/filament/jobs/tailwind.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,174 @@
import preset from '../../../../vendor/filament/filament/tailwind.config.preset'
const plugin = require('tailwindcss/plugin');
const defaultTheme = require('tailwindcss/defaultTheme');
const colors = require('tailwindcss/colors')

export default {
presets: [preset],
content: [
'./app/Filament/Social/**/*.php',
'./resources/views/filament/social/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
'./vendor/laravel/framework/src/Illuminate/Pagination/resources/views/*.blade.php',
'./vendor/laravel/jetstream/**/*.blade.php',
'./vendor/omnia-digital/library/resources/views/**/*.blade.php',
'./vendor/omnia-digital/library/resources/js/**/*.js',
'./vendor/omnia-digital/media-manager/resources/views/**/*.blade.php',
'./storage/framework/views/*.php',
'./resources/views/**/*.blade.php',
'./Modules/*/Resources/views/**/*.blade.php',
'./vendor/filament/**/*.blade.php',
'./src/**/*.{html,js}',
'./node_modules/tw-elements/dist/js/**/*.js'
],

darkMode: 'class',
theme: {
themeVariants: [
'default',
'dark',
'hatchet',
'cfanea',
'newyear',
'valentines',
'patrick',
'easter',
'spring',
'summer',
'independence',
'fall',
'halloween',
'christmas',
'winter'
],
extend: {
fontFamily: {
sans: ["SF Pro Display", "Helvetica", "Roboto", "-apple-system", "BlinkMacSystemFont", "Segoe UI", "Arial", "sans-serif", ...defaultTheme.fontFamily.sans],
},
fontSize: {
'dot': '.15rem',
'2xs': '0.65rem',
'3xs': '0.55rem',
'base': '0.9375rem',
},
height: {
'13': '3.2rem',
'full-with-nav': 'calc(100vh - 56px)'
},
maxWidth: {
'sm': '22rem',
'2xl': '40rem',
'8xl': '82rem',
'9xl': '90rem',
'post-card-max-w': '680px'
},
colors: {
'base-text-color': 'var(--base-text-color)',
'white-text-color': 'var(--white-text-color)',
'light-text-color': 'var(--light-text-color)',
'dark-text-color': 'var(--dark-text-color)',
neutral: {
DEFAULT: 'var(--neutral)',
'light': 'var(--neutral-light)',
'dark': 'var(--neutral-dark)',
'hover': 'var(--neutral-hover)',
},
primary: {
DEFAULT: process.env.PRIMARY_COLOR || 'var(--primary)',
"50": "var(--primary-50)",
"100": "var(--primary-100)",
"200": "var(--primary-200)",
"300": "var(--primary-300)",
"400": "var(--primary-400)",
"500": process.env.PRIMARY_COLOR_500 || process.env.PRIMARY_COLOR || "var(--primary-500)",
"600": "var(--primary-600)",
"700": "var(--primary-700)",
"800": "var(--primary-800)",
"900": "var(--primary-900)"
},
secondary: {
DEFAULT: process.env.SECONDARY_COLOR || 'var(--secondary)',
"50": "var(--secondary-50)",
"100": "var(--secondary-100)",
"200": "var(--secondary-200)",
"300": "var(--secondary-300)",
"400": "var(--secondary-400)",
"500": "var(--secondary-500)",
"600": "var(--secondary-600)",
"700": "var(--secondary-700)",
"800": "var(--secondary-800)",
"900": "var(--secondary-900)"
},
tertiary: {
DEFAULT: process.env.TERTIARY_COLOR || 'var(--tertiary)',
"50": "var(--tertiary-50)",
"100": "var(--tertiary-100)",
"200": "var(--tertiary-200)",
"300": "var(--tertiary-300)",
"400": "var(--tertiary-400)",
"500": "var(--tertiary-500)",
"600": "var(--tertiary-600)",
"700": "var(--tertiary-700)",
"800": "var(--tertiary-800)",
"900": "var(--tertiary-900)"
},
danger: colors.rose,
success: colors.green,
warning: colors.yellow,
'main-nav-active-hover-text-color': 'var(--main-nav-active-hover-text-color)',
'main-nav-active-text-color': 'var(--main-nav-active-text-color)',
'main-nav-active-bg-color': 'var(--main-nav-active-bg-color)',
'main-nav-text-color': 'var(--main-nav-text-color)',
'main-nav-hover-text-color': 'var(--main-nav-hover-text-color)',
'main-nav-hover-bg-color': 'var(--main-nav-hover-bg-color)',
'post-card-bg-color': 'var(--post-card-bg-color)',
'post-card-border-color': 'var(--post-card-border-color)',
'post-card-border-hover-color': 'var(--post-card-border-hover-color)',
'post-card-title-color': 'var(--post-card-title-color)',
'post-card-meta-color': 'var(--post-card-meta-color)',
'post-card-body-color': 'var(--post-card-body-color)',
'post-card-shadows': 'var(--post-card-shadows)',
'heading-default-color': 'var(--heading-default-color)',
'h1-color': 'var(--h1-color)',
'h2-color': 'var(--h2-color)',
'h3-color': 'var(--h3-color)',
'h4-color': 'var(--h4-color)',
'h5-color': 'var(--h5-color)',
'h6-color': 'var(--h6-color)',
},
},
},

variants: {
extend: {
textOpacity: ['dark'],
display: ["group-hover"]
}
},

plugins: [
require('@tailwindcss/forms'),
require('@tailwindcss/typography'),
/* require('tailwindcss-multi-theme'), */
require('@tailwindcss/aspect-ratio'),
require('tailwind-scrollbar-hide'),
require('tw-elements/dist/plugin'),
plugin(function({ matchUtilities, theme }) {
matchUtilities(
{
'h-full-minus': (value) => {
return {
height: 'calc(100vh - ' + value + ')',
}
},
'max-h-full-minus': (value) => {
return {
maxHeight: 'calc(100vh - ' + value + ')',
}
},
},
)
}),
]
};

171 changes: 171 additions & 0 deletions resources/css/filament/jobs/theme.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
@import '../../index.css';
@tailwind base;
@tailwind components;
@tailwind utilities;

@config './tailwind.config.js';

/* Themes */
/*@import url('./themes/dark.css');*/
[x-cloak] {
display: none;
}

@layer base {
/*:root {*/
/* --base-text-color: #050505;*/
/* --white-text-color: #fff;*/
/* --light-text-color: #9ca3af;*/
/* --dark-text-color: #272d38;*/
/* --base-heading-color: var(--base-text-color);*/
/* --neutral: #F0F2F5;*/
/* --neutral-light: #f6f7f8;*/
/* --neutral-dark: #6b7280;*/
/* --neutral-hover: #eff0f2;*/
/* --primary: #EB6B56;*/
/* --primary-50: #ff4f60;*/
/* --primary-100: #ff4556;*/
/* --primary-200: #f93b4c;*/
/* --primary-300: #ef3142;*/
/* --primary-400: #e52738;*/
/* --primary-500: #db1d2e;*/
/* --primary-600: #d11324;*/
/* --primary-700: #c7091a;*/
/* --primary-800: #bd0010;*/
/* --primary-900: #b30006;*/
/* --secondary: white;*/
/* --secondary-50: white;*/
/* --secondary-100: white;*/
/* --secondary-200: white;*/
/* --secondary-300: white;*/
/* --secondary-400: #8C8C8C;*/
/* --secondary-500: #707070;*/
/* --secondary-600: #595959;*/
/* --secondary-700: #424242;*/
/* --secondary-800: #2E2E2E;*/
/* --secondary-900: #171717;*/
/* --tertiary: #384263;*/
/* --tertiary-50: #E8EBF2;*/
/* --tertiary-100: #D1D6E5;*/
/* --tertiary-200: #A4ADCB;*/
/* --tertiary-300: #7684B2;*/
/* --tertiary-400: #51608F;*/
/* --tertiary-500: #384263;*/
/* --tertiary-600: #2C344E;*/
/* --tertiary-700: #21273B;*/
/* --tertiary-800: #161A27;*/
/* --tertiary-900: #0B0D14;*/
/* --main-nav-active-text-color: var(--base-heading-color);*/
/* --main-nav-active-text-color: var(--neutral);*/
/* --main-nav-active-bg-color: var(--primary);*/
/* --main-nav-text-color: var(--base-text-color);*/
/* --main-nav-hover-text-color: var(--neutral);*/
/* --main-nav-hover-bg-color: var(--primary);*/
/* --post-card-bg-color: var(--secondary);*/
/* --post-card-border-color: var(--neutral-light);*/
/* --post-card-border-hover-color: var(--dark-text-color);*/
/* --post-card-title-color: var(--dark-text-color);*/
/* --post-card-meta-color: var(--light-text-color);*/
/* --post-card-body-color: var(--base-text-color);*/
/* --post-card-shadows: '0px 1px 3px rgba(0, 0, 0, 0.1), 0px 1px 2px rgba(0, 0, 0, 0.06)';*/
/* --heading-default-color: var(--dark-text-color);*/
/* --h1-color: var(--heading-default-color);*/
/* --h2-color: var(--heading-default-color);*/
/* --h3-color: var(--heading-default-color);*/
/* --h4-color: var(--heading-default-color);*/
/* --h5-color: var(--heading-default-color);*/
/*}*/
}


@layer utilities {
.masonry-1 {
column-gap: 1em;
column-count: 1;
}

.masonry-2 {
column-gap: 1em;
column-count: 2;
}

.masonry-3 {
column-gap: 1em;
column-count: 3;
}

.break-inside {
break-inside: avoid;
}
}

p, a, body, h1, h2, h3, h4, h5, h6 {
@apply text-base-text-color;
}

p, a, body {
@apply text-base;
}

h3 a, h4 a, h5 a, h6 a {
@apply hover:underline;
}

h1, h2, h3, h4, h5, h6 {
@apply text-dark-text-color;
@apply font-bold;
}

h1 {
@apply text-2xl;
}

h2 {
@apply text-xl;
}

h3 {
@apply text-lg;
}

h4 {
@apply text-base;
}

h5 {
@apply text-sm;
}

.sub-app-header {
@apply px-4 py-2
}

.sub-app-sub-header {
@apply py-2
}

[x-cloak] {
display: none !important;
}

.card {
@apply pt-1 bg-secondary shadow rounded-lg;
}

.fill-row-span > * {
@apply h-full;
}

.stretched-link::after {
content: "";
@apply z-10 absolute inset-0 bg-transparent pointer-events-auto;
}

.overlay::before {
@apply content-[''] absolute w-full inset-0 opacity-75;
}

.hint-text {
font-size: 0.65rem;
max-width: 375px;
}
Loading

0 comments on commit 88da372

Please sign in to comment.