From 737593de2dc5944185df86a82b55893d7996750e Mon Sep 17 00:00:00 2001 From: TheFlow Date: Mon, 9 Feb 2026 16:16:53 +1300 Subject: [PATCH] feat: Add research papers modal to homepage hero button Replace direct link to architectural-alignment.html with a modal showing all research papers grouped by recency, with a footer link to /docs.html for broader documentation discovery. Co-Authored-By: Claude Opus 4.6 --- public/index.html | 9 +- public/js/components/research-papers-modal.js | 171 ++++++++++++++++++ 2 files changed, 177 insertions(+), 3 deletions(-) create mode 100644 public/js/components/research-papers-modal.js diff --git a/public/index.html b/public/index.html index 8643a3e1..f81da279 100644 --- a/public/index.html +++ b/public/index.html @@ -73,11 +73,11 @@ Some decisions require human judgment — architecturally enforced, not left to AI discretion, however well trained.

- Read the Research - + @@ -554,5 +554,8 @@ + + + diff --git a/public/js/components/research-papers-modal.js b/public/js/components/research-papers-modal.js new file mode 100644 index 00000000..af9df73c --- /dev/null +++ b/public/js/components/research-papers-modal.js @@ -0,0 +1,171 @@ +/** + * Research Papers Modal Component + * Displays curated research papers grouped by recency when triggered + * from the homepage hero "Read the Research" button. + */ + +class ResearchPapersModal { + constructor() { + this.isOpen = false; + this.papers = [ + { + group: 'Recent Papers', + items: [ + { + code: 'STO-RES-0010', + title: 'Taonga-Centred Steering Governance', + subtitle: 'Polycentric Authority for Sovereign Small Language Models', + description: 'Proposes polycentric governance replacing platform hierarchy with co-equal steering authorities, drawing on te ao M\u0101ori concepts.', + date: 'February 2026', + status: 'Draft', + href: '/docs-viewer.html?doc=taonga-centred-steering-governance-polycentric-ai' + }, + { + code: 'STO-RES-0009', + title: 'Steering Vectors and Mechanical Bias', + subtitle: 'Inference-Time Debiasing for Sovereign Small Language Models', + description: 'Investigates whether LLM biases operate at a sub-reasoning level and how sovereign SLM deployments enable inference-time debiasing.', + date: 'February 2026', + status: 'v1.1', + href: '/docs-viewer.html?doc=steering-vectors-mechanical-bias-sovereign-ai' + } + ] + }, + { + group: 'Foundational Papers', + items: [ + { + code: 'STO-INN-0003', + title: 'Architectural Alignment', + subtitle: 'Interrupting Neural Reasoning Through Constitutional Inference Gating', + description: 'The core Tractatus paper presenting architectural alignment as a formal specification for interrupted neural reasoning. Available in three editions.', + date: 'January 2026', + status: 'v2.1 \u2014 3 editions', + href: '/architectural-alignment.html' + } + ] + } + ]; + this.init(); + } + + init() { + this.renderModal(); + this.attachEventListeners(); + } + + renderModal() { + const papersHTML = this.papers.map(group => ` + + `).join(''); + + const modalHTML = ` + + `; + + document.body.insertAdjacentHTML('beforeend', modalHTML); + } + + attachEventListeners() { + const backdrop = document.getElementById('research-papers-backdrop'); + const closeBtn = document.getElementById('research-papers-close'); + + backdrop.addEventListener('click', () => this.close()); + closeBtn.addEventListener('click', () => this.close()); + + document.addEventListener('keydown', (e) => { + if (e.key === 'Escape' && this.isOpen) { + this.close(); + } + }); + + document.addEventListener('click', (e) => { + if (e.target.closest('[data-research-papers-trigger]')) { + e.preventDefault(); + this.open(); + } + }); + } + + open() { + const modal = document.getElementById('research-papers-modal'); + modal.classList.remove('hidden'); + this.isOpen = true; + document.body.classList.add('overflow-hidden'); + } + + close() { + const modal = document.getElementById('research-papers-modal'); + modal.classList.add('hidden'); + this.isOpen = false; + document.body.classList.remove('overflow-hidden'); + } +} + +// Auto-initialize when DOM is ready +if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', () => { + window.researchPapersModal = new ResearchPapersModal(); + }); +} else { + window.researchPapersModal = new ResearchPapersModal(); +}