diff --git a/src/assets/js/blog.js b/src/assets/js/blog.js index 2c243bf..40c0d59 100644 --- a/src/assets/js/blog.js +++ b/src/assets/js/blog.js @@ -5,7 +5,7 @@ var tagBtns = document.querySelectorAll('.blog-tag'); var items = document.querySelectorAll('.post-list-item'); - // ── Tag filtering ────────────────────────────── + // Tag filtering tagBtns.forEach(function (btn) { btn.addEventListener('click', function () { tagBtns.forEach(function (b) { b.classList.remove('active'); }); @@ -18,28 +18,35 @@ }); }); - // ── Open a post ──────────────────────────────── + // Open a post document.querySelectorAll('.blog-open-post').forEach(function (link) { link.addEventListener('click', function (e) { e.preventDefault(); listing.classList.add('hidden'); panels.forEach(function (p) { p.classList.add('hidden'); }); var panel = document.getElementById('blog-post-' + link.dataset.postIdx); - if (panel) { panel.classList.remove('hidden'); content.scrollTop = 0; } + if (panel) { + panel.classList.remove('hidden'); + content.scrollTop = 0; + var win = content.closest('.window'); + if (win && win._syncMore) win._syncMore(); + } }); }); - // ── Back to listing ──────────────────────────── + // Back to listing document.querySelectorAll('.blog-back').forEach(function (btn) { btn.addEventListener('click', function () { panels.forEach(function (p) { p.classList.add('hidden'); }); listing.classList.remove('hidden'); content.scrollTop = 0; + var win = content.closest('.window'); + if (win && win._syncMore) win._syncMore(); }); }); }()); -// ── Projects panel ───────────────────────────── +// Projects panel (function () { var listing = document.getElementById('projects-listing'); var content = document.getElementById('projects-window-content'); @@ -49,7 +56,7 @@ if (!listing) return; - // ── Tag filtering ──────────────────────────── + // Tag filtering tagBtns.forEach(function (btn) { btn.addEventListener('click', function () { tagBtns.forEach(function (b) { b.classList.remove('active'); }); @@ -62,23 +69,30 @@ }); }); - // ── Open a project ─────────────────────────── + // Open a project document.querySelectorAll('.project-open-item').forEach(function (link) { link.addEventListener('click', function (e) { e.preventDefault(); listing.classList.add('hidden'); panels.forEach(function (p) { p.classList.add('hidden'); }); var panel = document.getElementById('project-item-' + link.dataset.projectIdx); - if (panel) { panel.classList.remove('hidden'); content.scrollTop = 0; } - }); + if (panel) { + panel.classList.remove('hidden'); + content.scrollTop = 0; + var win = content.closest('.window'); + if (win && win._syncMore) win._syncMore(); + } + }) }); - // ── Back to listing ────────────────────────── + // Back to listing document.querySelectorAll('.project-back').forEach(function (btn) { btn.addEventListener('click', function () { panels.forEach(function (p) { p.classList.add('hidden'); }); listing.classList.remove('hidden'); content.scrollTop = 0; + var win = content.closest('.window'); + if (win && win._syncMore) win._syncMore(); }); }); }()); diff --git a/src/assets/js/wm.js b/src/assets/js/wm.js index 29ca7c3..9987a0f 100644 --- a/src/assets/js/wm.js +++ b/src/assets/js/wm.js @@ -1,6 +1,6 @@ -/* ═══════════════════════════════════════════ +/* Phosphor Terminal — Window Manager (wm.js) - ═══════════════════════════════════════════ */ + */ const WM = (() => { "use strict"; @@ -10,7 +10,7 @@ const WM = (() => { let drag = null; let resize = null; - /* ── Init ──────────────────────────────── */ + /* Init */ function init() { document.querySelectorAll(".window").forEach(register); @@ -22,7 +22,7 @@ const WM = (() => { if (visible.length) focusEl(visible[visible.length - 1].el); } - /* ── Build and inject window chrome ────── */ + /* Build and inject window chrome */ function buildChrome(win) { const title = win.dataset.title || win.dataset.wid || ""; @@ -32,7 +32,7 @@ const WM = (() => { const maxBtn = document.createElement("button"); maxBtn.className = "win-btn maximize"; maxBtn.title = "Full screen"; - maxBtn.textContent = "⤢"; + maxBtn.textContent = "\u2922"; const titleSpan = document.createElement("span"); titleSpan.className = "window-title"; titleSpan.textContent = title; @@ -45,19 +45,19 @@ const WM = (() => { const closeBtn = document.createElement("button"); closeBtn.className = "win-btn close"; closeBtn.title = "Close"; - closeBtn.textContent = "×"; + closeBtn.textContent = "\u00D7"; const spacer = document.createElement("div"); spacer.className = "win-footer-spacer"; const resizeHandle = document.createElement("div"); resizeHandle.className = "win-resize"; resizeHandle.title = "Drag to resize"; - resizeHandle.textContent = "◢"; + resizeHandle.textContent = "\u25E2"; footer.appendChild(closeBtn); footer.appendChild(spacer); footer.appendChild(resizeHandle); win.appendChild(footer); - // ── More / scroll indicator ────────────── + // More / scroll indicator const moreBar = document.createElement("div"); moreBar.className = "scroll-more hidden"; moreBar.textContent = "-- more --"; @@ -79,7 +79,7 @@ const WM = (() => { } } - /* ── Register a window element ─────────── */ + /* Register a window element */ function register(win) { const id = win.dataset.wid; @@ -117,7 +117,7 @@ const WM = (() => { }); } - /* ── Focus ─────────────────────────────── */ + /* Focus */ function focusEl(win) { document.querySelectorAll(".window.focused") @@ -131,9 +131,9 @@ const WM = (() => { if (s && !s.hidden) focusEl(s.el); } - /* ── Show / Hide ───────────────────────── */ + /* Show / Hide */ - /* ── Clamp window to desktop-area bounds ── */ + /* Clamp window to desktop-area bounds */ function clampToArea(el) { const area = document.querySelector(".desktop-area"); @@ -178,7 +178,7 @@ const WM = (() => { } } - /* ── Maximize / Restore ────────────────── */ + /* Maximize / Restore */ function toggleMax(id) { const s = state.get(id); @@ -210,7 +210,7 @@ const WM = (() => { focusEl(el); } - /* ── Drag ──────────────────────────────── */ + /* Drag */ function startDrag(e, win) { e.preventDefault(); @@ -229,7 +229,7 @@ const WM = (() => { document.body.style.cursor = "move"; } - /* ── Mouse events ──────────────────────── */ + /* Mouse events */ function onMove(e) { if (drag) { @@ -252,7 +252,7 @@ const WM = (() => { document.body.style.cursor = ""; } - /* ── Desktop icons ─────────────────────── */ + /* Desktop icons */ function setupIcons() { document.querySelectorAll(".desktop-icon[data-opens]").forEach(icon => { @@ -265,7 +265,7 @@ const WM = (() => { }); } - /* ── Boot: hide icons for hidden windows ─ */ + /* Boot: hide icons for hidden windows */ document.addEventListener("DOMContentLoaded", init); diff --git a/src/contact.md b/src/contact.md index e310c5d..3c02153 100644 --- a/src/contact.md +++ b/src/contact.md @@ -22,5 +22,5 @@ Matrix: lordtet@lordnet.sh ### PGP

Fingerprint:

-
//to do!
+
7F07 6085 BE8F B9A0 666D  CC33 2E05 6DFB 2523 EEF2

Key available on keys.openpgp.org or on request.