commit a32ba2646371170c51421ca21119f9cbaa94e048
parent c5e861f80e6500568d2ffb4195ea104236edf3bc
Author: Oscar Benedito <oscar@oscarbenedito.com>
Date: Fri, 31 Jul 2020 17:29:34 +0200
Logo from png to svg file
Diffstat:
7 files changed, 13 insertions(+), 11 deletions(-)
diff --git a/Makefile b/Makefile
@@ -53,7 +53,7 @@ dist:
rm -rf ${NAME}-${VERSION}
mkdir -p ${NAME}-${VERSION}
cp -f ${MAN1} ${HDR} ${SRC} ${COMPATSRC} ${DOC} \
- Makefile favicon.ico logo.png style.css \
+ Makefile favicon.ico logo.svg style.css \
example_create.sh example_post-receive.sh \
${NAME}-${VERSION}
# make tarball
@@ -81,7 +81,7 @@ install: all
mkdir -p ${DESTDIR}${DOCPREFIX}
cp -f style.css\
favicon.ico\
- logo.png\
+ logo.svg\
example_create.sh\
example_post-receive.sh\
README\
@@ -98,7 +98,7 @@ uninstall:
rm -f \
${DESTDIR}${DOCPREFIX}/style.css\
${DESTDIR}${DOCPREFIX}/favicon.ico\
- ${DESTDIR}${DOCPREFIX}/logo.png\
+ ${DESTDIR}${DOCPREFIX}/logo.svg\
${DESTDIR}${DOCPREFIX}/example_create.sh\
${DESTDIR}${DOCPREFIX}/example_post-receive.sh\
${DESTDIR}${DOCPREFIX}/README
diff --git a/example_create.sh b/example_create.sh
@@ -3,7 +3,7 @@
# - Makes static pages for each repository directory.
#
# NOTE, things to do manually (once) before running this script:
-# - copy style.css, logo.png and favicon.ico manually, a style.css example
+# - copy style.css, logo.svg and favicon.ico manually, a style.css example
# is included.
#
# - write clone url, for example "git://git.codemadness.org/dir" to the "url"
@@ -24,7 +24,7 @@ mkdir -p "$webdir" || exit 1
# set assets if not already there
ln -s "$defaultdir/style.css" "$webdir/style.css" 2> /dev/null
-ln -s "$defaultdir/logo.png" "$webdir/logo.png" 2> /dev/null
+ln -s "$defaultdir/logo.svg" "$webdir/logo.svg" 2> /dev/null
ln -s "$defaultdir/favicon.ico" "$webdir/favicon.ico" 2> /dev/null
# clean
diff --git a/logo.png b/logo.png
Binary files differ.
diff --git a/logo.svg b/logo.svg
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8"?><svg viewBox="0 0 210 210" xmlns="http://www.w3.org/2000/svg"><g transform="translate(0,-87)"><circle r="105" cy="192" cx="105" style="fill:#7ec27b;"/><path style="fill:#fff;stroke-width:3.11444497" d="m 62.821144,169.92187 q 7.474669,0 14.077293,2.61614 6.727201,2.49156 11.710314,6.97636 5.10769,4.4848 7.97298,10.71369 2.989867,6.10431 2.989867,13.4544 0,7.59925 -2.989867,13.95272 -2.86529,6.35347 -7.97298,10.96284 -4.983113,4.60938 -11.710314,7.22552 -6.602624,2.61613 -14.077293,2.61613 -7.350091,0 -13.952715,-2.49155 -6.602624,-2.61614 -11.585737,-7.22552 -4.983112,-4.60938 -7.848402,-10.96285 -2.86529,-6.47804 -2.86529,-14.07729 0,-7.35009 2.86529,-13.57898 2.86529,-6.22889 7.848402,-10.71369 4.983113,-4.4848 11.585737,-6.97636 6.602624,-2.49156 13.952715,-2.49156 z m 0,7.22552 q -3.737335,0 -6.85178,1.99324 -3.114445,1.86867 -5.356846,5.35685 -2.117823,3.48818 -3.363601,8.47129 -1.1212,4.85853 -1.1212,10.83827 0,6.22889 1.1212,11.212 1.245778,4.98312 3.363601,8.47129 2.242401,3.48818 5.232268,5.48143 3.114446,1.86867 6.976358,1.86867 3.861912,0 6.976357,-1.86867 3.239023,-1.99325 5.481424,-5.48143 2.242401,-3.61275 3.488179,-8.59586 1.245778,-4.98312 1.245778,-11.08743 0,-5.97974 -1.245778,-10.83827 -1.245778,-4.85853 -3.488179,-8.34671 -2.242401,-3.61276 -5.481424,-5.48143 -3.114445,-1.99324 -6.976357,-1.99324 z"/><path style="fill:#fff;stroke-width:3.11444497" d="m 132.23045,209.91135 q 0,4.60938 1.24578,8.59587 1.37036,3.86191 3.61276,6.7272 2.2424,2.86529 5.35684,4.4848 3.11445,1.61952 6.85178,1.61952 7.47467,0 11.33658,-6.85178 3.86191,-6.85178 3.86191,-20.18161 0,-12.95609 -3.86191,-19.68329 -3.73733,-6.85178 -11.33658,-6.85178 -4.4848,0 -8.34671,2.49155 -3.73734,2.36698 -5.85516,6.72721 -2.86529,5.97973 -2.86529,15.07391 z m -0.24915,-30.14783 h 0.49831 q 3.23902,-4.73395 8.34671,-7.22551 5.10769,-2.61614 11.58574,-2.61614 6.60262,0 12.20862,2.74072 5.73058,2.61613 9.84165,7.22551 4.23564,4.60938 6.60262,10.83827 2.36698,6.22889 2.36698,13.32983 0,7.47466 -2.61613,13.82813 -2.49156,6.22889 -6.97636,10.83827 -4.36022,4.60938 -10.33996,7.22552 -5.85516,2.61613 -12.45778,2.61613 -6.85178,0 -12.95609,-2.61613 -5.97974,-2.74072 -9.59249,-7.10094 l -9.46792,8.34671 h -4.23564 V 163.0701 q 0,-11.71032 -1.61951,-16.07054 -0.37374,-0.87205 -0.87205,-1.49494 -0.49831,-0.62289 -1.49493,-0.99662 -0.87205,-0.49831 -2.49156,-0.74747 -1.61951,-0.37373 -4.23564,-0.74746 v -4.23565 l 27.90543,-4.98311 z"/></g></svg>
diff --git a/stagit-index.1 b/stagit-index.1
@@ -31,8 +31,8 @@ For changing the style of the page you can use the following files:
.Bl -tag -width Ds
.It favicon.ico
favicon image.
-.It logo.png
-32x32 logo.
+.It logo.svg
+square logo.
.It style.css
CSS stylesheet.
.El
diff --git a/stagit.1 b/stagit.1
@@ -96,8 +96,8 @@ For changing the style of the page you can use the following files:
.Bl -tag -width Ds
.It favicon.ico
favicon image.
-.It logo.png
-32x32 logo.
+.It logo.svg
+square logo.
.It style.css
CSS stylesheet.
.El
diff --git a/stagit.c b/stagit.c
@@ -356,12 +356,13 @@ writeheader(FILE *fp, const char *title)
if (description[0])
fputs(" - ", fp);
xmlencode(fp, description, strlen(description));
- fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/png\" href=\"../%sfavicon.ico\" />\n", relpath);
+ fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/svg+xml\" href=\"../%slogo.svg\"/>\n", relpath);
+ fprintf(fp, "<link rel=\"alternate icon\" href=\"../%sfavicon.ico\"/>\n", relpath);
fprintf(fp, "<link rel=\"alternate\" type=\"application/atom+xml\" title=\"%s Atom Feed\" href=\"%satom.xml\" />\n",
name, relpath);
fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"../%sstyle.css\" />\n", relpath);
fputs("</head>\n<body>\n<div id=\"head\"><table><tr><td>", fp);
- fprintf(fp, "<a class=\"logo\" href=\"../%s\"><img src=\"../%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>",
+ fprintf(fp, "<a class=\"logo\" href=\"../%s\"><img src=\"../%slogo.svg\" alt=\"\" width=\"32\" height=\"32\" /></a>",
relpath, relpath);
fputs("</td><td><strong>", fp);
xmlencode(fp, strippedname, strlen(strippedname));