aboutsummaryrefslogtreecommitdiff
path: root/bin/template.eml
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/template.eml43
1 files changed, 43 insertions, 0 deletions
diff --git a/bin/template.eml b/bin/template.eml
new file mode 100644
index 0000000..69d5dea
--- /dev/null
+++ b/bin/template.eml
@@ -0,0 +1,43 @@
+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 Links</title>
+ </head>
+ <body style="display:flex; flex-direction:column; align-items:center">
+ <h1>Sensemaking Links</h1>
+ <div>
+ <sl-button variant="text" size="medium" hx-post="/login" hx-swap="outerHTML">login</sl-button>
+ <sl-button variant="text" size="medium">rss</sl-button>
+ </div>
+% 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>