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
|
open Wormhole
open Wormhole.Post
let render (posts: Post.t list) =
<html>
<script src="https://unpkg.com/htmx.org@1.9.9"></script>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/themes/light.css"
/>
<script
type="module"
src="https://cdn.jsdelivr.net/npm/@shoelace-style/shoelace@2.12.0/cdn/shoelace-autoloader.js"
></script>
<head>
<title>Sensemaking Galaxy</title>
</head>
<body style="display:flex; flex-direction:column; align-items:center; background: rgb(23,7,40); background: radial-gradient(circle, rgba(23,7,40,1) 0%, rgba(0,0,0,1) 50%, rgba(12,21,63,1) 100%);">
<h1 style="color: white; margin-top: 3rem">Sensemaking Galaxy</h1>
<div>
<sl-button variant="text" size="medium">rss</sl-button>
</div>
<p style="color: white; margin-bottom: 2rem">Links that have ended up in this Galaxy were sent through space
and time by the Sensemaking Wormhole.</p>
% posts |> List.iter begin fun { author; link; summary; tags; _ } ->
<div>
<sl-card style="min-width: 400px; max-width: 600px; margin: 10px">
<div style="display:flex; flex-direction:column; gap: 10px">
<%s summary %>
<sl-button size="small" href=<%s link %>>Link (<%s Post.get_tld link %>)</sl-button>
</div>
<div slot="footer" style="display:flex; flex-direction:row; justify-content:space-between">
Submitted by: <%s author %>
<div style="display:flex; flex-direction:row; gap: 3px">
% tags |> List.iter begin fun tag ->
<sl-tag size="small"><%s tag %></sl-tag>
% end;
</div>
</div>
</div>
% end;
</body>
</html>
|