Skip to main content

max / makenotwork

3.6 KB · 79 lines History Blame Raw
1 <!doctype html>
2 <html lang="en">
3 <head>
4 <meta charset="UTF-8">
5 <meta name="viewport" content="width=device-width, initial-scale=1.0">
6 <title>{{ title }}: Makenotwork</title>
7 <style>
8 /* The design system, inlined: an embed renders in an iframe on somebody
9 else's page and cannot link a stylesheet. Colour comes from makeover at
10 render time (platform default theme), spacing from makeover-geometry at
11 build time (Pointer density, no touch block). Do not write a literal
12 below: nothing would catch it drifting. */
13 {{ theme_css|safe }}
14 {{ geometry_css|safe }}
15 * { margin: 0; padding: 0; box-sizing: border-box; }
16 body {
17 font-family: Lato, -apple-system, sans-serif;
18 background: var(--surface-page); color: var(--content);
19 display: flex; align-items: center;
20 height: 100vh; padding: var(--gap-group) var(--gap-section);
21 }
22 .player { display: flex; align-items: center; gap: var(--gap-section); width: 100%; }
23 .cover { width: 80px; height: 80px; border-radius: 6px; object-fit: cover; flex-shrink: 0; }
24 .placeholder { background: var(--surface-raised); }
25 .right { flex: 1; min-width: 0; }
26 .top-row { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: var(--gap-bound); }
27 .title { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
28 .price { font-size: 12px; font-family: 'IBM Plex Mono', monospace; margin-left: var(--step-base); white-space: nowrap; }
29 .creator { font-size: 11px; opacity: 0.6; margin-bottom: var(--step-base); }
30 .controls { display: flex; align-items: center; gap: var(--step-base); }
31 .play-btn {
32 width: 32px; height: 32px; border-radius: 50%;
33 background: var(--action); color: var(--content-on-action); border: none;
34 font-size: 14px; cursor: pointer; display: flex;
35 align-items: center; justify-content: center; flex-shrink: 0;
36 }
37 .play-btn:hover { background: var(--action-hover); }
38 .progress-bar {
39 flex: 1; height: 4px; background: var(--surface-sunken);
40 border-radius: 2px; cursor: pointer; position: relative;
41 }
42 .progress-fill { height: 100%; background: var(--action); border-radius: 2px; width: 0%; transition: width 0.1s; }
43 .time { font-size: 10px; font-family: 'IBM Plex Mono', monospace; opacity: 0.6; white-space: nowrap; }
44 .bottom-row { display: flex; justify-content: space-between; align-items: center; margin-top: var(--step-base); }
45 .preview-label { font-size: 10px; opacity: 0.5; }
46 .buy-btn {
47 background: var(--action); color: var(--content-on-action); border: none; border-radius: 4px;
48 padding: var(--gap-peer) var(--gap-section); font-size: 11px; font-weight: 600;
49 cursor: pointer; text-decoration: none; white-space: nowrap;
50 }
51 .buy-btn:hover { background: var(--action-hover); }
52 </style>
53 </head>
54 <body>
55 <div class="player" data-preview-url="{{ preview_url }}">
56 {% if let Some(url) = cover_image_url %}<img class="cover" src="{{ url }}" alt="">{% else %}<div class="cover placeholder"></div>{% endif %}
57 <div class="right">
58 <div class="top-row">
59 <div class="title">{{ title }}</div>
60 <div class="price">{{ price_display }}</div>
61 </div>
62 <div class="creator">by {{ creator_display_name }}</div>
63 <div class="controls">
64 <button class="play-btn" id="play">&#9654;</button>
65 <div class="progress-bar" id="progress-bar">
66 <div class="progress-fill" id="progress"></div>
67 </div>
68 <span class="time" id="time">0:00</span>
69 </div>
70 <div class="bottom-row">
71 <span class="preview-label">Preview</span>
72 <a class="buy-btn" href="{{ purchase_url }}" target="_blank" rel="noopener">{{ button_text }}</a>
73 </div>
74 </div>
75 </div>
76 <script src="/static/embed-item-player.js?v=0623" defer></script>
77 </body>
78 </html>
79