current-page

This commit is contained in:
madrilene 2022-12-02 14:56:11 +01:00
parent 492ca4373c
commit f1dbf6e37f
8 changed files with 30 additions and 22 deletions

24
package-lock.json generated
View file

@ -502,9 +502,9 @@
"integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ=="
},
"node_modules/@types/node": {
"version": "18.11.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
"integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==",
"version": "18.11.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.10.tgz",
"integrity": "sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ==",
"dev": true,
"optional": true
},
@ -4903,9 +4903,9 @@
}
},
"node_modules/postcss-import": {
"version": "15.0.0",
"resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.0.0.tgz",
"integrity": "sha512-Y20shPQ07RitgBGv2zvkEAu9bqvrD77C9axhj/aA1BQj4czape2MdClCExvB27EwYEJdGgKZBpKanb0t1rK2Kg==",
"version": "15.0.1",
"resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.0.1.tgz",
"integrity": "sha512-UGlvk8EgT7Gm/Ndf9xZHnzr8xm8P54N8CBWLtcY5alP+YxlEge/Rv78etQyevZs3qWTE9If13+Bo6zATBrPOpA==",
"dev": true,
"dependencies": {
"postcss-value-parser": "^4.0.0",
@ -7576,9 +7576,9 @@
"integrity": "sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ=="
},
"@types/node": {
"version": "18.11.9",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.9.tgz",
"integrity": "sha512-CRpX21/kGdzjOpFsZSkcrXMGIBWMGNIHXXBVFSH+ggkftxg+XYP20TESbh+zFvFj3EQOl5byk0HTRn1IL6hbqg==",
"version": "18.11.10",
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.11.10.tgz",
"integrity": "sha512-juG3RWMBOqcOuXC643OAdSA525V44cVgGV6dUDuiFtss+8Fk5x1hI93Rsld43VeJVIeqlP9I7Fn9/qaVqoEAuQ==",
"dev": true,
"optional": true
},
@ -10664,9 +10664,9 @@
"requires": {}
},
"postcss-import": {
"version": "15.0.0",
"resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.0.0.tgz",
"integrity": "sha512-Y20shPQ07RitgBGv2zvkEAu9bqvrD77C9axhj/aA1BQj4czape2MdClCExvB27EwYEJdGgKZBpKanb0t1rK2Kg==",
"version": "15.0.1",
"resolved": "https://registry.npmjs.org/postcss-import/-/postcss-import-15.0.1.tgz",
"integrity": "sha512-UGlvk8EgT7Gm/Ndf9xZHnzr8xm8P54N8CBWLtcY5alP+YxlEge/Rv78etQyevZs3qWTE9If13+Bo6zATBrPOpA==",
"dev": true,
"requires": {
"postcss-value-parser": "^4.0.0",

View file

@ -1,6 +1,6 @@
{
"name": "eleventy-excellent",
"version": "1.1.2",
"version": "1.1.3",
"engines": {
"node": ">=16.x.x"
},

View file

@ -2,7 +2,8 @@
<div class="wrapper">
<div class="site-foot__inner">
<nav id="footernav" class="site-foot__inner">
&copy; {% year %} <a href="/">{{ meta.siteName }}</a>
{% set activePage = page.url | url %}
&copy; {% year %} <a href="/" {% if activePage === '/' %} aria-current="page" {% endif %}>{{ meta.siteName }}</a>
{% for item in navigation.bottom %}

View file

@ -2,8 +2,15 @@
<header class="wrapper | relative" role="banner">
<div class="sidebar | ontop spot-color-primary">
<a href="/" class="logo | no-underline">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor">
{% set activePage = page.url | url %}
<a href="/" class="logo | no-underline" {% if activePage === '/' %} aria-current="page" {% endif %}>
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
aria-hidden="true"
focusable="false"
>
<path
fill-rule="evenodd"
d="M10.788 3.21c.448-1.077 1.976-1.077 2.424 0l2.082 5.007 5.404.433c1.164.093 1.636 1.545.749 2.305l-4.117 3.527 1.257 5.273c.271 1.136-.964 2.033-1.96 1.425L12 18.354 7.373 21.18c-.996.608-2.231-.29-1.96-1.425l1.257-5.273-4.117-3.527c-.887-.76-.415-2.212.749-2.305l5.404-.433 2.082-5.006z"

View file

@ -7,8 +7,8 @@
"@id": "{{ meta.url }}#website",
"url": "{{ meta.url }}",
"name": "{{ meta.siteName }}",
"description": "{{ meta[locale].metaDescription }}",
"inLanguage": "{{ meta[locale].localeCode }}"
"description": "{{ meta.siteDescription }}",
"inLanguage": "{{ meta.locale }}"
}
]
}

View file

@ -10,9 +10,9 @@
},
"@id": "{{ url }}",
"headline": "{{ title or meta.siteName }}",
"description": "{{ excerpt or meta.siteDescription }}",
"description": "{{ seo.description or description or meta.siteDescription }}",
"image": "{% if seo.image %}/assets/images/{{ seo.image }}{% else %}{{ meta.siteImage }}{% endif %}",
"inLanguage": "{{ meta[locale].localeCode }}",
"inLanguage": "{{ meta.locale }}",
"publisher": {
"@type": "{{ meta.siteType }}",
"name": "{{ meta.authorName }}",

View file

@ -8,7 +8,7 @@
"@id": "{{ meta.url }}#website"
},
"headline": "{{ title or meta.siteName }}",
"description": "{{ seo.description or meta.siteDescription }}",
"description": "{{ seo.description or description or meta.siteDescription }}",
"image": "{% if seo.image %}/assets/images/{{ seo.image }}{% else %}{{ meta.siteImage }}{% endif %}",
"inLanguage": "{{ meta.locale }}",
"publisher": {

View file

@ -7,7 +7,7 @@ date: 2022-08-28
[Eleventy Fetch](https://www.11ty.dev/docs/plugins/fetch/) fetches and caches resources - at configurable intervals.
This is an example of fetching external data.
In this case, my public repositories (with more than one stargazer) and a cache duration of 1 day.
In this case, my public repositories (with more than zero stargazer) and a cache duration of 1 day.
Endpoint editable in `_data/github.js.`