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
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 && \
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
--- /dev/null
+<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>
--- /dev/null
+<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>