Skip to content

Commit aa30a96

Browse files
committed
Add makefile task to generate images from SVG and change to new logo
1 parent dde0052 commit aa30a96

File tree

12 files changed

+189
-4
lines changed

12 files changed

+189
-4
lines changed

Makefile

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -296,3 +296,28 @@ update-translations:
296296
$(SED_INPLACE) -e 's/\\"/"/g' ./translations/*.ini
297297
mv ./translations/*.ini ./options/locale/
298298
rmdir ./translations
299+
300+
.PHONY: generate-images
301+
generate-images:
302+
mkdir -p $(TMPDIR)/images
303+
inkscape -f assets/logo.svg -w 400 -h 400 -e public/img/gitea-lg.png
304+
inkscape -f assets/logo.svg -w 30 -h 30 -jC -i layer1 -e $(TMPDIR)/images/30-1.png
305+
inkscape -f assets/logo.svg -w 30 -h 30 -jC -i layer2 -e $(TMPDIR)/images/30-2.png
306+
composite -compose atop $(TMPDIR)/images/30-2.png $(TMPDIR)/images/30-1.png public/img/gitea-sm.png
307+
inkscape -f assets/logo.svg -w 200 -h 200 -e public/img/avatar_default.png
308+
inkscape -f assets/logo.svg -w 180 -h 180 -e public/img/favicon.png
309+
inkscape -f assets/logo.svg -w 128 -h 128 -e $(TMPDIR)/images/128-raw.png
310+
inkscape -f assets/logo.svg -w 64 -h 64 -e $(TMPDIR)/images/64-raw.png
311+
inkscape -f assets/logo.svg -w 32 -h 32 -jC -i layer1 -e $(TMPDIR)/images/32-1.png
312+
inkscape -f assets/logo.svg -w 32 -h 32 -jC -i layer2 -e $(TMPDIR)/images/32-2.png
313+
composite -compose atop $(TMPDIR)/images/32-2.png $(TMPDIR)/images/32-1.png $(TMPDIR)/images/32-raw.png
314+
inkscape -f assets/logo.svg -w 16 -h 16 -jC -i layer1 -e $(TMPDIR)/images/16-raw.png
315+
zopflipng $(TMPDIR)/images/128-raw.png $(TMPDIR)/images/128.png
316+
zopflipng $(TMPDIR)/images/64-raw.png $(TMPDIR)/images/64.png
317+
zopflipng $(TMPDIR)/images/32-raw.png $(TMPDIR)/images/32.png
318+
zopflipng $(TMPDIR)/images/16-raw.png $(TMPDIR)/images/16.png
319+
rm -f $(TMPDIR)/images/*-*.png
320+
convert $(TMPDIR)/images/16.png $(TMPDIR)/images/32.png \
321+
$(TMPDIR)/images/64.png $(TMPDIR)/images/128.png \
322+
public/img/favicon.ico
323+
rm -rf $(TMPDIR)/images

assets/logo.svg

Lines changed: 160 additions & 0 deletions
Loading

public/img/avatar_default.png

-22.9 KB
Loading

public/img/favicon.ico

87.9 KB
Binary file not shown.

public/img/favicon.png

1.19 KB
Loading

public/img/gitea-large-resize.png

-15.9 KB
Binary file not shown.

public/img/gitea-lg.png

-7.34 KB
Loading

public/img/gitea-sm.png

1.12 KB
Loading

templates/base/head.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
<div class="column">
9191
<div class="ui top secondary menu">
9292
<a class="item brand" href="{{AppSubUrl}}/">
93-
<img class="ui mini image" src="{{AppSubUrl}}/img/favicon.png">
93+
<img class="ui mini image" src="{{AppSubUrl}}/img/gitea-sm.png">
9494
</a>
9595

9696
{{if .IsSigned}}

templates/org/settings/hook_new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
1111
<div class="ui right">
1212
{{if eq .HookType "gitea"}}
13-
<img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
13+
<img class="img-13" src="{{AppSubUrl}}/img/gitea-sm.png">
1414
{{else if eq .HookType "gogs"}}
1515
<img class="img-13" src="{{AppSubUrl}}/img/gogs.ico">
1616
{{else if eq .HookType "slack"}}

templates/repo/settings/hook_list.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
77
<div class="menu">
88
<a class="item" href="{{.BaseLink}}/settings/hooks/gitea/new">
9-
<img class="img-10" src="{{AppSubUrl}}/img/favicon.png">Gitea
9+
<img class="img-10" src="{{AppSubUrl}}/img/gitea-sm.png">Gitea
1010
</a>
1111
<a class="item" href="{{.BaseLink}}/settings/hooks/gogs/new">
1212
<img class="img-10" src="{{AppSubUrl}}/img/gogs.ico">Gogs

templates/repo/settings/hook_new.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
99
<div class="ui right">
1010
{{if eq .HookType "gitea"}}
11-
<img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
11+
<img class="img-13" src="{{AppSubUrl}}/img/gitea-sm.png">
1212
{{else if eq .HookType "gogs"}}
1313
<img class="img-13" src="{{AppSubUrl}}/img/gogs.ico">
1414
{{else if eq .HookType "slack"}}

0 commit comments

Comments
 (0)