- Create Economist SubmissionTracking package correctly: * mainArticle = full blog post content * coverLetter = 216-word SIR— letter * Links to blog post via blogPostId - Archive 'Letter to The Economist' from blog posts (it's the cover letter) - Fix date display on article cards (use published_at) - Target publication already displaying via blue badge Database changes: - Make blogPostId optional in SubmissionTracking model - Economist package ID: 68fa85ae49d4900e7f2ecd83 - Le Monde package ID: 68fa2abd2e6acd5691932150 Next: Enhanced modal with tabs, validation, export 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
35 lines
966 B
JavaScript
35 lines
966 B
JavaScript
// Initialize document viewer
|
|
const viewer = new DocumentViewer('document-viewer');
|
|
|
|
// Load navigation
|
|
async function loadNavigation() {
|
|
try {
|
|
const response = await API.Documents.list({ limit: 50 });
|
|
const nav = document.getElementById('doc-navigation');
|
|
|
|
if (response.success && response.documents) {
|
|
nav.innerHTML = response.documents.map(doc => `
|
|
<a href="/docs/${doc.slug}"
|
|
data-route="/docs/${doc.slug}"
|
|
class="block px-3 py-2 text-sm text-gray-700 hover:bg-gray-100 rounded-md">
|
|
${doc.title}
|
|
</a>
|
|
`).join('');
|
|
}
|
|
} catch (error) {
|
|
console.error('Failed to load navigation:', error);
|
|
}
|
|
}
|
|
|
|
// Setup routing
|
|
router
|
|
.on('/docs-viewer.html', async () => {
|
|
// Show default document
|
|
await viewer.render('introduction-to-the-tractatus-framework');
|
|
})
|
|
.on('/docs/:slug', async (params) => {
|
|
await viewer.render(params.slug);
|
|
});
|
|
|
|
// Initialize
|
|
loadNavigation();
|