diff --git a/.eleventy.js b/.eleventy.js index 82ad0f0..4d442aa 100644 --- a/.eleventy.js +++ b/.eleventy.js @@ -8,12 +8,12 @@ module.exports = function (eleventyConfig) { // Collection: about window content eleventyConfig.addCollection("aboutContent", (api) => - api.getFilteredByGlob("src/about.md") + api.getFilteredByGlob("src/content/about.md") ); // Collection: contact window content eleventyConfig.addCollection("contactContent", (api) => - api.getFilteredByGlob("src/contact.md") + api.getFilteredByGlob("src/content/contact.md") ); // Collection: projects, sorted alphabetically by title diff --git a/.gitignore b/.gitignore index c3c028f..828a3e1 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ deploy.sh node_modules/ _site/ .claude +CLAUDE.md diff --git a/src/_includes/fragment.njk b/src/_includes/fragment.njk new file mode 100644 index 0000000..add03be --- /dev/null +++ b/src/_includes/fragment.njk @@ -0,0 +1,14 @@ +{% if title %} +
Loading\u2026
"; + fetch(url) + .then(r => r.ok ? r.text() : Promise.reject(r.status)) + .then(html => { + fragmentCache[url] = html; + container.innerHTML = html; + if (onDone) onDone(); + }) + .catch(() => { + container.innerHTML = "Failed to load.
"; + }); + } + const mobile = () => window.matchMedia("(pointer: coarse)").matches; /* Init */ @@ -90,7 +113,7 @@ const WM = (() => { buildChrome(win); const hidden = win.classList.contains("hidden"); - state.set(id, { el: win, hidden, maximized: false, savedStyle: null }); + state.set(id, { el: win, hidden, maximized: false, savedStyle: null, contentLoaded: false }); // Draggable title bar (desktop only) const bar = win.querySelector(".window-titlebar"); @@ -156,6 +179,13 @@ const WM = (() => { s.el.classList.remove("hidden"); s.hidden = false; focusEl(s.el); + if (s.el.dataset.src && !s.contentLoaded) { + s.contentLoaded = true; + const contentEl = s.el.querySelector(".window-content"); + if (contentEl) loadFragment(s.el.dataset.src, contentEl, () => { + if (s.el._syncMore) s.el._syncMore(); + }); + } requestAnimationFrame(() => { clampToArea(s.el); if (s.el._syncMore) s.el._syncMore(); @@ -272,5 +302,5 @@ const WM = (() => { document.addEventListener("DOMContentLoaded", init); - return { show, hide, toggle, focus }; + return { show, hide, toggle, focus, loadFragment }; })(); diff --git a/src/blog/posts/OTW_behemoth.md b/src/blog/posts/OTW_behemoth.md index 9205269..7ee4645 100644 --- a/src/blog/posts/OTW_behemoth.md +++ b/src/blog/posts/OTW_behemoth.md @@ -1,5 +1,4 @@ --- -permalink: false title: "Over The Wire - Behemoth retrospective" date: 2026-03-30 tags: diff --git a/src/blog/posts/posts.11tydata.js b/src/blog/posts/posts.11tydata.js new file mode 100644 index 0000000..fc7f7ef --- /dev/null +++ b/src/blog/posts/posts.11tydata.js @@ -0,0 +1,4 @@ +module.exports = { + layout: "fragment.njk", + permalink: data => `/fragments/blog/${data.page.fileSlug}/` +}; diff --git a/src/blog/posts/posts.11tydata.json b/src/blog/posts/posts.11tydata.json deleted file mode 100644 index 17dcfe1..0000000 --- a/src/blog/posts/posts.11tydata.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "layout": "post-plain.njk" -} diff --git a/src/about.md b/src/content/about.md similarity index 77% rename from src/about.md rename to src/content/about.md index fa7a7a9..98c427f 100644 --- a/src/about.md +++ b/src/content/about.md @@ -1,5 +1,7 @@ --- -permalink: false +layout: fragment.njk +permalink: /fragments/about/ +boringUrl: /boring/about/ --- ## $whoami @@ -15,4 +17,4 @@ Reach out if you want to chat about exploit dev, vulnerability research, or retr - Anything \*NIX. Practically, mostly Linux. Ask me about old UNIX or BSD. - Systems programming, reverse engineering, exploitation - Network services and architecture -- Rather familiar with Windows internals as well \ No newline at end of file +- Rather familiar with Windows internals as well diff --git a/src/contact.md b/src/content/contact.md similarity index 90% rename from src/contact.md rename to src/content/contact.md index 3c02153..639576d 100644 --- a/src/contact.md +++ b/src/content/contact.md @@ -1,5 +1,7 @@ --- -permalink: false +layout: fragment.njk +permalink: /fragments/contact/ +boringUrl: /boring/contact/ --- ## Jake "**lordtet**" Holtham diff --git a/src/fragments/blog.njk b/src/fragments/blog.njk new file mode 100644 index 0000000..360d989 --- /dev/null +++ b/src/fragments/blog.njk @@ -0,0 +1,33 @@ +--- +permalink: /fragments/blog/ +eleventyExcludeFromCollections: true +--- +{% set tagCounts = collections.posts | tagCounts %} +{% if tagCounts.length %} + +{% endif %} + +{% if collections.posts.length %} +No posts yet — check back soon.
+{% endif %} + + diff --git a/src/fragments/projects.njk b/src/fragments/projects.njk new file mode 100644 index 0000000..66ec1a0 --- /dev/null +++ b/src/fragments/projects.njk @@ -0,0 +1,32 @@ +--- +permalink: /fragments/projects/ +eleventyExcludeFromCollections: true +--- +{% set projectTagCounts = collections.projects | tagCounts %} +{% if projectTagCounts.length %} + +{% endif %} + +{% if collections.projects.length %} +No projects yet.
+{% endif %} + + diff --git a/src/index.njk b/src/index.njk index ea5c168..e8469e3 100644 --- a/src/index.njk +++ b/src/index.njk @@ -24,163 +24,40 @@ permalink: / -{# ════════════════════════════════════════════════ #} -{# ABOUT WINDOW #} -{# ════════════════════════════════════════════════ #} -{# ════════════════════════════════════════════════ #} -{# BLOG WINDOW #} -{# ════════════════════════════════════════════════ #} -{# ════════════════════════════════════════════════ #} -{# PROJECTS WINDOW #} -{# ════════════════════════════════════════════════ #} -{# ════════════════════════════════════════════════ #} -{# CONTACT WINDOW #} -{# ════════════════════════════════════════════════ #} + diff --git a/src/projects/projects.11tydata.js b/src/projects/projects.11tydata.js new file mode 100644 index 0000000..d955ac4 --- /dev/null +++ b/src/projects/projects.11tydata.js @@ -0,0 +1,4 @@ +module.exports = { + layout: "fragment.njk", + permalink: data => `/fragments/projects/${data.page.fileSlug}/` +}; diff --git a/src/projects/projects.11tydata.json b/src/projects/projects.11tydata.json deleted file mode 100644 index 5df2e98..0000000 --- a/src/projects/projects.11tydata.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "permalink": false -} diff --git a/src/projects/testproj.md b/src/projects/testproj.md index cc1997b..3bb1b24 100644 --- a/src/projects/testproj.md +++ b/src/projects/testproj.md @@ -1,5 +1,4 @@ --- -permalink: false title: "Test Project 1" tags: - x86 diff --git a/src/projects/testproj2.md b/src/projects/testproj2.md index 281046c..21ae859 100644 --- a/src/projects/testproj2.md +++ b/src/projects/testproj2.md @@ -1,5 +1,4 @@ --- -permalink: false title: "Test Project 2" tags: - arm