diff --git a/Makefile b/Makefile index 4b63d7c..38bccbe 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,13 @@ -EMIT_ASSETS := index.html 404.html info.html \ - styles.css icons.css \ - countdown.js theme.js theme.js \ - stallman.webp stallman_2024.webp +PAGES := index.html 404.html info.html +SHARED_FILES := stallman.webp stallman_2024.webp favicon.ico \ + moon.svg sun.svg narrow_light.svg narrow_dark.svg wide_light.svg wide_dark.svg \ + styles.css icons.css \ + countdown.js theme.js SEARCH_REPLACE := lib/search_and_replace/target/release/search_and_replace COMPONENTS := head.html header.html nav.html footer.html .PHONY: build -build: $(EMIT_ASSETS:%=dst/cz/%) $(EMIT_ASSETS:%=dst/en/%) dst/favicon.ico +build: $(PAGES:%=dst/cz/%) $(PAGES:%=dst/en/%) $(SHARED_FILES:%=dst/%) .PHONY: clean clean: @@ -25,38 +26,30 @@ define make_page > $(2) endef -dst/cz/%.html: cz_%.html $(SEARCH_REPLACE) $(COMPONENTS:%=components/cz/%) +dst/cz/%.html: pages/cz/%.html $(SEARCH_REPLACE) $(COMPONENTS:%=components/cz/%) @mkdir -p $(@D) $(call make_page,$<,$@,cz) -dst/cz/%.css: %.css - @mkdir -p $(@D) - ln -f $< $@ - -dst/cz/%.js: js/%.js - @mkdir -p $(@D) - ln -f $< $@ - -dst/cz/%.webp: images/%.jpg - @mkdir -p $(@D) - magick $< $@ - -dst/en/%.html: en_%.html $(SEARCH_REPLACE) $(COMPONENTS:%=components/en/%) +dst/en/%.html: pages/en/%.html $(SEARCH_REPLACE) $(COMPONENTS:%=components/en/%) @mkdir -p $(@D) $(call make_page,$<,$@,en) -dst/en/%.css: %.css +dst/%.css: styles/%.css @mkdir -p $(@D) ln -f $< $@ -dst/en/%.js: js/%.js +dst/%.js: scripts/%.js @mkdir -p $(@D) ln -f $< $@ -dst/en/%.webp: images/%.jpg +dst/%.webp: images/%.jpg @mkdir -p $(@D) magick $< $@ +dst/%.svg: icons/%.svg + @mkdir -p $(@D) + ln -f $< $@ + dst/favicon.ico: images/favicon.ico @mkdir -p $(@D) ln -f $< $@ diff --git a/components/cz/head.html b/components/cz/head.html index 16cf667..630cac9 100644 --- a/components/cz/head.html +++ b/components/cz/head.html @@ -1,7 +1,7 @@ - - - - + + + + diff --git a/components/cz/nav.html b/components/cz/nav.html index 469dc19..a9fa0fd 100644 --- a/components/cz/nav.html +++ b/components/cz/nav.html @@ -1,9 +1,9 @@