update home template

This commit is contained in:
2025-08-05 16:03:49 +03:00
parent 38acb206dd
commit b27ea08637
268 changed files with 6303 additions and 109133 deletions

View File

@@ -1,15 +1,40 @@
#!/bin/bash
echo "Starting build..."
echo "🔍 Checking for Tailwind CSS..."
if ! [ -d "node_modules" ]; then
echo "📦 Installing Tailwind CSS and dependencies..."
npm install
# TODO: Check if current version is latest to avoid redundant installation
# checks os and architecture for correct release
# https://stackoverflow.com/a/8597411
echo "Installing & building tailwind..."
ASSET="tailwindcss"
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
ASSET="$ASSET-linux"
elif [[ "$OSTYPE" == "darwin"* ]]; then
ASSET="$ASSET-macos"
fi
if [[ "$(uname -m)" == "x86_64"* ]]; then
ASSET="$ASSET-x64"
elif [[ "$(uname -m)" == "arm64"* ]]; then
ASSET="$ASSET-arm64"
fi
echo "🚀 Building Tailwind CSS..."
npx tailwindcss -i ./static/css/main.css -o ./static/css/output.css --minify
curl -sLO "https://github.com/tailwindlabs/tailwindcss/releases/download/v3.4.17/${ASSET}"
echo "🔨 Building Zola site..."
chmod +x $ASSET
mv $ASSET tailwindcss
# initialized and configures tailwind if not configured
echo "Initializing tailwind..."
if [[ ! -f "tailwind.config.js" ]]
then
./tailwindcss init
sed -i '' "s| content: \\[\\],| content: \\['./templates/**/*.html'\\],|g" tailwind.config.js
fi
# compiles tailwind css for prod & builds project
echo "Compiling tailwindcss and building zola project..."
rm -rf public static/css
./tailwindcss -i css/index.css -o ./static/css/index.css --minify
zola build
echo "✅ Build complete!"