aboutsummaryrefslogtreecommitdiff
path: root/modules/services/nixos/cgit/cgit-head.html
diff options
context:
space:
mode:
authorCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-08-26 13:01:33 -0500
committerCollin Williams <96917990+bluedragon1221@users.noreply.github.com>2026-08-26 13:03:27 -0500
commit53c787c651df22bf0d8c5e2c7117143f8a0e2359 (patch)
tree98d15a9373a69cb12f3374c4246c5cccb3821209 /modules/services/nixos/cgit/cgit-head.html
parenta7b13cd858d9fbd6592323984d55bd57beacee46 (diff)
small changes to cgit
Diffstat (limited to 'modules/services/nixos/cgit/cgit-head.html')
-rw-r--r--modules/services/nixos/cgit/cgit-head.html19
1 files changed, 11 insertions, 8 deletions
diff --git a/modules/services/nixos/cgit/cgit-head.html b/modules/services/nixos/cgit/cgit-head.html
index da6140d..b0c74dd 100644
--- a/modules/services/nixos/cgit/cgit-head.html
+++ b/modules/services/nixos/cgit/cgit-head.html
@@ -19,21 +19,24 @@
const headerInfo = document.createElement("div");
headerInfo.className = "header-info";
-
- const title = document.createElement("h1");
+
const repo = main.querySelector("a:last-of-type");
- title.textContent = repo?.textContent.trim() ?? "";
+ const title = document.createElement("h1");
+ if (repo && repo !== main.querySelector("a:first-of-type")) {
+ title.textContent = repo.textContent.trim();
+ } else {
+ title.textContent = document.title; // we must be on the title page
+ title.className = "main-page";
+ }
const desc = document.createElement("p");
- desc.className = "description";
+ desc.className = "description"
desc.textContent = description?.textContent.trim() ?? "";
headerInfo.append(title, desc);
headerTop.append(logoLink, headerInfo);
+ header.append(headerTop);
- const hr = document.createElement("hr");
-
- header.append(headerTop, hr);
oldHeader.replaceWith(header);
- });
+ });
</script>