From 4e2ef85c7311e1b63b347bfb30a20159dafd2d3d Mon Sep 17 00:00:00 2001 From: despiegk Date: Sat, 22 Feb 2025 18:15:32 +0300 Subject: [PATCH] ... --- env.sh | 38 ++++++++++++++--- format_data.sh | 0 tailwind.config.js | 95 +++--------------------------------------- www_projectmycelium_io | 1 - 4 files changed, 38 insertions(+), 96 deletions(-) mode change 100644 => 100755 format_data.sh delete mode 160000 www_projectmycelium_io diff --git a/env.sh b/env.sh index c0bc6c591..2100975a8 100644 --- a/env.sh +++ b/env.sh @@ -1,3 +1,4 @@ + export NAME='threefoldio' SOURCE=${BASH_SOURCE[0]} @@ -59,6 +60,8 @@ if [[ ! -f "$HOME/hero/bin/tailwindcss" ]]; then popd fi + +# Zola version and platform-specific binaries are handled in the install functions below check_zola() { if command -v zola &> /dev/null; then echo "Zola is already installed." @@ -88,12 +91,37 @@ install_zola_arch() { # Function to install Zola on macOS install_zola_macos() { echo "Installing Zola on macOS..." - if command -v brew &> /dev/null; then - brew install zola + ZOLA_VERSION="v0.18.0" + + # Determine architecture + if [[ "$(uname -m)" == "arm64" ]]; then + ZOLA_ARCH="aarch64" else - echo "Homebrew is not installed. Please install Homebrew first." + ZOLA_ARCH="x86_64" + fi + + ZOLA_FILE="zola-${ZOLA_VERSION}-${ZOLA_ARCH}-apple-darwin.tar.gz" + ZOLA_URL="https://github.com/getzola/zola/releases/download/${ZOLA_VERSION}/${ZOLA_FILE}" + + echo "Downloading Zola ${ZOLA_VERSION} for ${ZOLA_ARCH}..." + pushd /tmp + curl -sLO "${ZOLA_URL}" + + # Check file size (should be around 8-9MB) + FILE_SIZE=$(get_file_size "$ZOLA_FILE") + if [[ $FILE_SIZE -lt 7000000 ]]; then + echo "Error: Downloaded file size is less than 7MB, download may be incomplete." + rm "$ZOLA_FILE" + popd exit 1 fi + + # Extract and install + tar -xzf "$ZOLA_FILE" + chmod +x zola + mv zola "$HOME/hero/bin/" + rm "$ZOLA_FILE" + popd } if ! check_zola; then @@ -131,6 +159,6 @@ fi # Compile tailwindcss for prod & build project echo "Compiling tailwindcss and building zola project..." rm -rf public static/css + +set +e tailwindcss -i css/index.css -o ./static/css/index.css --minify - - diff --git a/format_data.sh b/format_data.sh old mode 100644 new mode 100755 diff --git a/tailwind.config.js b/tailwind.config.js index 1c659e7f2..ba15afcc2 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -1,94 +1,9 @@ -const colors = require('tailwindcss/colors') - +/** @type {import('tailwindcss').Config} */ module.exports = { - content: [ - './templates/**/*.html' - ], - safelist: [ - { - pattern: /(-|)(ml|mr)-(4|8|12|16|20|24|28)/, - variants: [ - 'sm', 'md', 'lg', - 'first', 'first:sm', 'first:md', 'first:lg', - 'last', 'last:sm', 'last:md', 'last:lg' - ], - }, - { - pattern: /(pt|pb)-(0)/, - variants: [ - '!', 'lg', - 'first', 'first:sm', 'first:md', 'first:lg', - 'last', 'last:sm', 'last:md', 'last:lg' - ], - }, - { - pattern: /bg-teal-(50|100|200|300|400|500|600|700|800|900)/, // Added teal color safelist - } - ], - - important: true, + content: ['./templates/**/*.html'], theme: { - fontSize: { - 'xs': '.75rem', - 'sm': '.875rem', - 'tiny': '.875rem', - 'base': '1rem', - 'md': '1.05rem', - 'lg': '1.125rem', - 'xl': '1.25rem', - '2xl': '1.5rem', - '3xl': '1.875rem', - '4xl': '2.25rem', - '5xl': '3rem', - '6xl': '4rem', - '7xl': '5rem', - }, - colors: { - transparent: 'transparent', - white: '#ffffff', - black: '#000000', - green: '#c7c7c7 ', - gray: colors.gray, - slate: colors.slate, - stone: colors.stone, - zinc: colors.zinc, - yellow: colors.yellow, - orange: colors.orange, - sky: colors.sky, - blue: { - '100': '#bbeeff', - '200': '#00aaff', - '300': '#0088ff', - '400': '#0033ff', - '500': '#0000ff', - '600': '#0000bb', - '700': '#0000aa', - '800': '#000088', - '900': '#000066', - }, - - }, - extend: { - screens: { - '2xl': '1450px', - // => @media (min-width: 992px) { ... } - }, - animation: { - 'infinite-scroll': 'infinite-scroll 25s linear infinite', - }, - keyframes: { - 'infinite-scroll': { - from: { transform: 'translateX(0)' }, - to: { transform: 'translateX(-100%)' }, - } - }, - fontFamily: { - sans: ['Inter', 'sans-serif'], - }, - }, + extend: {}, }, - plugins: [ - require('@tailwindcss/aspect-ratio'), - // require("flyonui"), - ], // if we add forms, do it here + plugins: [], } + diff --git a/www_projectmycelium_io b/www_projectmycelium_io deleted file mode 160000 index cbe5e7684..000000000 --- a/www_projectmycelium_io +++ /dev/null @@ -1 +0,0 @@ -Subproject commit cbe5e768428912ef2490f227b03dc07773cf03ab