summaryrefslogtreecommitdiff
path: root/website/templates/base.html
diff options
context:
space:
mode:
authormo8it <mo8it@proton.me>2025-05-17 21:28:25 +0200
committermo8it <mo8it@proton.me>2025-05-17 21:28:25 +0200
commit54a74fd63810020806161d5ed030810039735ea2 (patch)
tree1a5d44f1aa38c4b763fa8b794788c25ea5485d54 /website/templates/base.html
parenta51d6f1309b986c270d781b08f6949f29806b18a (diff)
Use internal links for validation
Diffstat (limited to 'website/templates/base.html')
-rw-r--r--website/templates/base.html10
1 files changed, 8 insertions, 2 deletions
diff --git a/website/templates/base.html b/website/templates/base.html
index 8306ac7..91b6cee 100644
--- a/website/templates/base.html
+++ b/website/templates/base.html
@@ -50,7 +50,7 @@
<body class="flex flex-col p-2 mx-auto min-h-screen text-lg text-white break-words bg-[#2A3439] lg:px-5 2xl:container">
<header class="flex flex-col gap-x-4 items-center py-2 px-4 mb-1 bg-black/30 rounded-sm sm:flex-row sm:rounded-full">
<a class="transition duration-500 hover:scale-110"
- href="{{ get_url(path='/') | safe }}"
+ href="{{ get_url(path='@/_index.md') | safe }}"
aria-hidden="true">
<img class="w-12 h-12"
src="{{ get_url(path=config.extra.logo_path) | safe }}"
@@ -59,7 +59,13 @@
<nav class="flex flex-col gap-x-6 items-center font-bold sm:flex-row">
{% for menu_item in config.extra.menu_items %}
- <a class="p-1 no-underline" href="{{ menu_item.url | safe }}">{{ menu_item.name }}</a>
+ {%- if menu_item.url is starting_with("@") -%}
+ {% set_global menu_item_url = get_url(path=menu_item.url) %}
+ {%- else -%}
+ {% set_global menu_item_url = menu_item.url %}
+ {%- endif %}
+
+ <a class="p-1 no-underline" href="{{ menu_item_url | safe }}">{{ menu_item.name }}</a>
{% endfor %}
</nav>
</header>