mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-24 01:42:10 +00:00
e8f31f9f08
- Text width was too wide on wide screens; reduce it. - Make the nav-links' responsive layout for narrow viewports trigger at a narrower window size. It used to trigger at 600px, but I made it trigger at 32rem instead since the nav links aren't too wide. This also handles cases where users' default sans-serif fonts are very wide: rem measures by character width instead of pixels. - Make the narrow-optimized multiline-navlinks the default, and make widescreens a special case detected with a CSS media query. Previously, widescreens were the default; however, this meant that browsers that didn't support media queries (like dillo and netsurf) couldn't switch to the multi-line navigation at narrow widths. This is a good example of progressive enhancement; modern browsers will get the same behavior as before, but the lowest common denominator will see a better experience. - Don't further reduce the max-width for narrow screens; narrow screens are already narrow. We now have one less CSS rule.
53 lines
1.6 KiB
Makefile
53 lines
1.6 KiB
Makefile
CSS_DIR = themes/etch-custom/assets/css
|
|
|
|
USER = deploy@seirdy.one
|
|
WWW_ROOT = /var/www/seirdy.one
|
|
GEMINI_ROOT = /srv/gemini/seirdy.one
|
|
|
|
WWW_RSYNC_DEST = $(USER):$(WWW_ROOT)
|
|
GEMINI_RSYNC_DEST = $(USER):$(GEMINI_ROOT)
|
|
|
|
OUTPUT_DIR = public
|
|
|
|
RSYNCFLAGS += -rlvz --zc=zstd
|
|
|
|
# .hintrc-local for linting local files
|
|
# same as regular .hintrc but with a different connector.
|
|
.hintrc-local: .hintrc
|
|
jq --tab '.connector .name = "local" | del(.connector .options)' <.hintrc >.hintrc-local
|
|
|
|
clean:
|
|
rm -rf $(OUTPUT_DIR) .hintrc-local
|
|
|
|
lint-css:
|
|
stylelint $(CSS_DIR)/main.css $(CSS_DIR)/dark.css $(CSS_DIR)/wide.css
|
|
csslint $(CSS_DIR)
|
|
|
|
lint: lint-css hugo .hintrc-local
|
|
hint --config .hintrc-local -f codeframe $(OUTPUT_DIR)
|
|
|
|
check-links: hugo
|
|
lychee --verbose $(find public -type f -name '*.html' -o -name '*.gmi' -o -name '*.txt')
|
|
|
|
test: lint check-links
|
|
|
|
hugo:
|
|
hugo --gc
|
|
|
|
build: hugo
|
|
# gzip_static + max zopfli compression
|
|
ifndef NO_GZIP_STATIC
|
|
find $(OUTPUT_DIR) -type f -name '*.html' -o -name '*.css' -o -name '*.xml' -o -name '*.txt' \
|
|
| grep -v gemini \
|
|
| xargs zopfli --i50 --gzip
|
|
endif
|
|
|
|
|
|
deploy: build
|
|
rsync $(RSYNCFLAGS) --exclude 'gemini' --exclude '*.gmi' --exclude-from .rsyncignore $(OUTPUT_DIR)/ $(WWW_RSYNC_DEST) --delete
|
|
rsync $(RSYNCFLAGS) --exclude '*.html' --exclude '*.xml' --exclude-from .rsyncignore $(OUTPUT_DIR)/gemini/ $(OUTPUT_DIR)/about $(OUTPUT_DIR)/posts $(OUTPUT_DIR)/publickey.txt $(GEMINI_RSYNC_DEST)/ --delete
|
|
rsync $(RSYNCFLAGS) $(OUTPUT_DIR)/posts/gemini.xml $(GEMINI_RSYNC_DEST)/feed.xml
|
|
|
|
all: clean test deploy
|
|
|
|
.PHONY: clean lint-css lint check-links test hugo build deploy all
|