1
0
mirror of https://github.com/rust-lang/rustlings.git synced 2025-08-08 22:36:55 +02:00

Use internal links for validation

This commit is contained in:
mo8it
2025-05-17 21:28:25 +02:00
parent a51d6f1309
commit 54a74fd638
3 changed files with 13 additions and 7 deletions

View File

@ -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>