From 9d3bbd607687899d173e9087f2782d7460ebee82 Mon Sep 17 00:00:00 2001
From: Aiden Bai <aiden.bai05@gmail.com>
Date: Tue, 03 May 2022 15:53:18 +0000
Subject: [PATCH] Fix active node on graph
---
layouts/partials/head.html | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/layouts/partials/head.html b/layouts/partials/head.html
index 1dabaf6..37938a5 100644
--- a/layouts/partials/head.html
+++ b/layouts/partials/head.html
@@ -58,6 +58,7 @@
content,
}))
</script>
+ {{if $.Site.Data.config.enableSPA}}
<script type="module">
import { router, navigate } from "https://unpkg.com/million/dist/router.mjs";
// SPA navigation for access later
@@ -89,5 +90,8 @@
window.addEventListener("million:navigate", callback);
window.addEventListener("DOMContentLoaded", callback);
</script>
+ {{else}}
+ <script>window.navigate = (url) => window.location.href = url</script>
+ {{end}}
</head>
{{ template "_internal/google_analytics.html" . }}
--
Gitblit v1.10.0