]> git.zue.dev - git.zue.dev/commitdiff
add html files overlay
authorAlex Pooley (@zuedev) <zuedev@gmail.com>
Mon, 23 Mar 2026 10:54:45 +0000 (10:54 +0000)
committerAlex Pooley (@zuedev) <zuedev@gmail.com>
Mon, 23 Mar 2026 10:54:45 +0000 (10:54 +0000)
cron/minutely.bash
docker-compose.yaml
html/home_text.html [new file with mode: 0644]
html/site_footer.html [new file with mode: 0644]
html/site_header.html [new file with mode: 0644]

index b8514336e65f8bdc06cf880fcbe0d16ee6f1e186..81199b879a545ee9e9f5040215babf033e83363f 100644 (file)
@@ -34,4 +34,21 @@ else
     echo "$DOCKER_COMPOSE_FILENAME has not changed. No action needed."
 fi
 
+# array of files to check for changes
+HTML_FILES_TO_CHECK=(
+    "site_header.html"
+    "site_footer.html"
+    "home_text.html"
+)
+
+# loop through each file and check for changes
+for FILE in "${HTML_FILES_TO_CHECK[@]}"; do
+    if ! cmp -s "$DOCKER_COMPOSE_DIRECTORY/$FILE" <(git show HEAD:"html/$FILE"); then
+        echo "$FILE has changed. Updating local copy..."
+        git show HEAD:"html/$FILE" > "$DOCKER_COMPOSE_DIRECTORY/$FILE"
+    else
+        echo "$FILE has not changed. No action needed."
+    fi
+done
+
 echo "Minutely cron job completed."
\ No newline at end of file
index cb69ce9b608d71ea86ed34b7d7a191b6b081468a..c6b93d24bc00cbd2433be2c708e15558e54e2aa7 100644 (file)
@@ -6,6 +6,9 @@ services:
         FROM mlan/gitweb
         CMD echo "our \$$omit_owner = true;" >> /etc/gitweb.conf && \
             echo "our \$$site_name = 'git.zue.dev';" >> /etc/gitweb.conf && \
+            echo "our \$$site_header = '/site_header.html';" >> /etc/gitweb.conf && \
+            echo "our \$$site_footer = '/site_footer.html';" >> /etc/gitweb.conf && \
+            echo "our \$$home_text = '/home_text.html';" >> /etc/gitweb.conf && \
             echo "our \$$projects_list_description_width = 100;" >> /etc/gitweb.conf && \
             echo "our \$$projects_list_group_categories = true;" >> /etc/gitweb.conf && \
             echo "\$$feature{'blame'}{'default'} = [1];" >> /etc/gitweb.conf && \
@@ -19,4 +22,7 @@ services:
     environment:
       - PROJECTS_LIST=
     volumes:
