diff --git a/MANIFEST.in b/MANIFEST.in index dbb963c1..ff5fdcba 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,3 +1,3 @@ include *.rst -recursive-include ihatemoney *.rst *.py *.yaml *.po *.mo *.html *.css *.js *.eot *.svg *.woff *.txt *.png *.ini *.cfg *.j2 *.jpg *.gif *.ico +recursive-include ihatemoney *.rst *.py *.yaml *.po *.mo *.html *.css *.js *.eot *.svg *.woff *.txt *.png *.webp *.ini *.cfg *.j2 *.jpg *.gif *.ico include LICENSE CONTRIBUTORS CHANGELOG.rst diff --git a/Makefile b/Makefile index ec19e163..e6941975 100644 --- a/Makefile +++ b/Makefile @@ -7,6 +7,7 @@ DOC_STAMP = $(VENV)/.doc_env_installed.stamp INSTALL_STAMP = $(VENV)/.install.stamp TEMPDIR := $(shell mktemp -d) ZOPFLIPNG := zopflipng +MAGICK_MOGRIFY := mogrify .PHONY: all all: install ## Alias for install @@ -56,8 +57,13 @@ isort: install-dev ## Run the tests release: install-dev ## Release a new version (see https://ihatemoney.readthedocs.io/en/latest/contributing.html#how-to-release) $(VENV)/bin/fullrelease +.PHONY: compress-showcase +compress-showcase: + @which $(MAGICK_MOGRIFY) >/dev/null || (echo "ImageMagick 'mogrify' ($(MAGICK_MOGRIFY)) is missing" && exit 1) + $(MAGICK_MOGRIFY) -format webp -resize '75%>' -quality 50 -define webp:method=6:auto-filter=true -path ihatemoney/static/showcase/ 'assets/showcase/*.jpg' + .PHONY: compress-assets -compress-assets: ## Compress static assets +compress-assets: compress-showcase ## Compress static assets @which $(ZOPFLIPNG) >/dev/null || (echo "ZopfliPNG ($(ZOPFLIPNG)) is missing" && exit 1) mkdir $(TEMPDIR)/zopfli $(eval CPUCOUNT := $(shell python -c "import psutil; print(psutil.cpu_count(logical=False))")) diff --git a/assets/showcase/1.jpg b/assets/showcase/1.jpg new file mode 100644 index 00000000..f0206c73 Binary files /dev/null and b/assets/showcase/1.jpg differ diff --git a/assets/showcase/2.jpg b/assets/showcase/2.jpg new file mode 100644 index 00000000..5d0b7108 Binary files /dev/null and b/assets/showcase/2.jpg differ diff --git a/assets/showcase/3.jpg b/assets/showcase/3.jpg new file mode 100644 index 00000000..33d6328e Binary files /dev/null and b/assets/showcase/3.jpg differ diff --git a/assets/showcase/4.jpg b/assets/showcase/4.jpg new file mode 100644 index 00000000..3476a2c2 Binary files /dev/null and b/assets/showcase/4.jpg differ diff --git a/assets/showcase/5.jpg b/assets/showcase/5.jpg new file mode 100644 index 00000000..6f8631f6 Binary files /dev/null and b/assets/showcase/5.jpg differ diff --git a/assets/showcase/6.jpg b/assets/showcase/6.jpg new file mode 100644 index 00000000..828d9cbd Binary files /dev/null and b/assets/showcase/6.jpg differ diff --git a/assets/showcase/7.jpg b/assets/showcase/7.jpg new file mode 100644 index 00000000..b6709837 Binary files /dev/null and b/assets/showcase/7.jpg differ diff --git a/assets/showcase/8.jpg b/assets/showcase/8.jpg new file mode 100644 index 00000000..63293c17 Binary files /dev/null and b/assets/showcase/8.jpg differ diff --git a/assets/showcase/9.jpg b/assets/showcase/9.jpg new file mode 100644 index 00000000..ec41b02f Binary files /dev/null and b/assets/showcase/9.jpg differ diff --git a/ihatemoney/static/showcase/showcase.png b/assets/showcase/showcase.png similarity index 100% rename from ihatemoney/static/showcase/showcase.png rename to assets/showcase/showcase.png diff --git a/docs/contributing.rst b/docs/contributing.rst index 4a84ea26..f9b9f9cc 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -226,7 +226,7 @@ In order to issue a new release, follow the following steps: - Switch to the master branch; - Update :file:`CHANGELOG.rst` with the last changes; - Update :file:`CONTRIBUTORS` (instructions inside the file); -- If needed, recompress assets. It requires zopflipng:: +- If needed, recompress assets. It requires zopflipng and ImageMagick `mogrify`:: make compress-assets diff --git a/ihatemoney/static/showcase/1.jpg b/ihatemoney/static/showcase/1.jpg deleted file mode 100644 index 8a559e71..00000000 Binary files a/ihatemoney/static/showcase/1.jpg and /dev/null differ diff --git a/ihatemoney/static/showcase/1.webp b/ihatemoney/static/showcase/1.webp new file mode 100644 index 00000000..24f5c164 Binary files /dev/null and b/ihatemoney/static/showcase/1.webp differ diff --git a/ihatemoney/static/showcase/2.jpg b/ihatemoney/static/showcase/2.jpg deleted file mode 100644 index a2a32d2b..00000000 Binary files a/ihatemoney/static/showcase/2.jpg and /dev/null differ diff --git a/ihatemoney/static/showcase/2.webp b/ihatemoney/static/showcase/2.webp new file mode 100644 index 00000000..4b95d84a Binary files /dev/null and b/ihatemoney/static/showcase/2.webp differ diff --git a/ihatemoney/static/showcase/3.jpg b/ihatemoney/static/showcase/3.jpg deleted file mode 100644 index 6d71b6a6..00000000 Binary files a/ihatemoney/static/showcase/3.jpg and /dev/null differ diff --git a/ihatemoney/static/showcase/3.webp b/ihatemoney/static/showcase/3.webp new file mode 100644 index 00000000..adcb3e22 Binary files /dev/null and b/ihatemoney/static/showcase/3.webp differ diff --git a/ihatemoney/static/showcase/4.jpg b/ihatemoney/static/showcase/4.jpg deleted file mode 100644 index b2fdfc5f..00000000 Binary files a/ihatemoney/static/showcase/4.jpg and /dev/null differ diff --git a/ihatemoney/static/showcase/4.webp b/ihatemoney/static/showcase/4.webp new file mode 100644 index 00000000..2dd4b0c6 Binary files /dev/null and b/ihatemoney/static/showcase/4.webp differ diff --git a/ihatemoney/static/showcase/5.jpg b/ihatemoney/static/showcase/5.jpg deleted file mode 100644 index bc64197b..00000000 Binary files a/ihatemoney/static/showcase/5.jpg and /dev/null differ diff --git a/ihatemoney/static/showcase/5.webp b/ihatemoney/static/showcase/5.webp new file mode 100644 index 00000000..8a65ab2d Binary files /dev/null and b/ihatemoney/static/showcase/5.webp differ diff --git a/ihatemoney/static/showcase/6.jpg b/ihatemoney/static/showcase/6.jpg deleted file mode 100644 index 01d4e151..00000000 Binary files a/ihatemoney/static/showcase/6.jpg and /dev/null differ diff --git a/ihatemoney/static/showcase/6.webp b/ihatemoney/static/showcase/6.webp new file mode 100644 index 00000000..34717164 Binary files /dev/null and b/ihatemoney/static/showcase/6.webp differ diff --git a/ihatemoney/static/showcase/7.jpg b/ihatemoney/static/showcase/7.jpg deleted file mode 100644 index 1620f452..00000000 Binary files a/ihatemoney/static/showcase/7.jpg and /dev/null differ diff --git a/ihatemoney/static/showcase/7.webp b/ihatemoney/static/showcase/7.webp new file mode 100644 index 00000000..7cd9a81e Binary files /dev/null and b/ihatemoney/static/showcase/7.webp differ diff --git a/ihatemoney/static/showcase/8.jpg b/ihatemoney/static/showcase/8.jpg deleted file mode 100644 index 2ac45f42..00000000 Binary files a/ihatemoney/static/showcase/8.jpg and /dev/null differ diff --git a/ihatemoney/static/showcase/8.webp b/ihatemoney/static/showcase/8.webp new file mode 100644 index 00000000..6a732bb7 Binary files /dev/null and b/ihatemoney/static/showcase/8.webp differ diff --git a/ihatemoney/static/showcase/9.jpg b/ihatemoney/static/showcase/9.jpg deleted file mode 100644 index 4a2c3705..00000000 Binary files a/ihatemoney/static/showcase/9.jpg and /dev/null differ diff --git a/ihatemoney/static/showcase/9.webp b/ihatemoney/static/showcase/9.webp new file mode 100644 index 00000000..c9a71d56 Binary files /dev/null and b/ihatemoney/static/showcase/9.webp differ diff --git a/ihatemoney/templates/showcase.html b/ihatemoney/templates/showcase.html index cd9a371e..df5a8590 100644 --- a/ihatemoney/templates/showcase.html +++ b/ihatemoney/templates/showcase.html @@ -33,7 +33,7 @@