This repository has no description
1export const LANDING_PAGE = `<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="utf-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1">
6 <title>Papers — Research Paper Summaries</title>
7 <style>
8 :root {
9 --bg: #0f0f0f;
10 --surface: #1a1a1a;
11 --text: #e0e0e0;
12 --dim: #888;
13 --accent: #6d9eeb;
14 --border: #333;
15 --green: #4caf50;
16 --mauve: #ce93d8;
17 }
18 * { box-sizing: border-box; margin: 0; padding: 0; }
19 body {
20 font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
21 background: var(--bg);
22 color: var(--text);
23 line-height: 1.6;
24 padding: 2rem;
25 max-width: 960px;
26 margin: 0 auto;
27 }
28 header { margin-bottom: 2rem; }
29 header h1 { font-size: 1.75rem; font-weight: 700; }
30 header p { color: var(--dim); margin-top: 0.25rem; }
31
32 .paper-list { display: flex; flex-direction: column; gap: 0.75rem; }
33 .paper-card {
34 background: var(--surface);
35 border: 1px solid var(--border);
36 border-radius: 8px;
37 padding: 1rem 1.25rem;
38 cursor: pointer;
39 transition: border-color 0.15s;
40 text-decoration: none;
41 color: inherit;
42 display: block;
43 }
44 .paper-card:hover { border-color: var(--accent); }
45 .paper-card .title { font-weight: 600; margin-bottom: 0.25rem; }
46 .paper-card .meta { font-size: 0.8125rem; color: var(--dim); }
47 .paper-card .summary { font-size: 0.875rem; margin-top: 0.5rem; color: var(--text); }
48 .paper-card .domains { margin-top: 0.5rem; display: flex; gap: 0.375rem; flex-wrap: wrap; }
49 .paper-card .domain {
50 font-size: 0.6875rem;
51 padding: 0.125rem 0.375rem;
52 border-radius: 4px;
53 background: var(--border);
54 color: var(--dim);
55 }
56 .paper-card .venue-badge {
57 font-size: 0.6875rem;
58 padding: 0.125rem 0.375rem;
59 border-radius: 4px;
60 background: var(--mauve);
61 color: var(--bg);
62 font-weight: 600;
63 }
64 .empty { color: var(--dim); text-align: center; padding: 3rem; }
65 </style>
66</head>
67<body>
68 <header>
69 <h1>Papers</h1>
70 <p>Research paper summaries from the Paper Skygest feed</p>
71 </header>
72 <div id="papers" class="paper-list"></div>
73 <script>
74 const summaries = window.__SUMMARIES__ || [];
75 const container = document.getElementById('papers');
76
77 function render(summaries) {
78 if (summaries.length === 0) {
79 container.innerHTML = '<div class="empty">No papers indexed yet.</div>';
80 return;
81 }
82 container.innerHTML = summaries.map(s => {
83 const domains = (s.domains || []).map(d => '<span class="domain">' + d + '</span>').join('');
84 const venue = s.venue ? '<span class="venue-badge">' + s.venue + '</span> ' : '';
85 const year = s.year ? ' (' + s.year + ')' : '';
86 const authors = (s.authors || []).length > 0
87 ? s.authors.length <= 3 ? s.authors.join(', ') : s.authors[0] + ' et al.'
88 : '';
89 return '<a class="paper-card" href="/paper/' + s.rkey + '">'
90 + '<div class="title">' + venue + escHtml(s.title) + year + '</div>'
91 + '<div class="meta">' + (s.year ? s.year + ' · ' : '') + (authors ? escHtml(authors) + ' · ' : '') + escHtml(s.posterHandle) + '</div>'
92 + '<div class="summary">' + escHtml(s.summary).substring(0, 200) + '</div>'
93 + (domains ? '<div class="domains">' + domains + '</div>' : '')
94 + '</a>';
95 }).join('');
96 }
97
98 function escHtml(s) {
99 return (s || '').replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>');
100 }
101
102 render(summaries);
103 </script>
104</body>
105</html>`;