From 6b8635defea584c29632a837baf6f33f31e3e8c3 Mon Sep 17 00:00:00 2001 From: Adrian Victor Date: Thu, 14 May 2026 14:59:13 -0300 Subject: [PATCH] Use eleventy's url function to apply pathPrefix. --- .eleventy.js | 5 +- _includes/base.njk | 34 +++++---- _includes/header.njk | 10 +-- _includes/macros.njk | 38 ++++++---- blog.njk | 2 +- index.njk | 153 ++++++++++++++++++++++++++-------------- languages.njk | 6 +- misc.njk | 8 ++- static/scripts/ccd.js | 2 +- static/scripts/home.js | 2 +- static/scripts/music.js | 14 ++-- 11 files changed, 172 insertions(+), 102 deletions(-) diff --git a/.eleventy.js b/.eleventy.js index e907c3c..b191366 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -40,9 +40,10 @@ module.exports = function(eleventyConfig) { })) }); - eleventyConfig.addFilter("absoluteUrl", function(path) { + eleventyConfig.addFilter("absoluteUrl", function(url) { const base = "https://adrianvic.github.io"; - return base + path; + const prefix = "/tenkuma/web"; + return base + prefix + url; }); eleventyConfig.addFilter("postDate", (dateObj) => { diff --git a/_includes/base.njk b/_includes/base.njk index 81e30ae..28fb5d7 100644 --- a/_includes/base.njk +++ b/_includes/base.njk @@ -11,25 +11,33 @@ - Adrian Victor{% if pageTitle or postTitle %} - {{pageTitle or postTitle}}{% endif %} - - - - - - - - - - + Adrian Victor{% if pageTitle or postTitle %} - {{ pageTitle or postTitle }}{% endif %} + + + + + + + + + + + + + + + - + +
- + {% include "header.njk" %}
{{ content | safe }} diff --git a/_includes/header.njk b/_includes/header.njk index 08968f9..29d6f22 100644 --- a/_includes/header.njk +++ b/_includes/header.njk @@ -16,12 +16,12 @@
\ No newline at end of file diff --git a/_includes/macros.njk b/_includes/macros.njk index 60bf451..eaeec1b 100644 --- a/_includes/macros.njk +++ b/_includes/macros.njk @@ -1,31 +1,39 @@ {% macro i88x31(link) %} - + {% endmacro %} {% macro videoCard(videoLink, videoTitle, videoImage, videoWebsite, videoDuration, videoAccent) %}
- {% endmacro %} {% macro projectCard(projectName, projectDescription, projectLink, projectImage, projectImageAlt) %}
-
{{ projectImageAlt or projectName }}
+
+ {{ projectImageAlt or projectName }} +
- +
diff --git a/blog.njk b/blog.njk index 00c9955..bc9c94b 100644 --- a/blog.njk +++ b/blog.njk @@ -15,7 +15,7 @@ title: Adrian Victor:Blog {% if post.data.langKey == langKey %}
  • - {{ post.data.postTitle }}
    + {{ post.data.postTitle }}
    {{ post.data.date | postDate }}{% if post.data.lastModified | postDate !== post.data.date | postDate %} ({{ i18n[langKey].lastEditedIn }} {{ post.data.lastModified | postDate}}){% endif %}

  • diff --git a/index.njk b/index.njk index 7aee055..0482e17 100644 --- a/index.njk +++ b/index.njk @@ -12,73 +12,86 @@ layout: base.njk
    +
    - - + + +
    -

    {{ i18n[langKey].welcome | smartTitle }}

    -

    {{ i18n[langKey].homeWelcomeParagraph | safe }}

    -
    - {{ i88x31("tenkuma.gif") }} - {{ i88x31("anybrowser6.gif") }} - {{ i88x31("ai.gif") }} - {{ i88x31("WEBP.gif") }} - {{ i88x31("rainbowrain.gif") }} - {{ i88x31("blasphemy.gif") }} - {{ i88x31("css3.gif") }} - {{ i88x31("best_viewed_with_open_eyes.gif") }} - {{ i88x31("gnu-linux.gif") }} -
    +

    {{ i18n[langKey].welcome | smartTitle }}

    +

    {{ i18n[langKey].homeWelcomeParagraph | safe }}

    + +
    + {{ i88x31("tenkuma.gif") }} + {{ i88x31("anybrowser6.gif") }} + {{ i88x31("ai.gif") }} + {{ i88x31("WEBP.gif") }} + {{ i88x31("rainbowrain.gif") }} + {{ i88x31("blasphemy.gif") }} + {{ i88x31("css3.gif") }} + {{ i88x31("best_viewed_with_open_eyes.gif") }} + {{ i88x31("gnu-linux.gif") }} +
    +
    -

    {{ i18n[langKey].aboutMe | smartTitle }}

    + +

    {{ i18n[langKey].aboutMe | smartTitle }}

    {{ i18n[langKey].homeAboutMeParagraph | safe }}

    {{ i18n[langKey].homeAboutMeParagraphTwo | safe }}

    -

    {{ i18n[langKey].socialsAndContact | smartTitle }}

    + +

    {{ i18n[langKey].socialsAndContact | smartTitle }}

    {{ i18n[langKey].homeSocialsAndContactParagraph | safe }}

    {{ i18n[langKey].homeSocialsAndContactParagraphTwo | safe }}

    -

    {{ i18n[langKey].myMusic | smartTitle }}

    -

    {{ i18n[langKey].homeMyMusicParagraph | safe }}

    -

    {{ i18n[langKey].homeMyMusicParagraphTwo | safe }}

    -
    - {{ i88x31("rave.gif") }} - {{ i88x31("happymix.gif") }} -
    +

    {{ i18n[langKey].myMusic | smartTitle }}

    +

    {{ i18n[langKey].homeMyMusicParagraph | safe }}

    +

    {{ i18n[langKey].homeMyMusicParagraphTwo | safe }}

    + +
    + {{ i88x31("rave.gif") }} + {{ i88x31("happymix.gif") }} +
    +
    +
    - {{ - videoCard( - i18n["global"].homeSongLink, - i18n["global"].homeSongTitle, - i18n["global"].homeSongImage, - i18n["global"].homeSongWebsite, - i18n["global"].homeSongDuration, - i18n["global"].homeSongAccent + {{ + videoCard( + i18n["global"].homeSongLink, + i18n["global"].homeSongTitle, + i18n["global"].homeSongImage, + i18n["global"].homeSongWebsite, + i18n["global"].homeSongDuration, + i18n["global"].homeSongAccent ) - }} + }}
    -

    {{ i18n[langKey].myVideos | smartTitle }}

    -

    {{ i18n[langKey].homeMyVideoParagraph | safe }}

    +

    {{ i18n[langKey].myVideos | smartTitle }}

    +

    {{ i18n[langKey].homeMyVideoParagraph | safe }}

    +
    + {{ videoCard( i18n["global"].homeVideoLink, @@ -86,22 +99,58 @@ layout: base.njk i18n["global"].homeVideoImage, i18n["global"].homeVideoWebsite, i18n["global"].homeVideoDuration - ) + ) }}
    - +
    -

    {{ i18n[langKey].mySoftware | smartTitle }}

    -

    {{ i18n[langKey].homeMySoftwareParagraph | safe }}

    - {#

    {{ i18n[langKey].homeMySoftwareNotableProjects | safe }}

    #} +

    {{ i18n[langKey].mySoftware | smartTitle }}

    +

    {{ i18n[langKey].homeMySoftwareParagraph | safe }}

    +
    +
    - {{ projectCard("Jamfish", i18n[langKey].jamfishProjectDesctiption, "https://github.com/adrianvic/jamfish", "/static/images/jamfish-wide.png") }} - {{ projectCard("ItemEconomy", i18n[langKey].itemeconomyProjectDesctiption, "https://github.com/adrianvic/ItemEconomy", "/static/images/itemeconomy2-wide.png") }} - {{ projectCard("Eye of Nemesis", i18n[langKey].eyeofnemesisProjectDesctiption, "https://github.com/adrianvic/NemesisEye", "/static/images/eye_of_nemesis.png") }} - {{ projectCard("PestoWiki", i18n[langKey].pestoProjectDesctiption, "https://github.com/Margarina-not-butter/PestoWiki", "/static/images/pestowikifullwhite.png") }} + {{ + projectCard( + "Jamfish", + i18n[langKey].jamfishProjectDesctiption, + "https://github.com/adrianvic/jamfish", + '/static/images/jamfish-wide.png', + "Jamfish" + ) + }} + + {{ + projectCard( + "ItemEconomy", + i18n[langKey].itemeconomyProjectDesctiption, + "https://github.com/adrianvic/ItemEconomy", + '/static/images/itemeconomy2-wide.png', + "ItemEconomy" + ) + }} + + {{ + projectCard( + "Eye of Nemesis", + i18n[langKey].eyeofnemesisProjectDesctiption, + "https://github.com/adrianvic/NemesisEye", + '/static/images/eye_of_nemesis.png', + "Eye of Nemesis" + ) + }} + + {{ + projectCard( + "PestoWiki", + i18n[langKey].pestoProjectDesctiption, + "https://github.com/Margarina-not-butter/PestoWiki", + '/static/images/pestowikifullwhite.png', + "PestoWiki" + ) + }}
    -
    + \ No newline at end of file diff --git a/languages.njk b/languages.njk index e82d61f..7d82b75 100644 --- a/languages.njk +++ b/languages.njk @@ -3,7 +3,7 @@ permalink: "/index.html" layout: base.njk langKey: "en" --- - +