Pi66

git.pi66.xyz
A web interface for the pi66.xyz Git server
git clone https://git.pi66.xyz/git.pi66.xyz

← back to log

refactor: extract duplicated nav links into shared partials/nav.html

author: pi66
date: 2026-07-23 11:28
hash: d8830ddb9e1a2fded7647d180304aecc4e8f34c7

Diffstat:

M

src/templates/partials/header.html
8 ++++++++----------------------

M

src/templates/partials/mobile-nav.html
7 +++++++-------------------

A

src/templates/partials/nav.html
5 +++++++++++++++++++
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
diff --git a/src/templates/partials/header.html b/src/templates/partials/header.html
index d1f1d1a..4badf43 100644
--- a/src/templates/partials/header.html
+++ b/src/templates/partials/header.html
@@ -8,11 +8,7 @@
            <h1 class="pi66-title ml-4 text-green-700 font-bold !text-2xl">Pi66</h1>
        </a>
    </div>
-   <nav class="pr-4 flex items-center text-green-700 transition-colors duration-200 text-2xl font-bold max-md:hidden gap-4">
-       <a class="hover:text-green-400 transition-colors duration-200 " href="https://pi66.xyz" class="nav-link">home</a>
-       <a class="hover:text-green-400 transition-colors duration-200 " href="https://pi66.xyz/tools" class="nav-link">tools</a>
-       <a class="hover:text-green-400 transition-colors duration-200 " href="https://pi66.xyz/about" class="nav-link">more</a>
-       <a class="hover:text-green-400 transition-colors duration-200 " href="https://pi66.xyz/gaza" class="nav-link">gaza</a>
-       <a class="hover:text-green-400 transition-colors duration-200 " href="/" class="nav-link">git</a>
+   <nav class="pr-4 flex items-center text-green-700 transition-colors duration-200 text-xl font-bold max-md:hidden gap-4">
+       {% include "partials/nav.html" %}
    </nav>
 </header>
diff --git a/src/templates/partials/mobile-nav.html b/src/templates/partials/mobile-nav.html
index 1f7326e..3514116 100644
--- a/src/templates/partials/mobile-nav.html
+++ b/src/templates/partials/mobile-nav.html
@@ -1,7 +1,4 @@
 <nav class="py-2 mb-2 flex justify-around border-1 border-[#333] items-center text-green-600 transition-colors duration-200 text-xl font-bold min-md:hidden gap-4">
-   <a class="hover:text-green-400 transition-colors duration-200 " href="https://pi66.xyz" class="nav-link">home</a>
-   <a class="hover:text-green-400 transition-colors duration-200 " href="https://pi66.xyz/tools" class="nav-link">tools</a>
-   <a class="hover:text-green-400 transition-colors duration-200 " href="https://pi66.xyz/about" class="nav-link">more</a>
-   <a class="hover:text-green-400 transition-colors duration-200 " href="https://pi66.xyz/gaza" class="nav-link">gaza</a>
-   <a class="hover:text-green-400 transition-colors duration-200 " href="/" class="nav-link">git</a>
+   {% include "partials/nav.html" %}
+
 </nav>
diff --git a/src/templates/partials/nav.html b/src/templates/partials/nav.html
new file mode 100644
index 0000000..3ce739b
--- /dev/null
+++ b/src/templates/partials/nav.html
@@ -0,0 +1,5 @@
+<a class="hover:text-green-400 transition-colors duration-200 " href="https://pi66.xyz/" class="nav-link">Home</a>
+<a class="hover:text-green-400 transition-colors duration-200 " href="/" class="nav-link">Repos</a>
+<a class="hover:text-green-400 transition-colors duration-200 " href="https://pi66.xyz/about" class="nav-link">About</a>
+<a class="hover:text-green-400 transition-colors duration-200 " href="https://blogs.pi66.xyz/" class="nav-link">Blogs</a>
+<a class="hover:text-green-400 transition-colors duration-200 " href="https://pi66.xyz/gaza" class="nav-link">Gaza</a>