From 0bed35b347a5830539e37d2ad496f2a044d36559 Mon Sep 17 00:00:00 2001 From: silverwind Date: Sun, 26 Jul 2020 11:47:51 +0200 Subject: [PATCH] Rework 'make generate-images' (#12316) * Rework 'make generate-images' - Remove external dependencies and replace it with a node script that does does the same. - Move detail removal from gitea-sm.png to favicon.png - Remove favicon.ico and its generation, it is unused and we already serve favicon.png in its place. Fixes: https://github.com/go-gitea/gitea/issues/12314 * use proper centering value for preserveAspectRatio * fix lint * use fabric * better linting fix * fix typo * mention detail-remove class in docs --- doc/advanced/hacking-on-gitea.en-us.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/advanced/hacking-on-gitea.en-us.md b/doc/advanced/hacking-on-gitea.en-us.md index e6ffe908..5c3f1999 100644 --- a/doc/advanced/hacking-on-gitea.en-us.md +++ b/doc/advanced/hacking-on-gitea.en-us.md @@ -155,10 +155,9 @@ Note: When working on frontend code, set `USE_SERVICE_WORKER` to `false` in `app SVG icons are built using the `make svg` target which compiles the icon sources defined in `build/generate-svg.js` into the output directory `public/img/svg`. Custom icons can be added in the `web_src/svg` directory. -### Building Images +### Building the Logo -To build the images, ImageMagick, `inkscape` and `zopflipng` binaries must be available in -your `PATH` to run `make generate-images`. +The PNG versions of the logo are built from a single SVG source file `assets/logo.svg` using the `make generate-images` target. To run it, Node.js and npm must be available. The same process can also be used to generate a custom logo PNGs from a SVG source file. It's possible to remove parts of the SVG logo for the favicon build by adding a `detail-remove` class to the SVG nodes to be removed. ### Updating the API