summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2020-10-17 00:03:01 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2020-10-17 00:03:01 -0400
commit53c834d9b83c59e9d64f426f5359cf8e565befff (patch)
tree8e10db7656ac9cbdae76e66ff9686604512e3978
parent854bb3b66167ccd7e150a18557824f8992bbe25e (diff)
Initial Commit
-rw-r--r--Makefile10
-rwxr-xr-xexample_create.sh6
-rw-r--r--favicon.icobin15086 -> 0 bytes
-rw-r--r--favicon.pngbin0 -> 3334 bytes
-rw-r--r--logo.pngbin0 -> 44341 bytes
-rw-r--r--logo.svg1
-rw-r--r--stagit-index.14
-rw-r--r--stagit-index.c2
-rw-r--r--stagit.14
-rw-r--r--stagit.c6
-rw-r--r--style.css149
11 files changed, 55 insertions, 127 deletions
diff --git a/Makefile b/Makefile
index 6601c8a..8e225ac 100644
--- 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.svg style.css \
+ Makefile favicon.png logo.png style.css \
example_create.sh example_post-receive.sh \
${NAME}-${VERSION}
# make tarball
@@ -80,8 +80,8 @@ install: all
# installing example files.
mkdir -p ${DESTDIR}${DOCPREFIX}
cp -f style.css\
- favicon.ico\
- logo.svg\
+ favicon.png\
+ logo.png\
example_create.sh\
example_post-receive.sh\
README.md\
@@ -97,8 +97,8 @@ uninstall:
# removing example files.
rm -f \
${DESTDIR}${DOCPREFIX}/style.css\
- ${DESTDIR}${DOCPREFIX}/favicon.ico\
- ${DESTDIR}${DOCPREFIX}/logo.svg\
+ ${DESTDIR}${DOCPREFIX}/favicon.png\
+ ${DESTDIR}${DOCPREFIX}/logo.png\
${DESTDIR}${DOCPREFIX}/example_create.sh\
${DESTDIR}${DOCPREFIX}/example_post-receive.sh\
${DESTDIR}${DOCPREFIX}/README.md
diff --git a/example_create.sh b/example_create.sh
index e1b79f4..ab79327 100755
--- 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.svg and favicon.ico manually, a style.css example
+# - copy style.css, logo.png and favicon.png manually, a style.css example
# is included.
#
# - write clone url, for example "git://git.codemadness.org/dir" to the "url"
@@ -24,8 +24,8 @@ 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.svg" "$webdir/logo.svg" 2> /dev/null
-ln -s "$defaultdir/favicon.ico" "$webdir/favicon.ico" 2> /dev/null
+ln -s "$defaultdir/logo.png" "$webdir/logo.png" 2> /dev/null
+ln -s "$defaultdir/favicon.png" "$webdir/favicon.png" 2> /dev/null
# clean
for dir in "$webdir/"*/; do
diff --git a/favicon.ico b/favicon.ico
deleted file mode 100644
index 4b74cce..0000000
--- a/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/favicon.png b/favicon.png
new file mode 100644
index 0000000..9f08ec1
--- /dev/null
+++ b/favicon.png
Binary files differ
diff --git a/logo.png b/logo.png
new file mode 100644
index 0000000..4560e69
--- /dev/null
+++ b/logo.png
Binary files differ
diff --git a/logo.svg b/logo.svg
deleted file mode 100644
index 371eace..0000000
--- a/logo.svg
+++ /dev/null
@@ -1 +0,0 @@
-<?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
index c957807..b6f181b 100644
--- a/stagit-index.1
+++ b/stagit-index.1
@@ -29,9 +29,9 @@ owner of repository
.Pp
For changing the style of the page you can use the following files:
.Bl -tag -width Ds
-.It favicon.ico
+.It favicon.png
favicon image.
-.It logo.svg
+.It logo.png
square logo.
.It style.css
CSS stylesheet.
diff --git a/stagit-index.c b/stagit-index.c
index 558e131..37df00b 100644
--- a/stagit-index.c
+++ b/stagit-index.c
@@ -68,7 +68,7 @@ writeheader(FILE *fp)
"<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />\n"
"<meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\n"
"<title>Git Repositories | Oscar Benedito</title>\n", fp);
- fprintf(fp, "<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.ico\" />\n", relpath);
+ fprintf(fp, "<link rel=\"icon\" type=\"image/png\" href=\"%sfavicon.png\" />\n", relpath);
fprintf(fp, "<link rel=\"stylesheet\" type=\"text/css\" href=\"%sstyle.css\" />\n", relpath);
fputs("</head>\n<body id=\"home\">\n<h1>", fp);
xmlencode(fp, description, strlen(description));
diff --git a/stagit.1 b/stagit.1
index 61dcaa1..f236ccf 100644
--- a/stagit.1
+++ b/stagit.1
@@ -96,9 +96,9 @@ exists in HEAD a direct link in the menu is made.
.Pp
For changing the style of the page you can use the following files:
.Bl -tag -width Ds
-.It favicon.ico
+.It favicon.png
favicon image.
-.It logo.svg
+.It logo.png
square logo.
.It style.css
CSS stylesheet.
diff --git a/stagit.c b/stagit.c
index 8b51f3f..a394a69 100644
--- a/stagit.c
+++ b/stagit.c
@@ -474,15 +474,15 @@ 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/svg+xml\" href=\"../%slogo.svg\"/>\n", relpath);
- fprintf(fp, "<link rel=\"alternate icon\" href=\"../%sfavicon.ico\"/>\n", relpath);
+ fprintf(fp, "</title>\n<link rel=\"icon\" type=\"image/svg+xml\" href=\"../%slogo.png\"/>\n", relpath);
+ fprintf(fp, "<link rel=\"alternate icon\" href=\"../%sfavicon.png\"/>\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=\"alternate\" type=\"application/atom+xml\" title=\"%s Atom Feed (tags)\" href=\"%stags.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.svg\" alt=\"\" width=\"32\" height=\"32\" /></a>",
+ fprintf(fp, "<a class=\"logo\" href=\"../%s\"><img src=\"../%slogo.png\" alt=\"\" width=\"32\" height=\"32\" /></a>",
relpath, relpath);
fputs("</td><td><strong>", fp);
xmlencode(fp, strippedname, strlen(strippedname));
diff --git a/style.css b/style.css
index 2544e84..689b12a 100644
--- a/style.css
+++ b/style.css
@@ -1,89 +1,23 @@
-:root {
- --diff-green: #181;
- --diff-red: #e02;
- --links: #00c;
- --border: #d2d2d2;
- --gray: #777;
- --hover-bg: #eee;
+@font-face {
+ font-family: 'Fontin';
+ src: url('./fonts/Fontin-Regular.woff') format('woff'),
+ url('./fonts/Fontin-Regular.woff2') format('woff2');
+ font-weight: normal;
+ font-style: normal;
}
-body {
- color: #000;
- background-color: #fff;
- font-family: sans-serif;
- max-width: 800px;
- margin: 8px auto;
- padding: 5px;
- line-height: 1.5;
-}
-
-#branches,
-#tags,
-#index,
-#log,
-#files {
- font-family: monospace;
-}
-
-#head, #content, .table-container {
- max-width: 800px;
- overflow-x: auto;
- margin: auto;
-}
-
-#log, #index {
- min-width: 600px;
- width: 100%;
- overflow-x: auto;
-}
-
-pre:not(#about) {
- overflow-x: auto;
- border: 1px solid var(--border);
- border-radius: 4px;
- padding: 10px;
-}
-
-a {
- color: var(--links);
-}
-
-#head table {
- margin-top: 0.5em;
- margin-bottom: 0.5em;
+@font-face {
+ font-family: 'Fira Code';
+ src: url('./fonts/FiraCode-Regular.woff') format('woff'),
+ url('./fonts/FiraCode-Regular.woff2') format('woff2');
+ font-weight: normal;
+ font-style: normal;
}
-#head table td:first-child {
- padding: 0 0.4em 0 0;
-}
-
-#head table td:last-child {
- padding: 0 0 0 0.4em;
-}
-
-#head p {
- margin: 0;
-}
-
-#files .dir {
- font-weight: bold;
- text-decoration: none;
-}
-
-.url {
- font-family: monospace;
-}
-
-#home h1 {
- font-size: 1.5em;
- text-align: center;
- margin-top: 1em;
-}
-
-#home h2 {
- font-size: 1.25em;
- margin-top: 2.5em;
- margin-bottom: 1em;
+body {
+ color: #eee;
+ background-color: #222d32;
+ font-family: 'Fontin', serif;
}
h1, h2, h3, h4, h5, h6 {
@@ -91,14 +25,6 @@ h1, h2, h3, h4, h5, h6 {
margin: 0;
}
-.md h1 {
- font-size: 1.5em;
-}
-
-.md h2 {
- font-size: 1.25em;
-}
-
img, h1, h2 {
vertical-align: middle;
}
@@ -107,8 +33,11 @@ img {
border: 0;
}
-a:target {
- background-color: #ccc;
+a {
+ color: #66aabb;
+}
+a:hover {
+ color: #eadab1
}
a.d,
@@ -119,11 +48,11 @@ a.line {
}
#blob a {
- color: var(--gray);
+ color: #777;
}
#blob a:hover {
- color: blue;
+ color: #ff0;
text-decoration: none;
}
@@ -145,7 +74,7 @@ table td {
#index tr:hover td,
#log tr:hover td,
#files tr:hover td {
- background-color: var(--hover-bg);
+ background-color: #111;
}
#index tr td:nth-child(2),
@@ -160,29 +89,36 @@ td.num {
}
.desc {
- color: var(--gray);
+ color: #eee;
+ font-weight: bold;
+ font-size: 1.5em;
}
hr {
border: 0;
- border-top: 1px solid var(--gray);
+ border-top: 1px solid #777;
height: 1px;
}
-pre {
- font-family: monospace;
+pre, tr.url {
+ font-family: 'Fira Code', 'Monospace', monospace;
+ font-size: 12px;
+}
+
+pre a.h {
+ color: lightblue;
}
.A,
span.i,
pre a.i {
- color: var(--diff-green);
+ color: lightgreen;
}
.D,
span.d,
pre a.d {
- color: var(--diff-red);
+ color: lightcoral;
}
pre a.h:hover,
@@ -191,13 +127,6 @@ pre a.d:hover {
text-decoration: none;
}
-.md table {
- border-collapse: collapse;
- margin: 1em 1em;
- border: 1px solid var(--border);
-}
-.md table td,
-.md table th {
- padding: 0.25em 1em;
- border: 1px solid var(--border);
+table#index td:nth-child(3) {
+ display: none;
}