- Fixed ToC modal appearing at bottom of document instead of overlay - Added explicit position: fixed !important with full viewport coverage - Added proper z-index and backdrop styling - Implemented scrollable modal content with custom scrollbar - Fixed duplicate h1 document title headers - Remove first h1 from content_html (already shown in header) - Apply fix in both card view and traditional view - Also handles h2 fallback for section modals - Removed all diagnostic console.log statements (56+ removed) - Cleaned docs-app.js (50+ log statements) - Cleaned document-cards.js (15+ log statements) - Kept only legitimate error logging - Fixed CSP violation in docs-app.js - Removed inline onclick handler from PDF download link - Implemented event delegation to handle stopPropagation - Now fully CSP-compliant (no inline scripts/styles/handlers) - Added category-based document navigation with collapsible sections - Documents grouped into: Start Here, Core Framework, Research, Implementation, Leadership, Developer Tools - Visual category indicators with icons and colors - Updated cache-busting versions for production deployment 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
448 lines
11 KiB
HTML
448 lines
11 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Framework Documentation | Tractatus AI Safety</title>
|
|
<link rel="stylesheet" href="/css/tailwind.css?v=1759962381">
|
|
<style>
|
|
html { scroll-behavior: smooth; }
|
|
|
|
/* Accessibility: Skip link */
|
|
.skip-link { position: absolute; left: -9999px; top: 0; }
|
|
.skip-link:focus { left: 0; z-index: 100; background: white; padding: 1rem; border: 2px solid #3b82f6; }
|
|
|
|
/* Accessibility: Focus indicators (WCAG 2.4.7) */
|
|
a:focus, button:focus, input:focus, select:focus, textarea:focus {
|
|
outline: 3px solid #3b82f6;
|
|
outline-offset: 2px;
|
|
}
|
|
a:focus:not(:focus-visible) { outline: none; }
|
|
a:focus-visible { outline: 3px solid #3b82f6; outline-offset: 2px; }
|
|
|
|
/* Card-based layout */
|
|
.doc-header {
|
|
text-align: center;
|
|
padding: 2rem 0;
|
|
}
|
|
|
|
.card-grid-container {
|
|
width: 100%;
|
|
overflow: visible;
|
|
min-height: auto;
|
|
}
|
|
|
|
.category-section {
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.card-grid {
|
|
display: grid;
|
|
gap: 1rem;
|
|
width: 100%;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.card-grid {
|
|
grid-template-columns: repeat(2, 1fr);
|
|
}
|
|
}
|
|
|
|
@media (min-width: 1024px) {
|
|
.card-grid {
|
|
grid-template-columns: repeat(3, 1fr);
|
|
}
|
|
}
|
|
|
|
.doc-card {
|
|
min-height: 180px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
transition: all 0.2s ease;
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.doc-card:hover {
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
|
}
|
|
|
|
.doc-card:active {
|
|
transform: translateY(0);
|
|
}
|
|
|
|
.line-clamp-3 {
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 3;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* Prose styles for modal content */
|
|
.prose {
|
|
max-width: none;
|
|
line-height: 1.75;
|
|
color: #374151;
|
|
}
|
|
|
|
.prose h1 {
|
|
font-size: 1.875rem;
|
|
font-weight: 700;
|
|
color: #111827;
|
|
margin-bottom: 1.5rem;
|
|
margin-top: 2rem;
|
|
line-height: 1.2;
|
|
border-bottom: 2px solid #e5e7eb;
|
|
padding-bottom: 0.5rem;
|
|
}
|
|
|
|
.prose h2 {
|
|
font-size: 1.5rem;
|
|
font-weight: 600;
|
|
color: #111827;
|
|
margin-bottom: 1rem;
|
|
margin-top: 2rem;
|
|
line-height: 1.3;
|
|
border-bottom: 1px solid #e5e7eb;
|
|
padding-bottom: 0.375rem;
|
|
}
|
|
|
|
.prose h3 {
|
|
font-size: 1.25rem;
|
|
font-weight: 600;
|
|
color: #1f2937;
|
|
margin-bottom: 0.75rem;
|
|
margin-top: 1.5rem;
|
|
line-height: 1.4;
|
|
}
|
|
|
|
.prose h4 {
|
|
font-size: 1.125rem;
|
|
font-weight: 600;
|
|
color: #374151;
|
|
margin-bottom: 0.5rem;
|
|
margin-top: 1.25rem;
|
|
line-height: 1.5;
|
|
}
|
|
|
|
.prose p {
|
|
color: #4b5563;
|
|
margin-bottom: 1.25rem;
|
|
line-height: 1.8;
|
|
font-size: 1rem;
|
|
}
|
|
|
|
.prose li {
|
|
margin-bottom: 0.5rem;
|
|
line-height: 1.75;
|
|
color: #4b5563;
|
|
}
|
|
|
|
.prose code {
|
|
background-color: #f3f4f6;
|
|
padding: 0.125rem 0.375rem;
|
|
border-radius: 0.25rem;
|
|
font-size: 0.875rem;
|
|
font-family: ui-monospace, 'Courier New', monospace;
|
|
color: #1f2937;
|
|
border: 1px solid #e5e7eb;
|
|
}
|
|
|
|
.prose pre {
|
|
background-color: #1f2937;
|
|
color: #f3f4f6;
|
|
padding: 1.25rem;
|
|
border-radius: 0.5rem;
|
|
margin-bottom: 1.5rem;
|
|
overflow-x: auto;
|
|
border: 1px solid #374151;
|
|
}
|
|
|
|
.prose pre code {
|
|
background-color: transparent;
|
|
padding: 0;
|
|
border: none;
|
|
color: inherit;
|
|
font-size: 0.875rem;
|
|
}
|
|
|
|
.prose ul {
|
|
list-style-type: disc;
|
|
padding-left: 1.75rem;
|
|
margin-bottom: 1.25rem;
|
|
color: #4b5563;
|
|
}
|
|
|
|
.prose ol {
|
|
list-style-type: decimal;
|
|
padding-left: 1.75rem;
|
|
margin-bottom: 1.25rem;
|
|
color: #4b5563;
|
|
}
|
|
|
|
.prose > h2:first-child {
|
|
margin-top: 0;
|
|
}
|
|
|
|
/* Download links in sidebar */
|
|
.doc-download-link {
|
|
position: absolute;
|
|
right: 0.5rem;
|
|
top: 50%;
|
|
transform: translateY(-50%);
|
|
padding: 0.5rem;
|
|
color: #3b82f6;
|
|
background-color: transparent;
|
|
border-radius: 0.25rem;
|
|
transition: all 0.15s ease-in-out;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
text-decoration: none;
|
|
z-index: 10;
|
|
}
|
|
|
|
.doc-download-link:hover {
|
|
color: #1d4ed8;
|
|
background-color: #dbeafe;
|
|
}
|
|
|
|
.doc-download-link svg {
|
|
width: 1.25rem;
|
|
height: 1.25rem;
|
|
display: block;
|
|
}
|
|
|
|
/* Document list container */
|
|
#document-list .relative,
|
|
#document-list > div {
|
|
position: relative !important;
|
|
}
|
|
|
|
.doc-link {
|
|
padding-right: 3rem !important;
|
|
display: block;
|
|
width: 100%;
|
|
}
|
|
|
|
/* Modal styles */
|
|
#section-modal {
|
|
position: fixed;
|
|
inset: 0;
|
|
background-color: rgba(0, 0, 0, 0.5);
|
|
z-index: 9999;
|
|
display: none;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 1rem;
|
|
}
|
|
|
|
#section-modal.show {
|
|
display: flex !important;
|
|
animation: fadeIn 0.2s ease-out;
|
|
}
|
|
|
|
#section-modal > div {
|
|
display: flex;
|
|
flex-direction: column;
|
|
max-height: 90vh;
|
|
width: 100%;
|
|
max-width: 56rem;
|
|
background-color: white;
|
|
border-radius: 0.5rem;
|
|
box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
|
|
animation: slideUp 0.3s ease-out;
|
|
}
|
|
|
|
#modal-content {
|
|
flex: 1 1 0%;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
padding: 1.5rem;
|
|
min-height: 0;
|
|
}
|
|
|
|
@keyframes fadeIn {
|
|
from {
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
@keyframes slideUp {
|
|
from {
|
|
transform: translateY(20px);
|
|
opacity: 0;
|
|
}
|
|
to {
|
|
transform: translateY(0);
|
|
opacity: 1;
|
|
}
|
|
}
|
|
|
|
/* ToC Modal */
|
|
#toc-modal {
|
|
display: none;
|
|
}
|
|
|
|
#toc-modal.show {
|
|
display: flex !important;
|
|
position: fixed !important;
|
|
top: 0 !important;
|
|
left: 0 !important;
|
|
right: 0 !important;
|
|
bottom: 0 !important;
|
|
animation: fadeIn 0.2s ease-out forwards;
|
|
background: rgba(0, 0, 0, 0.5) !important;
|
|
}
|
|
|
|
#toc-modal.show > div {
|
|
animation: slideUp 0.3s ease-out forwards;
|
|
opacity: 1 !important;
|
|
}
|
|
|
|
/* ToC modal content scrolling */
|
|
#toc-modal-content {
|
|
max-height: 60vh;
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
/* Custom scrollbar for ToC modal */
|
|
#toc-modal-content::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
#toc-modal-content::-webkit-scrollbar-track {
|
|
background: #f1f1f1;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
#toc-modal-content::-webkit-scrollbar-thumb {
|
|
background: #cbd5e1;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
#toc-modal-content::-webkit-scrollbar-thumb:hover {
|
|
background: #94a3b8;
|
|
}
|
|
|
|
/* Category collapsible sections */
|
|
.category-arrow {
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
/* Category icon sizing */
|
|
.category-icon {
|
|
font-size: 1.5rem;
|
|
line-height: 1;
|
|
}
|
|
|
|
/* Sidebar scrolling */
|
|
aside .bg-white {
|
|
max-height: calc(100vh - 120px);
|
|
overflow-y: auto;
|
|
overflow-x: hidden;
|
|
}
|
|
|
|
/* Custom scrollbar styling */
|
|
aside .bg-white::-webkit-scrollbar {
|
|
width: 8px;
|
|
}
|
|
|
|
aside .bg-white::-webkit-scrollbar-track {
|
|
background: #f1f1f1;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
aside .bg-white::-webkit-scrollbar-thumb {
|
|
background: #cbd5e1;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
aside .bg-white::-webkit-scrollbar-thumb:hover {
|
|
background: #94a3b8;
|
|
}
|
|
|
|
/* ToC modal indent levels (CSP compliant) */
|
|
.toc-indent-1 { padding-left: 12px; }
|
|
.toc-indent-2 { padding-left: 28px; }
|
|
.toc-indent-3 { padding-left: 44px; }
|
|
</style>
|
|
</head>
|
|
<body class="bg-gray-50">
|
|
|
|
<!-- Skip Link for Keyboard Navigation -->
|
|
<a href="#main-content" class="skip-link">Skip to main content</a>
|
|
|
|
<!-- Navigation (injected by navbar.js) -->
|
|
<script src="/js/components/navbar.js?v=1759875690"></script>
|
|
|
|
<!-- Page Header -->
|
|
<div class="bg-white border-b border-gray-200">
|
|
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
<h1 class="text-3xl font-bold text-gray-900">Framework Documentation</h1>
|
|
<p class="text-gray-600 mt-2">Technical specifications, guides, and reference materials</p>
|
|
</div>
|
|
</div>
|
|
|
|
<!-- Main Layout -->
|
|
<main id="main-content" class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
|
<div class="grid grid-cols-1 lg:grid-cols-4 gap-8">
|
|
|
|
<!-- Sidebar -->
|
|
<aside class="lg:col-span-1">
|
|
<div class="bg-white rounded-lg shadow-sm border border-gray-200 p-4 sticky top-24">
|
|
<h3 class="font-semibold text-gray-900 mb-3">Documents</h3>
|
|
<div id="document-list" class="space-y-1">
|
|
<div class="text-sm text-gray-500">Loading...</div>
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
|
|
<!-- Main Content -->
|
|
<main class="lg:col-span-3">
|
|
<div id="document-content" class="bg-white rounded-lg shadow-sm border border-gray-200 p-8">
|
|
<div class="text-center py-12">
|
|
<svg class="mx-auto h-12 w-12 text-gray-400" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
|
|
</svg>
|
|
<h3 class="mt-2 text-lg font-medium text-gray-900">Select a Document</h3>
|
|
<p class="mt-1 text-sm text-gray-500">Choose a document from the sidebar to begin reading</p>
|
|
</div>
|
|
</div>
|
|
</main>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<!-- ToC Modal -->
|
|
<div id="toc-modal" class="fixed inset-0 bg-black bg-opacity-50 z-50 items-center justify-center p-4">
|
|
<div class="bg-white rounded-lg shadow-2xl max-w-2xl w-full max-h-[80vh] flex flex-col">
|
|
<!-- Modal Header -->
|
|
<div class="flex items-center justify-between p-6 border-b border-gray-200">
|
|
<h2 class="text-2xl font-bold text-gray-900">Table of Contents</h2>
|
|
<button id="toc-close-button"
|
|
class="p-2 text-gray-400 hover:text-gray-600 hover:bg-gray-100 rounded transition"
|
|
aria-label="Close table of contents">
|
|
<svg class="w-6 h-6" fill="none" stroke="currentColor" viewBox="0 0 24 24">
|
|
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M6 18L18 6M6 6l12 12"/>
|
|
</svg>
|
|
</button>
|
|
</div>
|
|
|
|
<!-- Modal Content -->
|
|
<div id="toc-modal-content" class="flex-1 overflow-y-auto p-6">
|
|
<div class="text-gray-500">Loading table of contents...</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<script src="/js/components/document-cards.js?v=1759963000"></script>
|
|
<script src="/js/docs-app.js?v=1759963100"></script>
|
|
|
|
</body>
|
|
</html>
|