-      - /home/git/:/var/lib/git/repositories/:ro
\ No newline at end of file
+      - /home/git/:/var/lib/git/repositories/:ro
+      - ./site_header.html:/site_header.html:ro
+      - ./site_footer.html:/site_footer.html:ro
+      - ./home_text.html:/home_text.html:ro
\ No newline at end of file
diff --git a/html/home_text.html b/html/home_text.html
new file mode 100644 (file)
index 0000000..83b4f30
--- /dev/null
@@ -0,0 +1,60 @@
+<style>
+  .home_text {
+    display: flex;
+    align-items: center;
+    gap: 1rem;
+  }
+
+  .home_text img {
+    width: 100px;
+    height: 100px;
+  }
+
+  .home_text h1 {
+    margin: 0;
+    padding: 0;
+  }
+
+  .home_text p {
+    margin: 0;
+    padding: 0;
+  }
+
+  .home_text div {
+    display: flex;
+    flex-direction: column;
+    gap: 0.5rem;
+  }
+
+  .home_text a {
+    text-decoration: none;
+    color: inherit;
+  }
+
+  .home_text a:hover {
+    text-decoration: underline;
+  }
+
+  .project_list {
+    width: 100%;
+  }
+
+  .home_text a {
+    color: #007bff;
+  }
+</style>
+
+<div class="home_text">
+  <img src="https://about.zue.dev/pro_avatar.png" alt="zuedev's avatar" />
+  <div>
+    <h1>Git Projects >> Alex Pooley (@zuedev)</h1>
+    <p>
+      If it's on this site, I'm working on it.
+      <br />
+      Have an issue to report or a
+      <a href="https://git-send-email.io" target="_blank">patch to submit</a>?
+      Send it to:
+      <a href="mailto:git@zue.dev">git@zue.dev</a>
+    </p>
+  </div>
+</div>
diff --git a/html/site_footer.html b/html/site_footer.html
new file mode 100644 (file)
index 0000000..6630b18
--- /dev/null
@@ -0,0 +1,98 @@
+<script src="https://unpkg.com/darkreader@4.9.105/darkreader.js"></script>
+
+<!-- Dark Reader -->
+<script>
+  // Set the fetch method for DarkReader
+  DarkReader.setFetchMethod(window.fetch);
+
+  // automatically enable dark mode if the user's system is in dark mode
+  DarkReader.auto({
+    brightness: 125,
+    contrast: 125,
+    sepia: 0,
+  });
+
+  // print darkreader version to console
+  console.log(`DarkReader version: ${DarkReader.version}`);
+</script>
+
+<!-- markdown-style links for repo descriptions -->
+<script>
+  function parseMarkdownLinks(text) {
+    const result = text.replace(/\[([^\]]+)\]\(([^\)]+)\)/, "$1");
+    console.log("parseMarkdownLinks", text, result);
+    return result;
+  }
+
+  try {
+    document.querySelectorAll(".project_list tr td a").forEach((link) => {
+      const title = link.getAttribute("title");
+
+      // skip if no title
+      if (!title) return;
+
+      link.innerHTML = parseMarkdownLinks(title);
+    });
+
+    document.querySelectorAll(".projects_list tr td").forEach((td) => {
+      const innerHTML = td.innerHTML;
+
+      // skip if no title
+      if (!innerHTML) return;
+
+      td.innerHTML = parseMarkdownLinks(innerHTML);
+    });
+  } catch (error) {}
+</script>
+
+<!-- custom styles -->
+<style>
+  /* import MonaspiceNe (Monaspace Neon) */
+  @import url("https://cdn.jsdelivr.net/gh/mshaugh/nerdfont-webfonts@v3.3.0/build/monaspicene-nerd-font.css");
+
+  /* replace default body font */
+  body {
+    font-family: "MonaspiceNe Nerd Font", monospace !important;
+    text-rendering: optimizeLegibility;
+    font-variant-ligatures: normal;
+  }
+
+  /* import MonaspiceKr (Monaspace Krypton) */
+  @import url("https://cdn.jsdelivr.net/gh/mshaugh/nerdfont-webfonts@v3.3.0/build/monaspicekr-nerd-font.css");
+
+  /* replace code font */
+  code,
+  pre,
+  .pre,
+  div.pre,
+  div.diff {
+    font-family: "MonaspiceKr Nerd Font", monospace !important;
+    text-rendering: optimizeLegibility;
+    font-variant-ligatures: normal;
+  }
+
+  /* remove the default margin from the body */
+  body {
+    margin: 0;
+  }
+
+  /* hide remote branches in the shortlog */
+  span.remote {
+    display: none;
+  }
+
+  /* make the shortlog table full width */
+  table.shortlog {
+    width: 100%;
+  }
+
+  /* make the tree table full width */
+  table.tree {
+    width: 100%;
+  }
+
+  /* make pre blocks overflow */
+  .page_body .pre {
+    overflow: auto;
+  }
+</style>
diff --git a/html/site_header.html b/html/site_header.html
new file mode 100644 (file)
index 0000000..1d99e0d
--- /dev/null
@@ -0,0 +1 @@
+<!-- This is the site header... :) -->
This page took 0.060055 seconds and 4 git commands to generate.