diff options
| author | Jan Palma <honzik@janpalma.cz> | 2026-02-28 14:32:54 +0100 |
|---|---|---|
| committer | Jan Palma <honzik@janpalma.cz> | 2026-02-28 14:32:54 +0100 |
| commit | 65f5a0ea6672a55c2034fbd76e68b16da011ae61 (patch) | |
| tree | de5792f1eb31f5358d543a3bd87a8a935033393e | |
| parent | 25debd1aed1d245717ccb608f48e49e3d11a8f39 (diff) | |
| download | spelis-web-65f5a0ea6672a55c2034fbd76e68b16da011ae61.tar spelis-web-65f5a0ea6672a55c2034fbd76e68b16da011ae61.tar.gz spelis-web-65f5a0ea6672a55c2034fbd76e68b16da011ae61.tar.bz2 spelis-web-65f5a0ea6672a55c2034fbd76e68b16da011ae61.tar.lz spelis-web-65f5a0ea6672a55c2034fbd76e68b16da011ae61.tar.xz spelis-web-65f5a0ea6672a55c2034fbd76e68b16da011ae61.tar.zst spelis-web-65f5a0ea6672a55c2034fbd76e68b16da011ae61.zip | |
Link fixes
| -rw-r--r-- | _includes/base.njk | 4 | ||||
| -rw-r--r-- | _includes/nav.njk | 5 | ||||
| -rw-r--r-- | assets/js/transitions.js | 1 | ||||
| -rw-r--r-- | eleventy.config.mjs | 3 | ||||
| -rw-r--r-- | siteconfig.mjs | 5 |
5 files changed, 14 insertions, 4 deletions
diff --git a/_includes/base.njk b/_includes/base.njk index c80dfcf..981c22c 100644 --- a/_includes/base.njk +++ b/_includes/base.njk @@ -24,8 +24,8 @@ <footer> <div class="social"> - {%- for s in site.socials -%} - <a href="{{ s.href }}" target="_blank">{{ s.name }}</a> + {%- for s in site.footerLinks -%} + <a no-transition href="{{ s.href }}" target="_blank">{{ s.name }}</a> {%- endfor -%} </div> </footer> diff --git a/_includes/nav.njk b/_includes/nav.njk index a0b4ab8..6f94e88 100644 --- a/_includes/nav.njk +++ b/_includes/nav.njk @@ -8,5 +8,10 @@ </li> {% endif %} {%- endfor -%} + {%- for s in site.headerLinks -%} + <li> + <a no-transition href="{{ s.href }}" target="_blank">{{ s.name }}</a> + </li> + {%- endfor -%} </ul> </nav>
\ No newline at end of file diff --git a/assets/js/transitions.js b/assets/js/transitions.js index e902a40..0ffdacd 100644 --- a/assets/js/transitions.js +++ b/assets/js/transitions.js @@ -38,6 +38,7 @@ if (noise && displacement) { transitionIn() const links = document.querySelectorAll("a"); links.forEach(l => { + if (l.hasAttribute("no-transition")) return; if (l.href.startsWith(location.origin)) { l.addEventListener("click", (e)=>{ e.preventDefault() diff --git a/eleventy.config.mjs b/eleventy.config.mjs index 359695a..5714791 100644 --- a/eleventy.config.mjs +++ b/eleventy.config.mjs @@ -34,7 +34,8 @@ export default function(eleventyConfig) { eleventyConfig.addGlobalData("layout","page"); eleventyConfig.addGlobalData("site", { title: siteConfig.siteTitle ?? "Site", - socials: siteConfig.socials + headerLinks: siteConfig.headerLinks ?? [], + footerLinks: siteConfig.footerLinks ?? [] }) eleventyConfig diff --git a/siteconfig.mjs b/siteconfig.mjs index 834b707..16f55a2 100644 --- a/siteconfig.mjs +++ b/siteconfig.mjs @@ -2,11 +2,14 @@ export const config = { siteTitle: "/home/spelis", - socials: [ + footerLinks: [ {name: "Git", href:"https://git.spelis.projnull.eu/"}, {name: "Github", href:"https://github.com/spelis/"}, {name: "YouTube", href:"https://www.youtube.com/@Spelis"}, {name: "E-Mail", href:"mailto:spelis.loves.rust@gmail.com"}, + ], + + headerLinks: [ {name: "Skolmaten", href:"https://spelis.projnull.eu/skolmaten/"}, {name: "File Share", href:"https://share.spelis.projnull.eu/"}, ] |
