-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathblog_list.html
More file actions
751 lines (726 loc) · 28.3 KB
/
Copy pathblog_list.html
File metadata and controls
751 lines (726 loc) · 28.3 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
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>PyHealth Blog</title>
<meta name="description" content="Posts from the PyHealth team — tutorials, research notes, and updates on open-source clinical AI.">
<link rel="canonical" href="https://pyhealth.dev/blog_list.html">
<!-- Open Graph -->
<meta property="og:type" content="website">
<meta property="og:site_name" content="PyHealth">
<meta property="og:url" content="https://pyhealth.dev/blog_list.html">
<meta property="og:title" content="PyHealth Blog">
<meta property="og:description" content="Posts from the PyHealth team — tutorials, research notes, and updates on open-source clinical AI.">
<meta property="og:image" content="https://pyhealth.dev/images/pyhealth-logo.png">
<!-- Twitter Card -->
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="PyHealth Blog">
<meta name="twitter:description" content="Posts from the PyHealth team — tutorials, research notes, and updates on open-source clinical AI.">
<meta name="twitter:image" content="https://pyhealth.dev/images/pyhealth-logo.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600&family=Source+Serif+4:opsz,wght@8..60,500;8..60,600&display=swap" rel="stylesheet">
<link rel="stylesheet" href="assets/css/styles.css">
<style>
/* ── Hero ── */
.ph-hero {
background: linear-gradient(140deg, #1c2b3a 0%, #28425e 60%, #1e3348 100%);
border-radius: 16px;
padding: 3rem 2.4rem 2.8rem;
color: white;
position: relative;
overflow: hidden;
border: 1px solid rgba(255,255,255,0.07);
box-shadow: 0 20px 48px rgba(22,33,31,0.18);
animation: rise 420ms ease;
}
.ph-hero::before {
content: "";
position: absolute;
top: -80px; right: -80px;
width: 340px; height: 340px;
border-radius: 50%;
background: radial-gradient(circle, rgba(201,95,38,0.22) 0%, transparent 70%);
pointer-events: none;
}
.ph-hero::after {
content: "";
position: absolute;
bottom: -100px; left: -60px;
width: 280px; height: 280px;
border-radius: 50%;
background: radial-gradient(circle, rgba(90,160,230,0.1) 0%, transparent 70%);
pointer-events: none;
}
.ph-eyebrow {
font-size: 0.8rem;
font-weight: 600;
letter-spacing: 0.1em;
text-transform: uppercase;
color: rgba(201,95,38,0.9);
margin: 0 0 0.6rem;
}
.ph-hero h1 {
color: white;
font-size: clamp(2rem, 4.5vw, 3.2rem);
margin: 0 0 0.5rem;
letter-spacing: -0.01em;
}
.ph-tagline {
color: rgba(255,255,255,0.72);
font-size: 1.05rem;
line-height: 1.55;
max-width: 620px;
margin: 0 0 1.8rem;
}
.ph-cta-row {
display: flex;
gap: 0.7rem;
flex-wrap: wrap;
position: relative;
z-index: 1;
}
.ph-btn {
display: inline-flex;
align-items: center;
gap: 0.5rem;
text-decoration: none;
border-radius: 10px;
padding: 0.64rem 1.15rem;
font-size: 0.95rem;
font-weight: 500;
font-family: "IBM Plex Sans", sans-serif;
transition: filter 0.15s, transform 0.1s;
}
.ph-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.ph-btn.primary {
background: var(--accent);
color: white;
border: 1px solid rgba(255,255,255,0.1);
box-shadow: 0 4px 12px rgba(201,95,38,0.35);
}
.ph-btn.outline {
background: rgba(255,255,255,0.09);
color: rgba(255,255,255,0.9);
border: 1px solid rgba(255,255,255,0.22);
backdrop-filter: blur(6px);
}
/* ── Back nav ── */
.back-link {
display: inline-flex;
align-items: center;
gap: 0.35rem;
text-decoration: none;
color: var(--muted);
font-size: 0.94rem;
padding: 0.35rem 0.65rem;
border-radius: 999px;
border: 1px solid transparent;
transition: color 0.12s, background 0.12s, border-color 0.12s;
}
.back-link:hover {
color: var(--accent);
border-color: var(--line);
background: var(--paper);
}
/* ── Section layout ── */
.research-section {
margin-top: 2.5rem;
animation: rise 500ms ease;
}
.section-h2 {
font-size: clamp(1.3rem, 2.5vw, 1.9rem);
margin: 0 0 0.35rem;
}
.section-sub {
color: var(--muted);
font-size: 1rem;
margin: 0 0 1.4rem;
line-height: 1.5;
}
/* ── Filter row ── */
.filter-row {
display: flex;
gap: 0.6rem;
flex-wrap: wrap;
margin-bottom: 1.2rem;
align-items: center;
}
.filter-label {
font-size: 0.85rem;
font-weight: 600;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.07em;
}
.filter-pills {
display: flex;
gap: 0.4rem;
flex-wrap: wrap;
}
.filter-pill {
border: 1px solid var(--line);
background: var(--paper);
color: var(--muted);
border-radius: 100px;
padding: 0.3rem 0.85rem;
font-size: 0.84rem;
font-weight: 500;
font-family: "IBM Plex Sans", sans-serif;
cursor: pointer;
transition: border-color 0.12s, background 0.12s, color 0.12s;
}
.filter-pill:hover {
border-color: var(--accent);
color: var(--accent);
}
.filter-pill.active {
background: var(--accent);
border-color: var(--accent);
color: white;
}
.filter-divider {
width: 1px;
height: 18px;
background: var(--line);
margin: 0 0.2rem;
}
.link-card {
text-decoration: none;
color: var(--ink);
}
/* ── Blog cards ── */
.blogs-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
gap: 1rem;
}
.blog-card {
background: var(--paper);
border: 1px solid var(--line);
border-radius: 14px;
padding: 1.5rem 1.5rem 1.3rem;
display: flex;
flex-direction: column;
gap: 0.5rem;
transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
animation: rise 500ms ease;
text-decoration: none;
color: inherit;
}
.blog-card:hover {
text-decoration: none;
}
.blog-card:not(.hidden):hover {
border-color: var(--accent);
box-shadow: 0 6px 20px rgba(201,95,38,0.1);
transform: translateY(-2px);
}
.blog-card.hidden { display: none; }
.blog-title {
font-family: "Source Serif 4", Georgia, serif;
font-size: 1.05rem;
font-weight: 600;
color: var(--ink);
line-height: 1.4;
margin: 0;
}
.blog-author {
margin: 0;
font-size: 0.92rem;
color: var(--muted);
line-height: 1.5;
}
.blog-preview {
margin: 0;
font-size: 0.92rem;
color: var(--muted);
line-height: 1.5;
}
.blog-date {
font-size: 0.88rem;
color: var(--muted);
margin: 0;
line-height: 1.4;
}
.blog-tags {
display: flex;
flex-wrap: wrap;
gap: 0.4rem;
margin: 0 0 0.1rem;
}
.blog-date-tag,
.blog-readtime-tag {
display: inline-flex;
align-items: center;
gap: 0.3rem;
font-size: 0.75rem;
font-weight: 500;
font-family: "IBM Plex Sans", sans-serif;
letter-spacing: 0.03em;
color: var(--muted);
background: var(--bg);
border: 1px solid var(--line);
border-radius: 999px;
padding: 0.2rem 0.65rem;
}
.blog-updated {
margin: 0;
font-size: 0.78rem;
color: var(--muted);
font-style: italic;
line-height: 1.4;
}
.blog-actions {
display: flex;
gap: 0.5rem;
flex-wrap: wrap;
margin-top: auto;
padding-top: 0.5rem;
}
.blog_list {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 1rem;
align-items: start;
}
.blog_list .blog-card {
width: 100%;
}
.blog-btn {
display: inline-flex;
align-items: center;
gap: 0.35rem;
text-decoration: none;
cursor: pointer;
font-size: 0.84rem;
font-weight: 500;
font-family: "IBM Plex Sans", sans-serif;
border-radius: 8px;
padding: 0.38rem 0.75rem;
transition: filter 0.12s, transform 0.1s;
}
.blog-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.blog-btn.read {
background: var(--accent);
color: white;
border: 1px solid rgba(201,95,38,0.2);
box-shadow: 0 2px 8px rgba(201,95,38,0.25);
}
.blog-btn.details {
background: var(--bg);
color: var(--muted);
border: 1px solid var(--line);
}
.blog-btn.details:hover { color: var(--accent); border-color: var(--accent); }
.no-results {
grid-column: 1 / -1;
text-align: center;
padding: 3rem 1rem;
color: var(--muted);
font-size: 0.97rem;
}
/* ── Search ── */
.blog-search {
position: relative;
width: 100%;
margin: 0 0 1rem;
}
.blog-search input {
width: 100%;
box-sizing: border-box;
padding: 0.65rem 2.4rem 0.65rem 2.4rem;
font-size: 0.95rem;
font-family: "IBM Plex Sans", sans-serif;
color: var(--ink);
background: var(--paper);
border: 1px solid var(--line);
border-radius: 10px;
transition: border-color 0.15s, box-shadow 0.15s;
}
.blog-search input::placeholder { color: var(--muted); }
.blog-search input:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(201,95,38,0.15);
}
.blog-search .search-icon {
position: absolute;
left: 0.75rem;
top: 50%;
transform: translateY(-50%);
color: var(--muted);
pointer-events: none;
}
.blog-search .clear-btn {
position: absolute;
right: 0.55rem;
top: 50%;
transform: translateY(-50%);
background: transparent;
border: none;
color: var(--muted);
cursor: pointer;
padding: 0.25rem;
border-radius: 6px;
display: none;
line-height: 0;
}
.blog-search .clear-btn:hover { color: var(--accent); }
.blog-search.has-value .clear-btn { display: inline-flex; }
/* ── Filters row (date + read time) ── */
.filters-row {
display: flex;
gap: 1.5rem;
flex-wrap: wrap;
align-items: center;
margin: 0 0 1.4rem;
}
.date-filter,
.readtime-filter {
display: flex;
gap: 0.6rem;
flex-wrap: wrap;
align-items: center;
margin: 0;
}
.readtime-filter input[type="number"] {
width: 4.5rem;
font-size: 0.9rem;
font-family: "IBM Plex Sans", sans-serif;
color: var(--ink);
background: var(--paper);
border: 1px solid var(--line);
border-radius: 8px;
padding: 0.4rem 0.55rem;
transition: border-color 0.15s, box-shadow 0.15s;
}
.readtime-filter input[type="number"]:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(201,95,38,0.15);
}
.readtime-filter label {
font-size: 0.85rem;
font-weight: 600;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.07em;
}
.readtime-filter .readtime-sep {
color: var(--muted);
font-size: 0.9rem;
}
.readtime-filter .readtime-unit {
color: var(--muted);
font-size: 0.85rem;
}
.date-filter .date-field {
display: inline-flex;
align-items: center;
gap: 0.4rem;
}
.date-filter label {
font-size: 0.85rem;
font-weight: 600;
color: var(--muted);
text-transform: uppercase;
letter-spacing: 0.07em;
}
.date-filter input[type="date"] {
font-size: 0.9rem;
font-family: "IBM Plex Sans", sans-serif;
color: var(--ink);
background: var(--paper);
border: 1px solid var(--line);
border-radius: 8px;
padding: 0.4rem 0.6rem;
transition: border-color 0.15s, box-shadow 0.15s;
}
.date-filter input[type="date"]:focus {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(201,95,38,0.15);
}
.reset-dates {
display: inline-flex;
align-items: center;
gap: 0.5rem;
background: var(--paper);
border: 1px solid var(--line);
color: var(--muted);
border-radius: 10px;
padding: 0.6rem 1.1rem;
font-size: 0.92rem;
font-weight: 500;
font-family: "IBM Plex Sans", sans-serif;
cursor: pointer;
transition: border-color 0.15s, color 0.15s, box-shadow 0.15s, transform 0.1s;
}
.reset-dates:hover {
color: var(--accent);
border-color: var(--accent);
box-shadow: 0 2px 8px rgba(201,95,38,0.12);
transform: translateY(-1px);
}
.reset-dates:focus-visible {
outline: none;
border-color: var(--accent);
box-shadow: 0 0 0 3px rgba(201,95,38,0.15);
}
.reset-dates svg { flex-shrink: 0; opacity: 0.85; }
/* ── Callout banner ── */
.apply-callout {
margin-top: 2rem;
background: var(--paper);
border: 1px solid var(--line);
border-radius: 14px;
padding: 1.5rem 1.6rem;
display: flex;
align-items: center;
justify-content: space-between;
flex-wrap: wrap;
gap: 1rem;
}
.apply-callout p {
margin: 0.2rem 0 0;
color: var(--muted);
font-size: 0.95rem;
}
.apply-callout h3 { margin: 0; font-size: 1.1rem; }
.callout-btn {
display: inline-flex;
align-items: center;
gap: 0.45rem;
text-decoration: none;
background: var(--accent);
color: white;
border-radius: 10px;
padding: 0.6rem 1.1rem;
font-size: 0.93rem;
font-weight: 500;
font-family: "IBM Plex Sans", sans-serif;
white-space: nowrap;
transition: filter 0.15s, transform 0.1s;
}
.callout-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
@media (max-width: 600px) {
.blogs-grid { grid-template-columns: 1fr; }
.tenets-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 380px) {
.tenets-grid { grid-template-columns: 1fr; }
}
</style>
</head>
<body>
<header class="site-header">
<div class="site-wrap header-inner">
<nav class="nav" aria-label="Main navigation">
<a href="index.html" class="back-link">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><polyline points="15 18 9 12 15 6"/></svg>
PyHealth
</a>
</nav>
<span style="color: var(--muted); font-size: 0.88rem; font-weight: 500;">Blog Posts</span>
</div>
</header>
<main class="site-wrap" style="padding: 2.2rem 0 3.5rem;">
<div class="landing-card">
<h1>Blog Posts</h1>
<div class="blog-search" id="blogSearch">
<svg class="search-icon" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg>
<input type="search" id="blogSearchInput" placeholder="Search posts by title, author, or date…" aria-label="Search blog posts" autocomplete="off">
<button type="button" class="clear-btn" id="blogSearchClear" aria-label="Clear search">
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg>
</button>
</div>
<div class="filters-row">
<div class="date-filter" id="dateFilter">
<div class="date-field">
<label for="dateFrom">From</label>
<input type="date" id="dateFrom" aria-label="Filter posts on or after this date">
</div>
<div class="date-field">
<label for="dateTo">To</label>
<input type="date" id="dateTo" aria-label="Filter posts on or before this date">
</div>
</div>
<div class="readtime-filter" id="readtimeFilter">
<label for="readtimeMin">Read time</label>
<input type="number" id="readtimeMin" placeholder="Min" min="0" aria-label="Minimum read time in minutes">
<span class="readtime-sep">–</span>
<input type="number" id="readtimeMax" placeholder="Max" min="0" aria-label="Maximum read time in minutes">
<span class="readtime-unit">min</span>
</div>
<button type="button" class="reset-dates" id="dateReset">
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><path d="M3 12a9 9 0 0 1 15.5-6.3L21 8"/><polyline points="21 3 21 8 16 8"/><path d="M21 12a9 9 0 0 1-15.5 6.3L3 16"/><polyline points="3 21 3 16 8 16"/></svg>
Reset filters
</button>
</div>
<div class="blog_list" id="blogList">Loading...
<!-- ── Blog Posts ── -->
<section class="page-section fade-up">
<h2 class="section-h2">Blog Posts</h2>
<p class="section-sub">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
<div class="link-cards">
<a href="https://pyhealth.readthedocs.io/en/latest/" class="blog-card link-card" target="_blank" rel="noopener">
<h3>Post 1</h3>
<div class="lc-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M4 19.5A2.5 2.5 0 0 1 6.5 17H20"/><path d="M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2z"/></svg>
</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.</p>
<span class="lc-arrow">Read the docs
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/></svg>
</span>
</a>
<a href="https://github.com/sunlabuiuc/PyHealth" class="blog-card link-card" target="_blank" rel="noopener">
<div class="lc-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="currentColor"><path d="M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844a9.59 9.59 0 0 1 2.504.337c1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z"/></svg>
</div>
<h3>GitHub Repository</h3>
<p>Browse the source code, open issues, submit pull requests, and track ongoing development.</p>
<span class="lc-arrow">View on GitHub
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/></svg>
</span>
</a>
<a href="https://discord.gg/mpb835EHaX" class="blog-card link-card" target="_blank" rel="noopener">
<div class="lc-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="currentColor"><path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037c-.21.375-.444.864-.608 1.25a18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.055 20.03 20.03 0 0 0 5.993 3.029.078.078 0 0 0 .084-.026 13.83 13.83 0 0 0 1.185-1.93.076.076 0 0 0-.041-.106 13.201 13.201 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.184 1.929a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.029.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"/></svg>
</div>
<h3>Discord Community</h3>
<p>Join 400+ members to ask questions, share research, and collaborate on healthcare AI projects.</p>
<span class="lc-arrow">Join the server
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/></svg>
</span>
</a>
<a href="research.html" class="blog-card link-card">
<div class="lc-icon">
<svg width="28" height="28" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.75" stroke-linecap="round" stroke-linejoin="round"><path d="M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"/><circle cx="9" cy="7" r="4"/><path d="M23 21v-2a4 4 0 0 0-3-3.87"/><path d="M16 3.13a4 4 0 0 1 0 7.75"/></svg>
</div>
<h3>Research Initiative</h3>
<p>A structured program of 10+ researchers — including healthcare domain experts — building and publishing open-source, reproducible clinical AI research on top of PyHealth. Apply to join and collaborate with clinicians, data scientists, and AI researchers advancing trustworthy healthcare AI.</p>
<span class="lc-arrow">Apply to join
<svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><line x1="5" y1="12" x2="19" y2="12"/><polyline points="12 5 19 12 12 19"/></svg>
</span>
</a>
</div>
</section>
<script>
const blogList = document.getElementById('blogList');
const searchWrap = document.getElementById('blogSearch');
const searchInput = document.getElementById('blogSearchInput');
const searchClear = document.getElementById('blogSearchClear');
const dateFromInput = document.getElementById('dateFrom');
const dateToInput = document.getElementById('dateTo');
const dateReset = document.getElementById('dateReset');
const readtimeMinInput = document.getElementById('readtimeMin');
const readtimeMaxInput = document.getElementById('readtimeMax');
let allBlogs = [];
function formatUpdated(iso) {
const d = new Date(iso);
if (isNaN(d)) return '';
return d.toLocaleDateString(undefined, { year: 'numeric', month: 'long', day: 'numeric' });
}
function formatReadTime(min) {
if (!min) return '';
if (min <= 60) return `${min} min read`;
const hr = Math.floor(min / 60);
const rem = min % 60;
if (rem === 0) return `${hr} hr read`;
return `${hr} hr ${rem} min read`;
}
function cardHtml(blog) {
const dateLabel = blog.date_display || blog.date || '';
const updated = blog.last_updated ? formatUpdated(blog.last_updated) : '';
const readTime = formatReadTime(blog.read_time_min);
const readTimeTitle = blog.word_count ? `${blog.word_count} words` : '';
const tags = (dateLabel || readTime) ? `
<div class="blog-tags">
${dateLabel ? `<time class="blog-date-tag" datetime="${blog.date || ''}">${dateLabel}</time>` : ''}
${readTime ? `<span class="blog-readtime-tag" title="${readTimeTitle}">
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg>
${readTime}
</span>` : ''}
</div>` : '';
return `
${tags}
<h3 class="blog-title">${blog.title}</h3>
${blog.author ? `<p class="blog-author">By ${blog.author}</p>` : ''}
${updated ? `<p class="blog-updated" title="${blog.last_updated}">Last updated on ${updated}</p>` : ''}
${blog.preview ? `<p class="blog-preview">${blog.preview}</p>` : ''}
`;
}
function render(blogs) {
blogList.innerHTML = '';
if (!blogs.length) {
const empty = document.createElement('p');
empty.className = 'no-results';
empty.textContent = allBlogs.length ? 'No posts match your search.' : 'No blog posts found.';
blogList.appendChild(empty);
return;
}
blogs.forEach(blog => {
const card = document.createElement('a');
card.href = blog.url;
card.className = 'blog-card';
card.innerHTML = cardHtml(blog);
blogList.appendChild(card);
});
}
function applyFilter() {
const q = searchInput.value.trim().toLowerCase();
const from = dateFromInput.value;
const to = dateToInput.value;
const rtMinRaw = readtimeMinInput.value.trim();
const rtMaxRaw = readtimeMaxInput.value.trim();
const rtMin = rtMinRaw !== '' ? parseInt(rtMinRaw, 10) : null;
const rtMax = rtMaxRaw !== '' ? parseInt(rtMaxRaw, 10) : null;
searchWrap.classList.toggle('has-value', q.length > 0);
const filtered = allBlogs.filter(b => {
if (q) {
const haystack = [b.title, b.author, b.preview, b.date, b.date_display]
.filter(Boolean).join(' ').toLowerCase();
if (!haystack.includes(q)) return false;
}
if ((from || to) && !b.date) return false;
if (from && b.date < from) return false;
if (to && b.date > to) return false;
const rt = b.read_time_min || 0;
if (rtMin !== null && !isNaN(rtMin) && rt < rtMin) return false;
if (rtMax !== null && !isNaN(rtMax) && rt > rtMax) return false;
return true;
});
render(filtered);
}
searchInput.addEventListener('input', applyFilter);
searchClear.addEventListener('click', () => {
searchInput.value = '';
applyFilter();
searchInput.focus();
});
dateFromInput.addEventListener('change', applyFilter);
dateToInput.addEventListener('change', applyFilter);
readtimeMinInput.addEventListener('input', applyFilter);
readtimeMaxInput.addEventListener('input', applyFilter);
dateReset.addEventListener('click', () => {
dateFromInput.value = '';
dateToInput.value = '';
readtimeMinInput.value = '';
readtimeMaxInput.value = '';
applyFilter();
});
fetch('data/blogs.json')
.then(response => response.json())
.then(blogs => {
allBlogs = blogs;
render(allBlogs);
})
.catch(err => {
console.error(err);
blogList.innerHTML = 'Could not load blogs';
});
</script>
</body>
</html>