commit d7eebea648a492b38ea94b947e9b3394c9f3ff87
parent ae62a2b745c1cdb370fdd9eebd6b8d9d011d4ec5
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Tue, 30 Jul 2024 13:55:19 +0200
feat: add Home-button to menu
Diffstat:
3 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/assets/img/home.svg b/assets/img/home.svg
@@ -0,0 +1 @@
+<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-home"><path d="M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"></path><polyline points="9 22 9 12 15 12 15 22"></polyline></svg>
+\ No newline at end of file
diff --git a/assets/style.css b/assets/style.css
@@ -209,6 +209,9 @@ body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a {
border-radius: 3px;
background-color: var(--bg2);
white-space: nowrap;
+ display: inline-block;
+ margin-top: 2px;
+ margin-bottom: 3px;
}
body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td {
padding-top: 0.25em;
@@ -241,6 +244,10 @@ body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a:before
margin-bottom: -0.15em;
margin-right: 0.25em;
}
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="index.html"]:before {
+ mask: url("/assets/img/home.svg") no-repeat 0% 0%;
+ mask-size: contain;
+}
body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="log.html"]:before {
mask: url("/assets/img/git-commit.svg") no-repeat 0% 0%;
mask-size: contain;
diff --git a/bin/git_update_repo_html.sh b/bin/git_update_repo_html.sh
@@ -191,6 +191,10 @@ find "${1}/${2}/${3}/" -type f -exec sed -E -e ${MAILEXP} -i {} \;
INJEXP="s/(>Files<\/a>\ \|)/\1 <a href=\"\/${2}\/${3}\/exports.html\">Exports<\/a> \|/"
find "${1}/${2}/${3}/" -type f -name "*.html" -exec sed -E "${INJEXP}" -i {} \;
+# Add Home to menu (first item)
+INJEXP="s/(^.*log.html\">.*$)/<a href=\"\/${2}\/${3}\/index.html\">Home<\/a>\ \|\ \1/"
+find "${1}/${2}/${3}/" -type f -name "*.html" -exec sed -E "${INJEXP}" -i {} \;
+
# Add RSS Feed to menu (last item)
INJEXP="s/(^.*log.html\">.*)(<\/td>)/\1\ \|\ <a href=\"\/${2}\/${3}\/atom.xml\">RSS<\/a>\2/"
find "${1}/${2}/${3}/" -type f -name "*.html" -exec sed -E "${INJEXP}" -i {} \;