commit 00861fbab9ce5e594268d835460f8cb0bdb79f9b
parent 224fa755624b4c265cca75f4f6932256a9f7a101
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Sun, 28 Apr 2024 15:26:23 +0200
Design adjustments; let diffs be styled by CSS only
Diffstat:
2 files changed, 61 insertions(+), 59 deletions(-)
diff --git a/assets/style.css b/assets/style.css
@@ -4,82 +4,102 @@
/* Dark Mode: Default */
:root {
- --fg: #dadadb;
+ --fg1: #dadadb;
+ --fg2: #8d8e8f;
--bg1: #1d1e20;
--bg2: #2e2e33;
- --hl1: #6c71c4;
- --hl2: #4fb4d7;
- --hl3: #eb3c54;
+ --hl1: #8c90d4;
+ --del: #db4325;
+ --add: #006164;
}
/* Bright Mode */
@media (prefers-color-scheme: light) {
:root {
- --fg: #1e1e1e;
+ --fg1: #1e1e1e;
+ --fg2: #8d8e8f;
--bg1: #f5f5f5;
--bg2: #ffffff;
+ --hl1: #6c71c4;
+ --del: #db4325;
+ --add: #006164;
}
}
body {
- font-family: sans, serif-sans;
- color: var(--fg);
- background-color: var(--bg1);
+ font-family: sans-serif, serif;
+ color: var(--fg1);
+ background-color: var(--bg1);
}
img {
- border: 0;
+ border: 0;
}
h1, h2, h3, h4, h5, h6 {
- font-size: 1em;
- margin: 0;
+ font-size: 1em;
+ margin: 0;
}
img, h1, h2 {
- vertical-align: middle;
-}
-
-a:target {
- background-color: var(--bg2);
+ vertical-align: middle;
}
a {
- color: var(--hl2);
+ color: var(--hl1);
}
-a:visited {
- color: var(--hl3);
+a:target {
+ background-color: var(--bg2);
}
a.d,
a.h,
a.i,
a.line {
- text-decoration: none;
+ text-decoration: none;
+}
+
+/* diff: inserts */
+.A,
+span.i,
+pre a.i {
+ color: #FFFFFF;
+ background-color: var(--add);
+}
+/* diff: deletes */
+.D,
+span.d,
+pre a.d {
+ color: #FFFFFF;
+ background-color: var(--del);
+}
+/* diff: line-info */
+pre a.h {
+ color: var(--fg2);
}
#blob a {
- color: var(--hl1);
- border-right: 3px solid #aaa;
- padding: 0 5px 0 0;
+ color: var(--hl1);
+ border-right: 3px solid #aaa;
+ padding: 0 5px 0 0;
}
#blob a:hover {
- color: var(--hl1);
- text-decoration: none;
+ color: var(--hl1);
+ text-decoration: none;
}
table thead td {
- font-weight: bold;
+ font-weight: bold;
}
table td {
- padding: 0 0.4em;
+ padding: 0 0.4em;
}
#content table td {
- white-space: nowrap;
- vertical-align: top;
+ white-space: nowrap;
+ vertical-align: top;
}
#branches tr:hover td,
@@ -87,62 +107,47 @@ table td {
#index tr:hover td,
#log tr:hover td,
#files tr:hover td {
- background-color: var(--bg2);
+ background-color: var(--bg2);
}
#index tr td:nth-child(2),
#tags tr td:nth-child(3),
#branches tr td:nth-child(3),
#log tr td:nth-child(2) {
- white-space: normal;
+ white-space: normal;
}
td.num {
- text-align: right;
+ text-align: right;
}
.desc {
- color: var(--hl1);
+ color: var(--fg2);
}
.url {
- font-family: monospace;
+ font-family: monospace;
+ color: var(--hl1);
}
hr {
- border: 0;
- border-top: 3px solid var(--hl1);
- height: 3px;
+ border: 0;
+ border-top: 3px solid var(--fg2);
+ height: 3px;
}
#content hr {
- display: none;
+ display: none;
}
pre {
- font-family: monospace;
-}
-
-pre a.h {
- color: var(--hl1);
-}
-
-.A,
-span.i,
-pre a.i {
- color: var(--hl1);
-}
-
-.D,
-span.d,
-pre a.d {
- color: var(--hl1);
+ font-family: monospace;
}
pre a.h:hover,
pre a.i:hover,
pre a.d:hover {
- text-decoration: none;
+ text-decoration: none;
}
* {
diff --git a/bin/git_update_repo_html.sh b/bin/git_update_repo_html.sh
@@ -29,9 +29,6 @@ stagit "${1}/${2}/${3}.git"
# insert highlighting template into all files that may show code
find "${1}/${2}/${3}/file" -type f -name "*.html" \
-exec sed "/<\/html>/r ${1}/templates/highlight.tt" -i {} \;
-find "${1}/${2}/${3}/commit" -type f -name "*.html" \
- -exec sed "/<\/html>/r ${1}/templates/highlight.tt" -i {} \; \
- -exec sed -e 's/<pre>/<pre class=\"language-diff\">/g' -i {} \;
if [ -z $(find "${1}/${2}/${3}/file" -type f -name "README*.html") ]; then
# use log.html as index