appstore: replace tailwind huge JS play CDN with some actual minimal css build
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
curl -L https://cdn.tailwindcss.com?plugins=forms > tailwindcss.js
|
||||
# Download standalone tailwind to compile what we need
|
||||
wget https://github.com/tailwindlabs/tailwindcss/releases/download/v3.3.3/tailwindcss-linux-x64
|
||||
chmod +x tailwindcss-linux-x64
|
||||
./tailwindcss-linux-x64 --input tailwind-local.css --output tailwind.css --minify
|
||||
|
||||
curl https://cdn.jsdelivr.net/npm/fork-awesome@1.2.0/css/fork-awesome.min.css > fork-awesome.min.css
|
||||
sed -i 's@../fonts/@@g' ./fork-awesome.min.css
|
||||
|
37
store/assets/tailwind-local.css
Normal file
37
store/assets/tailwind-local.css
Normal file
@ -0,0 +1,37 @@
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@layer utilities {
|
||||
.btn {
|
||||
@apply text-sm font-medium rounded-md px-4 py-2 transition;
|
||||
}
|
||||
.btn-sm {
|
||||
@apply text-xs font-medium rounded-md px-2 py-2 transition;
|
||||
}
|
||||
.btn-success {
|
||||
@apply text-white bg-green-500 hover:bg-green-700;
|
||||
}
|
||||
.btn-primary {
|
||||
@apply text-white bg-blue-500 hover:bg-blue-700;
|
||||
}
|
||||
.btn-link {
|
||||
@apply bg-gray-100 hover:bg-gray-200;
|
||||
}
|
||||
.btn-primary-outline {
|
||||
@apply border text-blue-600 border-blue-500 hover:text-blue-400;
|
||||
}
|
||||
.from-markdown p {
|
||||
@apply mb-2;
|
||||
}
|
||||
.from-markdown h3 {
|
||||
@apply text-xl mb-1 font-semibold;
|
||||
}
|
||||
.from-markdown ul {
|
||||
padding: revert;
|
||||
list-style: disc;
|
||||
}
|
||||
.from-markdown a {
|
||||
@apply text-blue-600;
|
||||
}
|
||||
}
|
17
store/assets/tailwind.config.js
Normal file
17
store/assets/tailwind.config.js
Normal file
@ -0,0 +1,17 @@
|
||||
/** @type {import('tailwindcss').Config} */
|
||||
module.exports = {
|
||||
content: ['../templates/*.html'],
|
||||
theme: {
|
||||
extend: {},
|
||||
},
|
||||
plugins: [
|
||||
require('@tailwindcss/forms'),
|
||||
],
|
||||
safelist: [
|
||||
'safelisted',
|
||||
{
|
||||
pattern: /^(text-[a-z]+-600|border-[a-z]+-400)$/,
|
||||
},
|
||||
]
|
||||
}
|
||||
|
Reference in New Issue
Block a user