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
{
nav: [
{title: "Mastodon", url: "https://dook.business/@RikSolo"},
{title: "Instagram", url: "https://instagram.com/rikberkelder"}
]
}
---
{% macro navItem(title, url, hyphen, target='_self') %}
{% macro navItem(title, url, hyphen=true, target='_self') %}
<span>
<a href="{{url}}" target="{{target}}">{{title}}</a>
{% if hyphen %} - {% endif %}
@ -17,51 +8,50 @@
<!doctype html>
<html>
<head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<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 rel="stylesheet" type="text/css" href="/style.css" />
<head>
<link rel="preconnect" href="https://fonts.googleapis.com">
<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 rel="stylesheet" type="text/css" href="/style.css" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="index, follow" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="English" />
<meta name="google-site-verification" content="x17arJy33V33DYnmMYybZciXngFd8R8xn1UZRdp7qxo" />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta name="robots" content="index, follow" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="language" content="English" />
<meta name="google-site-verification" content="x17arJy33V33DYnmMYybZciXngFd8R8xn1UZRdp7qxo" />
<title>{% if title %}{{title}} | {% endif %}Rik Berkelder</title>
</head>
<body>
<div class="container">
<div class="nav">
<a class="d-inline-block main-logo" href="/">
Rik Berkelder
</a>
<div class="d-inline-block">
{% for ni in collections.page %}
{{navItem(ni.data.title, ni.data.permalink, not loop.last )}}
{% endfor %}
</div>
<div class="d-inline-block">
<span> | </span>
{% for ni in nav %}
{{navItem(ni.title, ni.url, not loop.last , '_blank')}}
{% endfor %}
</div>
<div class="d-inline-block">
<span> | </span>
{{navItem("RBLicht", "https://rblicht.nl", true, '_blank')}}
{{navItem("RBSolutions", "https://rbsolutions.cc", false, '_blank')}}
</div>
<title>{% if title %}{{title}} | {% endif %}Rik Berkelder</title>
</head>
<body>
<div class="container">
<div class="nav">
<a class="d-inline-block main-logo" href="/">
Rik Berkelder
</a>
<div class="d-inline-block">
{{navItem("Home", "/")}}
{{navItem("Blog", "/blog")}}
{{navItem("Contact", "/contact")}}
</div>
<div class="d-inline-block">
<span> | </span>
{{navItem("Mastodon", "https://dook.business/@RikSolo")}}
{{navItem("Instagram", "https://instagram.com/RikBerkelder", false)}}
</div>
<div class="d-inline-block">
<span> | </span>
{{navItem("RBLicht", "https://rblicht.nl", true, '_blank')}}
{{navItem("RBSolutions", "https://rbsolutions.cc", false, '_blank')}}
</div>
{{content | safe}}
</div>
<script src="//instant.page/5.2.0" type="module"
integrity="sha384-jnZyxPjiipYXnSU0ygqeac2q7CVYMbh84q0uHVRRxEtvFPiQYbXWUorga2aqZJ0z"></script>
</body>
{{content | safe}}
</div>
<script src="//instant.page/5.2.0" type="module"
integrity="sha384-jnZyxPjiipYXnSU0ygqeac2q7CVYMbh84q0uHVRRxEtvFPiQYbXWUorga2aqZJ0z"></script>
</body>
</html>

View File

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