redo navigation somewhat

This commit is contained in:
Rik Berkelder 2025-01-29 23:56:59 +01:00
parent 93858a4dd4
commit 04794e0842
2 changed files with 43 additions and 52 deletions

View File

@ -1,13 +1,4 @@
---js {% macro navItem(title, url, hyphen=true, target='_self') %}
{
nav: [
{title: "Mastodon", url: "https://dook.business/@RikSolo"},
{title: "Instagram", url: "https://instagram.com/rikberkelder"}
]
}
---
{% macro navItem(title, url, hyphen, target='_self') %}
<span> <span>
<a href="{{url}}" target="{{target}}">{{title}}</a> <a href="{{url}}" target="{{target}}">{{title}}</a>
{% if hyphen %} - {% endif %} {% if hyphen %} - {% endif %}
@ -17,7 +8,7 @@
<!doctype html> <!doctype html>
<html> <html>
<head> <head>
<link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&display=swap" rel="stylesheet"> <link href="https://fonts.googleapis.com/css2?family=Inconsolata:wght@400;700&display=swap" rel="stylesheet">
@ -31,24 +22,23 @@
<meta name="google-site-verification" content="x17arJy33V33DYnmMYybZciXngFd8R8xn1UZRdp7qxo" /> <meta name="google-site-verification" content="x17arJy33V33DYnmMYybZciXngFd8R8xn1UZRdp7qxo" />
<title>{% if title %}{{title}} | {% endif %}Rik Berkelder</title> <title>{% if title %}{{title}} | {% endif %}Rik Berkelder</title>
</head> </head>
<body> <body>
<div class="container"> <div class="container">
<div class="nav"> <div class="nav">
<a class="d-inline-block main-logo" href="/"> <a class="d-inline-block main-logo" href="/">
Rik Berkelder Rik Berkelder
</a> </a>
<div class="d-inline-block"> <div class="d-inline-block">
{% for ni in collections.page %} {{navItem("Home", "/")}}
{{navItem(ni.data.title, ni.data.permalink, not loop.last )}} {{navItem("Blog", "/blog")}}
{% endfor %} {{navItem("Contact", "/contact")}}
</div> </div>
<div class="d-inline-block"> <div class="d-inline-block">
<span> | </span> <span> | </span>
{% for ni in nav %} {{navItem("Mastodon", "https://dook.business/@RikSolo")}}
{{navItem(ni.title, ni.url, not loop.last , '_blank')}} {{navItem("Instagram", "https://instagram.com/RikBerkelder", false)}}
{% endfor %}
</div> </div>
<div class="d-inline-block"> <div class="d-inline-block">
<span> | </span> <span> | </span>
@ -62,6 +52,6 @@
</div> </div>
<script src="//instant.page/5.2.0" type="module" <script src="//instant.page/5.2.0" type="module"
integrity="sha384-jnZyxPjiipYXnSU0ygqeac2q7CVYMbh84q0uHVRRxEtvFPiQYbXWUorga2aqZJ0z"></script> integrity="sha384-jnZyxPjiipYXnSU0ygqeac2q7CVYMbh84q0uHVRRxEtvFPiQYbXWUorga2aqZJ0z"></script>
</body> </body>
</html> </html>

View File

@ -3,7 +3,8 @@
"version": "1.0.0", "version": "1.0.0",
"main": "index.js", "main": "index.js",
"scripts": { "scripts": {
"test": "echo \"Error: no test specified\" && exit 1" "test": "echo \"Error: no test specified\" && exit 1",
"serve": "npx @11ty/eleventy --serve"
}, },
"keywords": [], "keywords": [],
"author": "", "author": "",