From 611777a9d5af33b870a9165b6ea818da4c70bad9 Mon Sep 17 00:00:00 2001 From: James Magahern Date: Sun, 10 Aug 2025 17:47:57 -0700 Subject: [PATCH] css fix --- Makefile | 5 ++++- {css => assets/css}/style.css | 0 templates/base.gohtml | 2 +- templates/index.gohtml | 4 ++-- templates/print.gohtml | 2 +- templates/print_2up.gohtml | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) rename {css => assets/css}/style.css (100%) diff --git a/Makefile b/Makefile index b9fc7d8..c61d1e0 100644 --- a/Makefile +++ b/Makefile @@ -5,6 +5,8 @@ endif PAGES := $(sort $(wildcard pages/*.html)) pages.yaml TEMPLATES := $(sort $(wildcard templates/*.gohtml)) +ASSETS_DIR := assets +ASSETS_FILES := $(shell find $(ASSETS_DIR) -type f 2>/dev/null) OUT_DIR := _dist PAGES_DIR := pages @@ -14,9 +16,10 @@ TEMPLATES_DIR := templates build: $(OUT_DIR)/index.stamp -$(OUT_DIR)/index.stamp: $(PAGES) $(TEMPLATES) cmd/build/main.go +$(OUT_DIR)/index.stamp: $(PAGES) $(TEMPLATES) $(ASSETS_FILES) cmd/build/main.go @$(GO) run ./cmd/build --pages $(PAGES_DIR) --out $(OUT_DIR) --templates $(TEMPLATES_DIR) --order pages.yaml @mkdir -p $(OUT_DIR) + @if [ -d $(ASSETS_DIR) ]; then rm -rf $(OUT_DIR)/$(ASSETS_DIR); cp -r $(ASSETS_DIR) $(OUT_DIR)/; fi @date +%s > $(OUT_DIR)/index.stamp serve: build diff --git a/css/style.css b/assets/css/style.css similarity index 100% rename from css/style.css rename to assets/css/style.css diff --git a/templates/base.gohtml b/templates/base.gohtml index 86dfe9b..03c65c9 100644 --- a/templates/base.gohtml +++ b/templates/base.gohtml @@ -4,7 +4,7 @@ {{ .Title }} - +
{{ .Content }}
diff --git a/templates/index.gohtml b/templates/index.gohtml index 941ceb6..1de664d 100644 --- a/templates/index.gohtml +++ b/templates/index.gohtml @@ -4,7 +4,7 @@ All Pages - +