commit ad9f471872438d245a85a134d6795c17f3b7766a
parent 67b05b125ccfe407c564853cd41e175043571f24
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Sat, 15 Jun 2024 10:04:35 +0200
feat: add symbolic icons to menu bar
Diffstat:
2 files changed, 44 insertions(+), 3 deletions(-)
diff --git a/assets/style.css b/assets/style.css
@@ -152,13 +152,54 @@ pre#blob {
/* Menu Bar */
body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a {
- margin-left: 0.25em;
- margin-right: 0.25em;
+ padding-left: 0.25em;
+ padding-right: 0.25em;
+ padding-top: 0.05em;
+ padding-bottom: 0.1em;
+ border-radius: 3px;
+ background-color: var(--bg2);
}
body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td {
padding-top: 0.25em;
padding-bottom: 0.25em;
font-size: 110%;
+ visibility: hidden; /* semi-hides "|" */
+}
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a {
+ visibility: visible !important;
+}
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a:hover {
+ text-decoration: none;
+ background-color: var(--hl1);
+ color: var(--fg1);
+}
+/* Add icons in front of menu entries */
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="log.html"]:before {
+ content: "\1F589\0020";
+}
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="files.html"]:before {
+ content: "\1F5C1\0020";
+}
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="exports.html"]:before {
+ content: "\2B73\0020";
+}
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="refs.html"]:before {
+ content: "\1F5CE\0020";
+}
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="README.html"]:before,
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="README.md.html"]:before,
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="README.txt.html"]:before,
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="readme.html"]:before,
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="readme.md.html"]:before,
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="readme.txt.html"]:before,
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="Readme.html"]:before,
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="Readme.md.html"]:before,
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(3) > td > a[href$="Readme.txt.html"]:before
+{
+ content: "\1F5CA\0020";
+}
+body > table:nth-child(1) > tbody:nth-child(1) > tr:nth-child(1) > td > a[href$="index.html"]:before {
+ content: "\2302\0020";
}
/* Activity bar ------------------------------------------------------------ */
diff --git a/bin/git_update_repo_html.sh b/bin/git_update_repo_html.sh
@@ -169,7 +169,7 @@ INJEXP="s/(>Files<\/a>\ \|)/\1 <a href=\"\/${2}\/${3}\/exports.html\">Exports<\/
find "${1}/${2}/${3}/" -type f -name "*.html" -exec sed -E "${INJEXP}" -i {} \;
# Add Back-Button and Summary page (within title)
-INJEXP="s/(<h1>)(${3})(<\/h1>)/\1<a\ href=\"\/${2}\/\">${2}<\/a>\ \/\ <a\ href=\"\/${2}\/${3}\/\">\2<\/a>\3/"
+INJEXP="s/(<h1>)(${3})(<\/h1>)/\1<a\ href=\"\/${2}\/\">${2}<\/a>\ \/\ <a\ href=\"\/${2}\/${3}\/index.html\">\2<\/a>\3/"
find "${1}/${2}/${3}/" -type f -name "*.html" -exec sed -E "${INJEXP}" -i {} \;
# Replace "git clone" href