From 7fee36b4fbae90dacdecb917e262ad58927fe746 Mon Sep 17 00:00:00 2001 From: Bobby <30593201+luciferreeves@users.noreply.github.com> Date: Tue, 20 Jan 2026 14:02:34 +0530 Subject: Add Tailwind CSS and HTMX integration and implement custom template tags --- scripts/htmx.setup.sh | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100755 scripts/htmx.setup.sh (limited to 'scripts/htmx.setup.sh') diff --git a/scripts/htmx.setup.sh b/scripts/htmx.setup.sh new file mode 100755 index 0000000..c3eaaf3 --- /dev/null +++ b/scripts/htmx.setup.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -e + +STATIC_JS_DIR="static/js" +HTMX_FILE="$STATIC_JS_DIR/htmx.min.js" + +echo "Fetching latest HTMX release..." +LATEST_RELEASE=$(curl -s https://api.github.com/repos/bigskysoftware/htmx/releases/latest | grep '"tag_name":' | sed -E 's/.*"v([^"]+)".*/\1/') + +if [ -z "$LATEST_RELEASE" ]; then + echo "Failed to fetch latest release, using default version 2.0.8" + LATEST_RELEASE="2.0.8" +fi + +echo "Latest version: $LATEST_RELEASE" +DOWNLOAD_URL="https://unpkg.com/htmx.org@${LATEST_RELEASE}/dist/htmx.min.js" + +echo "Downloading from: $DOWNLOAD_URL" +echo "" + +mkdir -p "$STATIC_JS_DIR" + +if curl -fSL "$DOWNLOAD_URL" -o "$HTMX_FILE"; then + echo "" + echo "HTMX installed successfully!" + echo "Location: $HTMX_FILE" + echo "Version: $LATEST_RELEASE" +else + echo "" + echo "Failed to download HTMX" + exit 1 +fi \ No newline at end of file -- cgit v1.2.3