commit eafda257d5ea38c6a49cbb86029b1dbf2b48ed4e
parent f0b75af872f2db06dc44c6ade6df7fca161265a7
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Sat, 8 Jun 2024 19:08:56 +0200
feat: use back-button instead of icon
Diffstat:
2 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/assets/style.css b/assets/style.css
@@ -171,11 +171,17 @@ pre a.d:hover {
margin-right: auto;
}
+/* make headline centered */
body > table:nth-child(1) {
margin-left: auto;
margin-right: auto;
}
+/* Hide icon and empty cells in headline */
+body > table:nth-child(1) > tbody > tr > td:nth-child(1) {
+ display: none;
+}
+
pre#blob {
overflow-x: scroll;
background: var(--bg2);
diff --git a/bin/git_update_repo_html.sh b/bin/git_update_repo_html.sh
@@ -85,6 +85,11 @@ find "${1}/${2}/${3}/" -type f -name "*.html" -exec sed -E "${INJEXP}" -i {} \;
INJEXP="s/^(<a\ href=\"(\.{0,2}\/)*log.html\">)/<a\ href=\"\/${2}\/${3}\/index.html\">Summary<\/a>\ \| \1/"
find "${1}/${2}/${3}/" -type f -name "*.html" -exec sed -E "${INJEXP}" -i {} \;
+# Add Back-Button (before Summary)
+INJEXP="s/^(<a\ href=\"\/${2}\/${3}\/index.html\">)/<a\ href=\"\/${2}\/\"><strong>All Repos<\/strong><\/a>\ \| \1/"
+find "${1}/${2}/${3}/" -type f -name "*.html" -exec sed -E "${INJEXP}" -i {} \;
+
+
# Replace "git clone" href
INJEXP="s/(git\ clone)\ <a href=\"(https:\/\/.*?\.git)\">/<a href='javascript:navigator.clipboard.writeText(\"\1 \2\");alert(\"\1 \2 copied to your clipboard\")';>\1 /g"
find "${1}/${2}/${3}/" -type f -name "*.html" -exec sed -E "${INJEXP}" -i {} \;