diff --git a/Makefile b/Makefile index 4e5a06c82..b0a03d99a 100644 --- a/Makefile +++ b/Makefile @@ -21,6 +21,7 @@ GOFMT ?= gofmt -s GOFLAGS := -i -v EXTRA_GOFLAGS ?= +PWD := $(shell pwd) LDFLAGS := -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')" -X "main.Tags=$(TAGS)" @@ -296,3 +297,28 @@ update-translations: $(SED_INPLACE) -e 's/\\"/"/g' ./translations/*.ini mv ./translations/*.ini ./options/locale/ rmdir ./translations + +.PHONY: generate-images +generate-images: + mkdir -p $(TMPDIR)/images + inkscape -f $(PWD)/assets/logo.svg -w 400 -h 400 -e $(PWD)/public/img/gitea-lg.png + inkscape -f $(PWD)/assets/logo.svg -w 30 -h 30 -jC -i layer1 -e $(TMPDIR)/images/30-1.png + inkscape -f $(PWD)/assets/logo.svg -w 30 -h 30 -jC -i layer2 -e $(TMPDIR)/images/30-2.png + composite -compose atop $(TMPDIR)/images/30-2.png $(TMPDIR)/images/30-1.png $(PWD)/public/img/gitea-sm.png + inkscape -f $(PWD)/assets/logo.svg -w 200 -h 200 -e $(PWD)/public/img/avatar_default.png + inkscape -f $(PWD)/assets/logo.svg -w 180 -h 180 -e $(PWD)/public/img/favicon.png + inkscape -f $(PWD)/assets/logo.svg -w 128 -h 128 -e $(TMPDIR)/images/128-raw.png + inkscape -f $(PWD)/assets/logo.svg -w 64 -h 64 -e $(TMPDIR)/images/64-raw.png + inkscape -f $(PWD)/assets/logo.svg -w 32 -h 32 -jC -i layer1 -e $(TMPDIR)/images/32-1.png + inkscape -f $(PWD)/assets/logo.svg -w 32 -h 32 -jC -i layer2 -e $(TMPDIR)/images/32-2.png + composite -compose atop $(TMPDIR)/images/32-2.png $(TMPDIR)/images/32-1.png $(TMPDIR)/images/32-raw.png + inkscape -f $(PWD)/assets/logo.svg -w 16 -h 16 -jC -i layer1 -e $(TMPDIR)/images/16-raw.png + zopflipng $(TMPDIR)/images/128-raw.png $(TMPDIR)/images/128.png + zopflipng $(TMPDIR)/images/64-raw.png $(TMPDIR)/images/64.png + zopflipng $(TMPDIR)/images/32-raw.png $(TMPDIR)/images/32.png + zopflipng $(TMPDIR)/images/16-raw.png $(TMPDIR)/images/16.png + rm -f $(TMPDIR)/images/*-*.png + convert $(TMPDIR)/images/16.png $(TMPDIR)/images/32.png \ + $(TMPDIR)/images/64.png $(TMPDIR)/images/128.png \ + $(PWD)/public/img/favicon.ico + rm -rf $(TMPDIR)/images diff --git a/assets/logo.svg b/assets/logo.svg new file mode 100644 index 000000000..ac1594adb --- /dev/null +++ b/assets/logo.svg @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + + diff --git a/public/img/avatar_default.png b/public/img/avatar_default.png index 3d2659c64..30aca2ef0 100644 Binary files a/public/img/avatar_default.png and b/public/img/avatar_default.png differ diff --git a/public/img/favicon.ico b/public/img/favicon.ico new file mode 100644 index 000000000..fd35f5357 Binary files /dev/null and b/public/img/favicon.ico differ diff --git a/public/img/favicon.png b/public/img/favicon.png index 2b97dee48..48169c1b6 100644 Binary files a/public/img/favicon.png and b/public/img/favicon.png differ diff --git a/public/img/gitea-large-resize.png b/public/img/gitea-large-resize.png deleted file mode 100644 index 0c77357c8..000000000 Binary files a/public/img/gitea-large-resize.png and /dev/null differ diff --git a/public/img/gitea-lg.png b/public/img/gitea-lg.png index 95f2c3edc..a1668228f 100644 Binary files a/public/img/gitea-lg.png and b/public/img/gitea-lg.png differ diff --git a/public/img/gitea-sm.png b/public/img/gitea-sm.png new file mode 100644 index 000000000..e1de122e7 Binary files /dev/null and b/public/img/gitea-sm.png differ diff --git a/templates/base/head.tmpl b/templates/base/head.tmpl index 6254e4543..bb6f1ecaf 100644 --- a/templates/base/head.tmpl +++ b/templates/base/head.tmpl @@ -90,7 +90,7 @@