refactor: remove blog and markdown test pages, update navigation links

- Deleted blog.html and associated blog post files (markdown-test, testddd, node-graphs, welcome).
- Updated index.html to use dynamic navigation links from navLinks.js.
- Enhanced MarkdownRenderer to include new heading pin elements.
- Implemented SVG bezier splines for blog post navigation.
- Adjusted CSS styles for blog layout and new elements.
This commit is contained in:
2026-05-10 23:29:02 +10:00
parent fabbb0539a
commit ba36cdd05b
13 changed files with 446 additions and 340 deletions

32
tools/navLinks.js Normal file
View File

@@ -0,0 +1,32 @@
'use strict';
/**
* @typedef {Object} NavLink
* @property {string} label
* @property {string} href
* @property {boolean} [external]
*/
/** @type {NavLink[]} */
const NAV_LINKS = [
{ label: 'blog', href: '/blog.html' },
{ label: 'docs', href: '/docs/' },
{ label: 'github', href: 'https://github.com/litruv', external: true },
{ label: 'bluesky', href: 'https://bsky.app/profile/lit.mates.dev', external: true },
{ label: 'materials', href: '/materials' },
];
/**
* Renders nav link `<a>` elements as an HTML string.
*
* @param {string} [indent=' '] - Leading whitespace for each line.
* @returns {string}
*/
function renderNavLinkItems(indent = ' ') {
return NAV_LINKS.map(({ label, href, external }) => {
const attrs = external ? ' target="_blank" rel="noopener"' : '';
return `${indent}<a href="${href}"${attrs} class="quick-link">${label}</a>`;
}).join('\n');
}
module.exports = { NAV_LINKS, renderNavLinkItems };