Add task to generate images from SVG and change to new logo (#2194)
* Add makefile task to generate images from SVG and change to new logo * use absolute path on generate-imagesrelease/v1.15
26
Makefile
|
@ -21,6 +21,7 @@ GOFMT ?= gofmt -s
|
||||||
|
|
||||||
GOFLAGS := -i -v
|
GOFLAGS := -i -v
|
||||||
EXTRA_GOFLAGS ?=
|
EXTRA_GOFLAGS ?=
|
||||||
|
PWD := $(shell pwd)
|
||||||
|
|
||||||
LDFLAGS := -X "main.Version=$(shell git describe --tags --always | sed 's/-/+/' | sed 's/^v//')" -X "main.Tags=$(TAGS)"
|
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
|
$(SED_INPLACE) -e 's/\\"/"/g' ./translations/*.ini
|
||||||
mv ./translations/*.ini ./options/locale/
|
mv ./translations/*.ini ./options/locale/
|
||||||
rmdir ./translations
|
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
|
||||||
|
|
|
@ -0,0 +1,160 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<!-- Created with Inkscape (http://www.inkscape.org/) -->
|
||||||
|
|
||||||
|
<svg
|
||||||
|
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
|
xmlns:cc="http://creativecommons.org/ns#"
|
||||||
|
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||||
|
xmlns:svg="http://www.w3.org/2000/svg"
|
||||||
|
xmlns="http://www.w3.org/2000/svg"
|
||||||
|
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||||
|
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||||
|
width="512"
|
||||||
|
height="512"
|
||||||
|
viewBox="0 0 135.46667 135.46667"
|
||||||
|
version="1.1"
|
||||||
|
id="svg8"
|
||||||
|
sodipodi:docname="logo.svg"
|
||||||
|
inkscape:version="0.92.1 r15371"
|
||||||
|
inkscape:export-filename=""
|
||||||
|
inkscape:export-xdpi="48.000004"
|
||||||
|
inkscape:export-ydpi="48.000004">
|
||||||
|
<defs
|
||||||
|
id="defs2" />
|
||||||
|
<sodipodi:namedview
|
||||||
|
id="base"
|
||||||
|
pagecolor="#ffffff"
|
||||||
|
bordercolor="#666666"
|
||||||
|
borderopacity="1.0"
|
||||||
|
inkscape:pageopacity="0"
|
||||||
|
inkscape:pageshadow="2"
|
||||||
|
inkscape:zoom="0.70710678"
|
||||||
|
inkscape:cx="418.13805"
|
||||||
|
inkscape:cy="177.57445"
|
||||||
|
inkscape:document-units="mm"
|
||||||
|
inkscape:current-layer="layer2"
|
||||||
|
showgrid="false"
|
||||||
|
units="px"
|
||||||
|
width="256px"
|
||||||
|
showguides="false"
|
||||||
|
inkscape:window-width="1920"
|
||||||
|
inkscape:window-height="1137"
|
||||||
|
inkscape:window-x="1912"
|
||||||
|
inkscape:window-y="-8"
|
||||||
|
inkscape:window-maximized="1"
|
||||||
|
inkscape:pagecheckerboard="false"
|
||||||
|
inkscape:measure-start="283.373,243.952"
|
||||||
|
inkscape:measure-end="290.267,236.527">
|
||||||
|
<sodipodi:guide
|
||||||
|
position="0,0"
|
||||||
|
orientation="0,512"
|
||||||
|
id="guide3699"
|
||||||
|
inkscape:locked="false" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="135.46667,0"
|
||||||
|
orientation="-512,0"
|
||||||
|
id="guide3701"
|
||||||
|
inkscape:locked="false" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="135.46667,135.46667"
|
||||||
|
orientation="0,-512"
|
||||||
|
id="guide3703"
|
||||||
|
inkscape:locked="false" />
|
||||||
|
<sodipodi:guide
|
||||||
|
position="0,135.46667"
|
||||||
|
orientation="512,0"
|
||||||
|
id="guide3705"
|
||||||
|
inkscape:locked="false" />
|
||||||
|
</sodipodi:namedview>
|
||||||
|
<metadata
|
||||||
|
id="metadata5">
|
||||||
|
<rdf:RDF>
|
||||||
|
<cc:Work
|
||||||
|
rdf:about="">
|
||||||
|
<dc:format>image/svg+xml</dc:format>
|
||||||
|
<dc:type
|
||||||
|
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||||
|
<dc:title></dc:title>
|
||||||
|
</cc:Work>
|
||||||
|
</rdf:RDF>
|
||||||
|
</metadata>
|
||||||
|
<g
|
||||||
|
inkscape:label="Layer 1"
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer1"
|
||||||
|
transform="translate(0,-161.53334)"
|
||||||
|
style="display:inline">
|
||||||
|
<path
|
||||||
|
style="fill:#609926;fill-opacity:1;stroke:#428f29;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
|
||||||
|
d="m 27.709937,195.15095 c -9.546573,-0.0272 -22.3392732,6.79805 -21.6317552,23.90397 1.105534,26.72889 25.4565952,29.20839 35.1916502,29.42301 1.068023,5.01357 12.521798,22.30563 21.001818,23.21667 h 37.15277 c 22.27763,-1.66785 38.9607,-75.75671 26.59321,-76.03825 -46.781583,2.47691 -49.995146,2.13838 -88.599758,0 -2.495053,-0.0266 -5.972321,-0.49474 -9.707935,-0.5054 z m 2.491319,9.45886 c 1.351378,13.69267 3.555849,21.70359 8.018216,33.94345 -11.382872,-1.50473 -21.069822,-5.22443 -22.851515,-19.10984 -0.950962,-7.4112 2.390428,-15.16769 14.833299,-14.83361 z"
|
||||||
|
id="path3722"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="sscccccsccsc" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer2"
|
||||||
|
inkscape:label="Layer 2"
|
||||||
|
style="display:inline">
|
||||||
|
<rect
|
||||||
|
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.24757317;stroke-opacity:1"
|
||||||
|
id="rect4599"
|
||||||
|
width="34.762054"
|
||||||
|
height="34.762054"
|
||||||
|
x="87.508659"
|
||||||
|
y="18.291576"
|
||||||
|
transform="rotate(25.914715)"
|
||||||
|
ry="5.4825778" />
|
||||||
|
<path
|
||||||
|
style="display:inline;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26644793px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
|
||||||
|
d="m 79.804947,57.359056 3.241146,1.609954 V 35.255731 h -3.262698 z"
|
||||||
|
id="path4525"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
sodipodi:nodetypes="ccccc" />
|
||||||
|
</g>
|
||||||
|
<g
|
||||||
|
inkscape:groupmode="layer"
|
||||||
|
id="layer3"
|
||||||
|
inkscape:label="Layer 3"
|
||||||
|
style="display:inline">
|
||||||
|
<g
|
||||||
|
style="display:inline"
|
||||||
|
id="g4539">
|
||||||
|
<circle
|
||||||
|
transform="rotate(-19.796137)"
|
||||||
|
r="3.4745038"
|
||||||
|
cy="90.077766"
|
||||||
|
cx="49.064713"
|
||||||
|
id="path4606"
|
||||||
|
style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1" />
|
||||||
|
<circle
|
||||||
|
transform="rotate(-19.796137)"
|
||||||
|
r="3.4745038"
|
||||||
|
cy="102.1049"
|
||||||
|
cx="36.810425"
|
||||||
|
id="path4606-3"
|
||||||
|
style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1" />
|
||||||
|
<circle
|
||||||
|
transform="rotate(-19.796137)"
|
||||||
|
r="3.4745038"
|
||||||
|
cy="111.43928"
|
||||||
|
cx="46.484283"
|
||||||
|
id="path4606-1"
|
||||||
|
style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-opacity:1" />
|
||||||
|
<rect
|
||||||
|
transform="rotate(26.024158)"
|
||||||
|
y="18.061695"
|
||||||
|
x="97.333458"
|
||||||
|
height="27.261492"
|
||||||
|
width="2.6726954"
|
||||||
|
id="rect4629-8"
|
||||||
|
style="fill:#609926;fill-opacity:1;stroke:none;stroke-width:0.27444693;stroke-opacity:1" />
|
||||||
|
<path
|
||||||
|
sodipodi:nodetypes="cc"
|
||||||
|
inkscape:connector-curvature="0"
|
||||||
|
id="path4514"
|
||||||
|
d="m 76.558096,68.116343 c 12.97589,6.395378 13.012989,4.101862 4.890858,20.907244"
|
||||||
|
style="fill:none;stroke:#609926;stroke-width:2.68000007;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
|
||||||
|
</g>
|
||||||
|
</g>
|
||||||
|
</svg>
|
After Width: | Height: | Size: 5.6 KiB |
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 8.9 KiB |
After Width: | Height: | Size: 88 KiB |
Before Width: | Height: | Size: 6.9 KiB After Width: | Height: | Size: 8.1 KiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 1.1 KiB |
|
@ -90,7 +90,7 @@
|
||||||
<div class="column">
|
<div class="column">
|
||||||
<div class="ui top secondary menu">
|
<div class="ui top secondary menu">
|
||||||
<a class="item brand" href="{{AppSubUrl}}/">
|
<a class="item brand" href="{{AppSubUrl}}/">
|
||||||
<img class="ui mini image" src="{{AppSubUrl}}/img/favicon.png">
|
<img class="ui mini image" src="{{AppSubUrl}}/img/gitea-sm.png">
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
{{if .IsSigned}}
|
{{if .IsSigned}}
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
|
{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
|
||||||
<div class="ui right">
|
<div class="ui right">
|
||||||
{{if eq .HookType "gitea"}}
|
{{if eq .HookType "gitea"}}
|
||||||
<img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
|
<img class="img-13" src="{{AppSubUrl}}/img/gitea-sm.png">
|
||||||
{{else if eq .HookType "gogs"}}
|
{{else if eq .HookType "gogs"}}
|
||||||
<img class="img-13" src="{{AppSubUrl}}/img/gogs.ico">
|
<img class="img-13" src="{{AppSubUrl}}/img/gogs.ico">
|
||||||
{{else if eq .HookType "slack"}}
|
{{else if eq .HookType "slack"}}
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
<div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
|
<div class="ui blue tiny button">{{.i18n.Tr "repo.settings.add_webhook"}}</div>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<a class="item" href="{{.BaseLink}}/settings/hooks/gitea/new">
|
<a class="item" href="{{.BaseLink}}/settings/hooks/gitea/new">
|
||||||
<img class="img-10" src="{{AppSubUrl}}/img/favicon.png">Gitea
|
<img class="img-10" src="{{AppSubUrl}}/img/gitea-sm.png">Gitea
|
||||||
</a>
|
</a>
|
||||||
<a class="item" href="{{.BaseLink}}/settings/hooks/gogs/new">
|
<a class="item" href="{{.BaseLink}}/settings/hooks/gogs/new">
|
||||||
<img class="img-10" src="{{AppSubUrl}}/img/gogs.ico">Gogs
|
<img class="img-10" src="{{AppSubUrl}}/img/gogs.ico">Gogs
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
|
{{if .PageIsSettingsHooksNew}}{{.i18n.Tr "repo.settings.add_webhook"}}{{else}}{{.i18n.Tr "repo.settings.update_webhook"}}{{end}}
|
||||||
<div class="ui right">
|
<div class="ui right">
|
||||||
{{if eq .HookType "gitea"}}
|
{{if eq .HookType "gitea"}}
|
||||||
<img class="img-13" src="{{AppSubUrl}}/img/favicon.png">
|
<img class="img-13" src="{{AppSubUrl}}/img/gitea-sm.png">
|
||||||
{{else if eq .HookType "gogs"}}
|
{{else if eq .HookType "gogs"}}
|
||||||
<img class="img-13" src="{{AppSubUrl}}/img/gogs.ico">
|
<img class="img-13" src="{{AppSubUrl}}/img/gogs.ico">
|
||||||
{{else if eq .HookType "slack"}}
|
{{else if eq .HookType "slack"}}
|
||||||
|
|