diff --git a/components/Nav/Banner.vue b/components/Nav/Banner.vue
index 07006c98..f4917469 100644
--- a/components/Nav/Banner.vue
+++ b/components/Nav/Banner.vue
@@ -32,7 +32,7 @@ const dismiss = (id: string) => {
-
+
diff --git a/components/Nav/Footer.vue b/components/Nav/Footer.vue
index 53d510f0..7ec94ce1 100644
--- a/components/Nav/Footer.vue
+++ b/components/Nav/Footer.vue
@@ -58,7 +58,7 @@ const socials = {
-
+
diff --git a/components/Nav/Header.vue b/components/Nav/Header.vue
index d0936b81..3740fd94 100644
--- a/components/Nav/Header.vue
+++ b/components/Nav/Header.vue
@@ -121,6 +121,7 @@ watch(
v-if="section.url || (section.page as any)?.permalink"
:href="(section.page as any)?.permalink ?? section.url ?? undefined"
class="section-title"
+ :target="!section.page && section.url ? '_blank' : undefined"
>
{{ section.title }}
@@ -143,7 +144,11 @@ watch(
{{ section.children_title }}
-
-
+
{
+ nuxtApp.vueApp.directive('links', {
+ mounted(el: HTMLElement) {
+ const anchors = Array.from(el.getElementsByTagName('a'));
+
+ for (const anchor of anchors) {
+ const href = anchor.getAttribute('href');
+
+ if (!href) return;
+
+ const url = new URL(href, window.location.origin);
+
+ const isLocal = url.hostname === 'directus.io';
+
+ if (isLocal) {
+ anchor.addEventListener('click', (e) => {
+ const { pathname, searchParams, hash } = new URL(anchor.href);
+
+ navigateTo({
+ path: pathname,
+ hash: hash,
+ query: Object.fromEntries(searchParams.entries()),
+ });
+
+ e.preventDefault();
+ });
+ } else {
+ anchor.setAttribute('target', '_blank');
+ anchor.setAttribute('rel', 'noopener noreferrer');
+ }
+ }
+ },
+ });
+});