]> danix's work - danix.xyz-2.git/commitdiff
feat: include search modal and script in base template
authorDanilo M. <redacted>
Mon, 20 Apr 2026 11:57:47 +0000 (13:57 +0200)
committerDanilo M. <redacted>
Mon, 20 Apr 2026 11:57:47 +0000 (13:57 +0200)
Adds search-modal.html partial after footer and search.js script before closing body tag. Makes search functionality available on all pages. Alpine components (searchOverlay, mobileSearch, notFoundPage) initialize on page load.

Co-Authored-By: Claude Haiku 4.5 <redacted>
themes/danix-xyz-hacker/layouts/_default/baseof.html

index 1f5dc97295620d35a41fe5413c281037a5add209..72aefba6a8e0386a8501132469fe1a16bdfcf622 100644 (file)
@@ -68,6 +68,9 @@
   <!-- Footer -->
   {{ partial "footer.html" . }}
 
+  <!-- Search modal (desktop and mobile) -->
+  {{ partial "search-modal.html" . }}
+
   <!-- Alpine.js -->
   <script src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js" defer></script>
 
   {{ $s := . | minify }}
   <script src="{{ $s.RelPermalink }}"></script>
   {{ end }}
+
+  <!-- Search functionality script -->
+  {{ $searchScript := resources.Get "js/search.js" | minify }}
+  <script src="{{ $searchScript.RelPermalink }}"></script>
 </body>
 </html>