commit 4f89c3aceb5a93f9d863f276cfa2a242e275af3a
parent 4ef8e3ba3faf7568506e20febcb51ddb0945f901
Author: JayVii <jayvii[AT]posteo[DOT]de>
Date: Fri, 18 Oct 2024 14:10:43 +0200
feat: mark menu entries as active in commits and file section
Diffstat:
1 file changed, 2 insertions(+), 0 deletions(-)
diff --git a/bin/git_update_repo_html.sh b/bin/git_update_repo_html.sh
@@ -212,6 +212,8 @@ find "${1}/${2}/${3}/file" -type f -name "*.html" -exec sh -c 'sed -E "s/^<p>\s*
# Mark menu entries as active if page is opened (needs to be run inside SHELL)
find "${1}/${2}/${3}/" -type f -name "*.html" -exec sh -c 'sed -E "s/(href=\"[^\"]*$(basename {})\")/\1\ class=\"active\"/g" -i {}' \;
+find "${1}/${2}/${3}/commit/" -type f -name "*.html" -exec sed -E 's/(href=\"[^\"]*$log.html\")/\1\ class=\"active\"/g' -i {} \;
+find "${1}/${2}/${3}/file/" -type f -name "*.html" -exec sed -E 's/(href=\"[^\"]*$files.html\")/\1\ class=\"active\"/g' -i {} \;
# Inject javascript reference in HTML
INJEXP="s/(<\/html>)/<script\ async\ src=\"\/assets\/js\/code_to_clipboard.js\"><\/script>\1/"