-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
294 lines (256 loc) · 7.47 KB
/
Copy pathindex.html
File metadata and controls
294 lines (256 loc) · 7.47 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Equity Research Portfolio</title>
<link href="https://fonts.googleapis.com/css2?family=Syne:wght@400;700;800&family=Source+Serif+4:ital,wght@0,300;0,400;1,300&display=swap" rel="stylesheet">
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
background: #f8f6f1;
color: #1a1a1a;
font-family: 'Source Serif 4', Georgia, serif;
font-weight: 300;
min-height: 100vh;
}
/* ── HEADER ── */
.header {
background: #1a1a1a;
color: #f8f6f1;
padding: 3rem 2rem 2.5rem;
}
.header-inner {
max-width: 760px;
margin: 0 auto;
}
h1 {
font-family: 'Syne', sans-serif;
font-weight: 800;
font-size: clamp(2rem, 6vw, 3.2rem);
letter-spacing: -0.03em;
line-height: 1.05;
margin-bottom: 0.5rem;
text-align: center;
}
.subtitle {
font-size: 0.92rem;
color: #888;
font-style: italic;
margin-bottom: 2rem;
text-align: center;
}
/* ── SEARCH ── */
.search-wrap {
position: relative;
}
.search-wrap svg {
position: absolute;
left: 1rem;
top: 50%;
transform: translateY(-50%);
color: #666;
pointer-events: none;
}
#search {
width: 100%;
padding: 0.75rem 1rem 0.75rem 2.8rem;
background: #2a2a2a;
border: 1px solid #333;
border-radius: 6px;
color: #f8f6f1;
font-family: 'Syne', sans-serif;
font-size: 0.88rem;
outline: none;
transition: border-color 0.2s;
}
#search::placeholder { color: #555; }
#search:focus { border-color: #666; }
/* ── MAIN ── */
.main {
max-width: 760px;
margin: 0 auto;
padding: 0 2rem 6rem;
}
.results-count {
font-family: 'Syne', sans-serif;
font-size: 0.7rem;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
color: #bbb;
padding: 1.6rem 0 0.8rem;
}
/* ── PAPER ENTRY ── */
.paper {
display: grid;
grid-template-columns: 130px 1fr;
gap: 1.4rem;
padding: 1.6rem 0;
border-bottom: 1px solid #e8e4dd;
align-items: center;
text-decoration: none;
color: inherit;
transition: background 0.15s;
border-radius: 4px;
margin: 0 -0.8rem;
padding-left: 0.8rem;
padding-right: 0.8rem;
}
.paper:hover { background: #f0ede6; }
.paper img {
width: 130px;
height: 85px;
object-fit: cover;
display: block;
border-radius: 4px;
background: #e0ddd7;
}
.paper-info { display: flex; flex-direction: column; gap: 0.35rem; }
.paper-ticker {
font-family: 'Syne', sans-serif;
font-size: 0.68rem;
font-weight: 700;
letter-spacing: 0.14em;
text-transform: uppercase;
color: #bbb;
}
.paper-ticker .price { color: #1a1a1a; margin-left: 0.5rem; }
.paper-ticker .chg { margin-left: 0.3rem; font-size: 0.65rem; }
.paper-ticker .chg.up { color: #3a7d44; }
.paper-ticker .chg.dn { color: #b94040; }
.paper-title {
font-family: 'Syne', sans-serif;
font-size: 1rem;
font-weight: 700;
line-height: 1.35;
letter-spacing: -0.01em;
color: #1a1a1a;
}
.paper-date {
font-size: 0.76rem;
color: #bbb;
}
/* ── NO RESULTS ── */
.empty {
padding: 3rem 0;
text-align: center;
color: #bbb;
font-style: italic;
font-size: 0.95rem;
display: none;
}
/* ── FOOTER ── */
footer {
max-width: 760px;
margin: 0 auto;
padding: 0 2rem 3rem;
font-size: 0.75rem;
color: #ccc;
font-style: italic;
}
</style>
</head>
<body>
<div class="header">
<div class="header-inner">
<h1>Equity Research<br>Portfolio</h1>
<p class="subtitle">Independent equity research by Jude Merritt — click any paper to read</p>
<div class="search-wrap">
<svg width="16" height="16" fill="none" stroke="currentColor" stroke-width="2" viewBox="0 0 24 24">
<circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/>
</svg>
<input id="search" type="text" placeholder="Search by title or ticker…" oninput="doSearch(this.value)">
</div>
</div>
</div>
<div class="main">
<div class="results-count" id="count"></div>
<div id="list"></div>
<div class="empty" id="empty">No papers found for that search.</div>
</div>
<footer>Prices via Yahoo Finance · Updated on page load</footer>
<script>
/* =====================================================
✏️ TO ADD A PAPER — copy one block and fill in:
ticker : stock symbol for live price (e.g. "AAPL")
title : your paper headline
url : link to full paper (Google Doc, PDF, etc.)
image : any image URL, or "" for a plain placeholder
date : date published (any string)
===================================================== */
const PAPERS = [
{
ticker: "ADBE",
title: "ADBE: A Comprehensive Review and Risk-Reward Analysis",
url: "https://canary-frost-8a2.notion.site/ADBE-32b7a6eee9ad807588afe959bce904b5",
image: "https://image2url.com/r2/default/images/1774181654128-a2fa426c-bcd8-4cec-9e41-8800de9bb8f3.webp",
date: "March 24, 2026"
},
];
/* ===================================================== */
const list = document.getElementById('list');
const countEl = document.getElementById('count');
const emptyEl = document.getElementById('empty');
/* Build DOM nodes once, store references */
const nodes = PAPERS.map(p => {
const a = document.createElement('a');
a.className = 'paper';
a.href = p.url;
a.target = '_blank';
a.rel = 'noopener';
a.dataset.search = (p.ticker + ' ' + p.title).toLowerCase();
const img = document.createElement('img');
img.alt = p.ticker;
if (p.image) img.src = p.image;
const info = document.createElement('div');
info.className = 'paper-info';
info.innerHTML = `
<div class="paper-ticker" id="price-${p.ticker}">${p.ticker}</div>
<div class="paper-title">${p.title}</div>
<div class="paper-date">${p.date}</div>
`;
a.appendChild(img);
a.appendChild(info);
list.appendChild(a);
return a;
});
function updateCount(n) {
countEl.textContent = n === PAPERS.length ? `${n} papers` : `${n} of ${PAPERS.length} papers`;
}
function doSearch(q) {
const term = q.trim().toLowerCase();
let visible = 0;
nodes.forEach(node => {
const match = !term || node.dataset.search.includes(term);
node.style.display = match ? '' : 'none';
if (match) visible++;
});
updateCount(visible);
emptyEl.style.display = visible === 0 ? 'block' : 'none';
}
updateCount(PAPERS.length);
/* Live prices via Yahoo Finance */
const FINNHUB_KEY = 'd6vub89r01qjh1odib3gd6vub89r01qjh1odib40'; // get free key at finnhub.io
async function fetchPrice(ticker) {
try {
const [quote, prev] = await Promise.all([
fetch(`https://finnhub.io/api/v1/quote?symbol=${ticker}&token=${FINNHUB_KEY}`).then(r => r.json()),
]);
const price = quote.c; // current price
const close = quote.pc; // previous close
const chg = ((price - close) / close * 100).toFixed(2);
const up = parseFloat(chg) >= 0;
const el = document.getElementById('price-' + ticker);
if (el) {
el.innerHTML = `${ticker} <span class="price">$${price.toFixed(2)}</span><span class="chg ${up ? 'up' : 'dn'}">${up ? '▲' : '▼'} ${Math.abs(chg)}%</span>`;
}
} catch(e) {
console.warn(`fetchPrice failed for ${ticker}:`, e.message);
}
}
PAPERS.forEach(p => fetchPrice(p.ticker));
PAPERS.forEach(p => fetchPrice(p.ticker));
</script>
</body>
</html>