Fix nav links

This commit is contained in:
Maria Rushkova 2021-08-06 15:39:12 +02:00 committed by Jakub Sokołowski
parent e0b60693d7
commit 209144e9ae
No known key found for this signature in database
GPG Key ID: 4EF064D0E6D63020
2 changed files with 17 additions and 15 deletions

View File

@ -1,28 +1,28 @@
---
- title: "Work"
link:
path: "#work"
link: "#work"
type: local
- title: "About"
link:
path: "#about"
link: "#about"
type: local
- title: "Join VAC"
link:
path: "#join"
link: "#join"
type: local
- title: "Research log"
link:
path: "#research-log"
link: "research-log"
type: local
- title: "Media"
link:
path: "#media"
link: "media"
type: local
- title: "Specs"
link: "https://specs.vac.dev"
path:
type: external
- title: "Forum"
link: "https://forum.vac.dev/"
path:
type: external

View File

@ -1,7 +1,9 @@
<li class="hover:opacity-50">
{% if nav.path %}
<a class="nav__link" href="{{ nav.path }}">{{ nav.title }}</a>
{% endif %} {% if nav.link %}
{% if nav.type == "local" %}
<a class="nav__link" href="{{site.url}}{{ site.baseurl }}{{ nav.link }}"
>{{ nav.title }}</a
>
{% elsif nav.type == "external" %}
<a href="{{ nav.link }}" target="_blank" rel="noopener noreferrer"
>{{ nav.title }}</a
>