From: Michael Tremer Date: Mon, 18 Mar 2019 16:07:05 +0000 (+0000) Subject: Generate favicon.ico and Apple Icons from logo X-Git-Url: http://git.ipfire.org/?p=ipfire.org.git;a=commitdiff_plain;h=662c791026def8aa5bfcf717450787e560cd5bcf Generate favicon.ico and Apple Icons from logo Signed-off-by: Michael Tremer --- diff --git a/.gitignore b/.gitignore index 53e64486..bb7d9e71 100644 --- a/.gitignore +++ b/.gitignore @@ -9,6 +9,8 @@ /src/scss/main.css /src/scripts/ipfire.org /src/scripts/ipfire.org-webapp +/src/static/favicon.ico +/src/static/img/apple-touch-icon-*-precomposed.png /src/systemd/ipfire.org-webapp-*.service /ipfire.org.conf.sample Makefile diff --git a/Makefile.am b/Makefile.am index 322348da..b0a34eaf 100644 --- a/Makefile.am +++ b/Makefile.am @@ -882,6 +882,14 @@ static_fonts_DATA = \ static_fontsdir = $(staticdir)/fonts static_images_DATA = \ + src/static/img/apple-touch-icon-192x192-precomposed.png \ + src/static/img/apple-touch-icon-180x180-precomposed.png \ + src/static/img/apple-touch-icon-152x152-precomposed.png \ + src/static/img/apple-touch-icon-144x144-precomposed.png \ + src/static/img/apple-touch-icon-120x120-precomposed.png \ + src/static/img/apple-touch-icon-76x76-precomposed.png \ + src/static/img/apple-touch-icon-72x72-precomposed.png \ + src/static/img/apple-touch-icon-60x60-precomposed.png \ src/static/img/default-avatar.jpg \ src/static/img/ipfire-tux.png \ src/static/img/iuse-not-found.png \ @@ -982,6 +990,16 @@ src/scss/main.css: $(SCSS_FILES) Makefile $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ $(SASSC) --style compressed $< > $@ +src/static/favicon.ico: src/static/img/ipfire-tux.png Makefile + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ + $(CONVERT) $< -background none -flatten -density 1200 \ + -define icon:auto-resize=64,48,32,16 $@ + +src/static/img/apple-touch-icon-%-precomposed.png: src/static/img/ipfire-tux.png Makefile + $(AM_V_GEN)$(MKDIR_P) $(dir $@) && \ + $(CONVERT) -background none -flatten -density 1200 -bordercolor none -border 5%x5% \ + -resize $(patsubst src/static/img/apple-touch-icon-%-precomposed.png,%,$@) $< $@ + # Docker .PHONY: docker docker: Dockerfile diff --git a/configure.ac b/configure.ac index 937a5823..97e5f21c 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,9 @@ AM_PATH_PYTHON([3.4]) # scss AC_CHECK_PROG(SASSC, [sassc], [sassc]) +# convert from ImageMagick +AC_CHECK_PROG(CONVERT, [convert], [convert]) + # ------------------------------------------------------------------------------ AC_ARG_WITH([systemd], diff --git a/src/static/favicon.ico b/src/static/favicon.ico deleted file mode 100644 index 565ba7bd..00000000 Binary files a/src/static/favicon.ico and /dev/null differ diff --git a/src/templates/base.html b/src/templates/base.html index 021c15fc..d9ee78a0 100644 --- a/src/templates/base.html +++ b/src/templates/base.html @@ -8,6 +8,12 @@ + + {% for res in ("72x72", "76x76", "120x120", "144x144", "152x152", "180x180") %} + + {% end %} + +