{{.Name}}
-{{.Name}}
+ +-
-
+
Nothing to see here (yet)!
-{{.Name}}
+{{.Name}}
{{if .Description}} -{{.Description}}
+{{.Description}}
{{end}} {{if .Date}} -+
diff --git a/Makefile b/Makefile index 8629f91..68c3ff6 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ CHECK := โ BUILD := ๐จ CLEAN := ๐งน RUN := ๐ -CSS := ๐จ TEST := ๐งช DOCKER := ๐ณ WARN := โ ๏ธ @@ -13,8 +12,6 @@ DOCS := ๐ BINARY_NAME := atri.dad DOCKER_IMAGE := atri-dot-dad GO_FILES := $(wildcard *.go) -CSS_INPUT := lib/stylegen/base.css -CSS_OUTPUT := public/css/styles.css # Docker detection DOCKER_ENV := $(shell if [ -f /.dockerenv ]; then echo true; else echo false; fi) @@ -24,13 +21,12 @@ else BASE_PATH := $(CURDIR) endif -.PHONY: all build clean run dev stylegen docker-dev docker-build docker-run test help reset ensure-swag +.PHONY: all build clean run dev docker-dev docker-build docker-run test help reset ensure-swag help: @echo "Available commands:" - @echo "make clean - Remove build artifacts" @echo "make reset - Clean and reset the project to initial state" - @echo "make build - Generate CSS, docs, and build Go binary" + @echo "make build - Generate docs and build Go binary" @echo "make run - Build and run the binary" @echo "make dev - Run in development mode" @echo "make docker-dev - Run development environment in Docker" @@ -45,37 +41,12 @@ ensure-swag: go install github.com/swaggo/swag/cmd/swag@latest; \ } -reset: - @echo "$(CLEAN) Performing complete project reset..." +clean: + @echo "$(CLEAN) Cleaning project..." @rm -f $(BINARY_NAME) - @rm -f $(CSS_OUTPUT) - @rm -rf public/css/* - @rm -f tailwind.config.js @rm -rf docs/docs.go docs/swagger.json docs/swagger.yaml @go clean -cache -testcache -modcache - @rm -rf $(BASE_PATH)/tw # Remove the 'tw' directory - @echo "$(CHECK) Project reset complete" - -clean: - @echo "$(CLEAN) Cleaning build artifacts..." - @rm -f $(BINARY_NAME) - @rm -f $(CSS_OUTPUT) - @rm -rf $(BASE_PATH)/lib/stylegen/tw # Remove the 'tw' directory - @echo "$(CHECK) Cleanup complete" - -stylegen: - @echo "$(CSS) Generating CSS styles..." - @echo "Current working directory: $$(pwd)" - @echo "Contents of current directory:" - @ls -la - @echo "\nContents of lib/stylegen:" - @ls -la lib/stylegen - @chmod +x $(BASE_PATH)/lib/stylegen/gen.sh - @$(BASE_PATH)/lib/stylegen/gen.sh \ - -e "html" \ - -d "$(BASE_PATH)/pages/templates" \ - -o "$(BASE_PATH)/public/css" - @echo "$(CHECK) CSS generation complete" + @echo "$(CHECK) Project clean complete" swaggergen: ensure-swag @echo "$(DOCS) Generating Swagger documentation..." @@ -83,7 +54,7 @@ swaggergen: ensure-swag @echo "$(CHECK) Swagger docs generated" # Combined generation target -generate: stylegen swaggergen +generate: swaggergen build: generate @echo "$(BUILD) Building binary..." diff --git a/lib/stylegen/base.css b/lib/stylegen/base.css deleted file mode 100644 index da42a5d..0000000 --- a/lib/stylegen/base.css +++ /dev/null @@ -1,29 +0,0 @@ -@import "tailwindcss"; - -@layer base { - html, - container, - body { - height: 100% !important; - width: 100% !important; - overflow-y: auto !important; - position: fixed !important; - } - - main { - margin-left: auto !important; - margin-right: auto !important; - width: 100% !important; - max-width: 100% !important; - text-align: center !important; - } - - .container { - margin-left: auto !important; - margin-right: auto !important; - display: flex !important; - flex-direction: column !important; - align-items: center !important; - justify-content: center !important; - } -} diff --git a/lib/stylegen/gen.sh b/lib/stylegen/gen.sh deleted file mode 100755 index d632db8..0000000 --- a/lib/stylegen/gen.sh +++ /dev/null @@ -1,112 +0,0 @@ -#!/usr/bin/env bash - -# Define the version of the binary to download -VERSION="v4.0.9" - -# Parse command-line arguments -while [[ $# -gt 0 ]]; do - case $1 in - -e|--extensions) - EXTENSIONS="$2" - shift; shift - ;; - -d|--directory) - DIRECTORY="$2" - shift; shift - ;; - -o|--output-dir) - OUTPUT_DIR="$2" - shift; shift - ;; - *) - echo "Unknown argument: $1" - exit 1 - ;; - esac -done - -# Get the directory where this script is located -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" -echo "Script directory: $SCRIPT_DIR" - -OS=$(uname -s) -ARCH=$(uname -m) - -# Normalize OS and ARCH identifiers -case $OS in - "Darwin") - OS="macos" - ;; - "Linux") - OS="linux" - ;; - "CYGWIN"*|"MINGW"*|"MSYS"*) - OS="windows" - ;; - *) - echo "Unknown operating system: $OS" - exit 1 - ;; -esac - -case $ARCH in - "x86_64") - ARCH="x64" - ;; - "arm64"|"aarch64") - ARCH="arm64" - ;; - *) - echo "Unsupported architecture: $ARCH" - exit 1 - ;; -esac - -echo "Detected OS: $OS" -echo "Detected Architecture: $ARCH" - -# Function to construct the binary download URL based on version, OS, and architecture -get_binary_url() { - echo "https://github.com/tailwindlabs/tailwindcss/releases/download/$VERSION/tailwindcss-$OS-$ARCH" -} - -# Create the 'tw' directory for storing the downloaded binary -TW_DIR="${SCRIPT_DIR}/tw" -mkdir -p "$TW_DIR" - -# Set the binary path -BINARY="${TW_DIR}/tailwindcss-${OS}-${ARCH}" - -# Check if the binary is already downloaded, otherwise download it -if [ ! -f "$BINARY" ]; then - echo "Binary not found, downloading version $VERSION..." - - DOWNLOAD_URL=$(get_binary_url) - - if [ -z "$DOWNLOAD_URL" ]; then - echo "No suitable release found for this OS and architecture." - exit 1 - fi - - # Download the binary - curl -L "$DOWNLOAD_URL" -o "$BINARY" - echo "Downloaded binary to: $BINARY" -fi - -# Make the binary executable -chmod +x "$BINARY" - -echo "Using binary: $BINARY" -echo "Extensions: $EXTENSIONS" -echo "Directory: $DIRECTORY" -echo "Output Directory: $OUTPUT_DIR" - -# Generate the minified version for production -echo "Generating minified CSS for production..." -"$BINARY" -i "${SCRIPT_DIR}/base.css" -o "${OUTPUT_DIR}/styles.css" --minify - -# Create empty daisyui.css and themes.css files if they don't exist -touch "${OUTPUT_DIR}/daisyui.css" -touch "${OUTPUT_DIR}/themes.css" - -echo "All CSS files generated" diff --git a/pages/home.go b/pages/home.go index 665afdc..98a745e 100644 --- a/pages/home.go +++ b/pages/home.go @@ -20,7 +20,7 @@ func Home(c echo.Context) error { { Name: "Email", Href: "mailto:me@atri.dad", - Icon: template.HTML(``), + Icon: template.HTML(``), }, { Name: "RSS", @@ -75,11 +75,6 @@ func Home(c echo.Context) error { Href: "https://docker.com", Icon: template.HTML(``), }, - { - Name: "NixOS", - Href: "https://nixos.org", - Icon: template.HTML(``), - }, } buttons := []lib.ButtonLink{ diff --git a/pages/templates/home.html b/pages/templates/home.html index e1793a8..4637a9a 100644 --- a/pages/templates/home.html +++ b/pages/templates/home.html @@ -14,18 +14,18 @@ Atridad Lahiji // Root {{end}} {{define "main"}} - -
-
{{.Description}}
+{{.Description}}
{{end}} {{if .Date}} -+