rainbow quox

This commit is contained in:
Rhiannon Morris 2024-12-09 22:15:42 +01:00
parent e35f46003b
commit e14bc51fff
16 changed files with 1021 additions and 802 deletions

View file

@ -1,5 +1,3 @@
CSS = $(wildcard style/*.css) $(shell find fonts -type f) \
rainbow-quox/style.css
PAGES = index.html pubkey.txt rainbow-quox/index.html
MEDIA = \
$(wildcard media/*.png) $(wildcard media/*.gif) $(wildcard media/*.webp) \
@ -8,6 +6,9 @@ MEDIA = \
$(wildcard rainbow-quox/front/*) $(wildcard rainbow-quox/back/*) \
rainbow-quox/palette.svg rainbow-quox/bright-squares.png \
rainbow-quox/back.svg
CSS = $(shell find fonts -type f) \
$(patsubst %.scss,%.css, \
$(wildcard rainbow-quox/*.scss) $(wildcard style/*.css))
SCRIPTS = $(patsubst %.ts,%.js,$(wildcard script/*.ts rainbow-quox/*.ts))
MISC = $(shell find .well-known -type f)
ALL = $(CSS) $(PAGES) $(MEDIA) $(SCRIPTS) $(MISC)
@ -31,41 +32,31 @@ upload: build
$(BUILDDIR)/ $(HOST):$(REMOTE_DIR)/
$(BUILDDIR)/%: %
@echo $*
@mkdir -p $(dir $@)
@cp $< $@
$(BUILDDIR)/%.gif: %_bg.gif
@echo $(notdir $@)
@mkdir -p $(dir $(BUILDDIR)/$* $(TMPDIR)/$*)
@gifsicle -U $*_bg.gif -o $(TMPDIR)/$*_bg_u.gif
@convert -transparent '#ff9bc7' $(TMPDIR)/$*_bg_u.gif $(TMPDIR)/$*_t.gif
@gifsicle --disposal=previous $(TMPDIR)/$*_t.gif -o $(BUILDDIR)/$*.gif
$(BUILDDIR)/%_small.png: %.svg
@echo $(notdir $@)
@mkdir -p $(dir $@)
@inkscape -e $@ -h 16 $< >/dev/null
$(BUILDDIR)/%_large.png: %.svg
@echo $(notdir $@)
@mkdir -p $(dir $@)
@inkscape -e $@ -h 30 $< >/dev/null
$(BUILDDIR)/%_dim.png: %.png
@echo $(notdir $@)
@convert -channel A -evaluate Multiply 0.75 $< $@
@echo '[copy] ' $<
mkdir -p $(dir $@)
cp $< $@
$(BUILDDIR)/%.js: %.ts
@echo '[tsc] ' $<
tsc --strict --noUncheckedIndexedAccess --noEmitOnError \
--lib dom,es2023 --target es2015 \
--outDir $(dir $@) $^
$(BUILDDIR)/rainbow-quox/palette.svg: rainbow-quox/palette.svg.raku
raku $^ $@
$(BUILDDIR)/rainbow-quox/palette.svg: rainbow-quox/make-palette/*
@echo '[make-palette] rainbow-quox/palette.svg'
cd rainbow-quox/make-palette; \
cabal run -v0 -- make-palette $(abspath $@)
$(BUILDDIR)/%.css: %.scss $(wildcard $(dir %)/lib/*.scss)
@echo '[sass] ' $<
mkdir -p $(dir $@)
sass --no-source-map -I style $< $@ \
--silence-deprecation mixed-decls
clean:
@echo '[clean]'
$(RM) -r $(TMPDIR) $(BUILDDIR)
.PHONY: clean all build upload
.SILENT: