source: Klonkt/src/views/pages/prutter-inbox.ejs@ 5e95aac

main
Last change on this file since 5e95aac was 7bc636b, checked in by Robin <robin@…>, 4 months ago

Initial commit — PrutFolio v1 source (pulled from Hetzner /srv/prutfolio)

  • Property mode set to 100644
File size: 3.7 KB
Line 
1<div class="container prutter-inbox-page">
2 <header class="prutter-header">
3 <h1>Prutter</h1>
4 <p class="prutter-tagline">Your direct messages on this site.</p>
5 </header>
6
7 <% if (!conversations.length) { %>
8 <p class="prutter-empty">
9 No conversations yet. Open someone's profile and click <em>Send DM</em> to start one.
10 </p>
11 <% } else { %>
12 <ol class="prutter-conv-list">
13 <% conversations.forEach(function(c) { %>
14 <li class="prutter-conv-row">
15 <a class="prutter-conv-link" href="<%= siteUrlBase %>/prutter/<%= c.id %>">
16 <div class="prutter-conv-avatar">
17 <% if (c.other_avatar) { %>
18 <img src="<%= c.other_avatar %>" alt="">
19 <% } else { %>
20 <span><%= (c.other_username || '?').charAt(0).toUpperCase() %></span>
21 <% } %>
22 </div>
23 <div class="prutter-conv-body">
24 <div class="prutter-conv-meta">
25 <strong class="prutter-conv-name"><%= c.other_username %></strong>
26 <% if (c.last_message_at) { %>
27 <span class="prutter-conv-time"><%= formatDateTime(c.last_message_at) %></span>
28 <% } %>
29 </div>
30 <% if (c.last_message_preview) { %>
31 <div class="prutter-conv-preview"><%= c.last_message_preview %></div>
32 <% } else { %>
33 <div class="prutter-conv-preview muted">Empty conversation</div>
34 <% } %>
35 </div>
36 <% if (c.unread_count > 0) { %>
37 <span class="prutter-unread-badge"><%= c.unread_count %></span>
38 <% } %>
39 </a>
40 </li>
41 <% }); %>
42 </ol>
43 <% } %>
44</div>
45
46<style>
47.prutter-inbox-page { max-width: 720px; margin: 3rem auto; padding: 0 1rem; }
48.prutter-header h1 {
49 font-family: var(--font-display, serif);
50 font-size: 2rem; margin: 0 0 0.25rem;
51}
52.prutter-tagline { color: var(--ink-muted, var(--ink-soft)); margin: 0 0 1.5rem; }
53.prutter-empty {
54 text-align: center; padding: 2rem; color: var(--ink-muted, var(--ink-soft));
55 background: var(--paper-2); border: 1px dashed var(--rule); border-radius: 8px;
56}
57
58.prutter-conv-list { list-style: none; padding: 0; margin: 0; }
59.prutter-conv-row { border-bottom: 1px solid var(--rule); }
60.prutter-conv-row:last-child { border-bottom: 0; }
61.prutter-conv-link {
62 display: flex; gap: 0.85rem; align-items: center;
63 padding: 0.85rem 0;
64 text-decoration: none; color: var(--ink);
65 transition: background 100ms;
66}
67.prutter-conv-link:hover { background: var(--paper-2); }
68
69.prutter-conv-avatar {
70 flex-shrink: 0;
71 width: 44px; height: 44px;
72 border-radius: 50%;
73 overflow: hidden;
74 background: var(--paper-2);
75 border: 1px solid var(--rule);
76 display: inline-flex; align-items: center; justify-content: center;
77}
78.prutter-conv-avatar img { width: 100%; height: 100%; object-fit: cover; }
79.prutter-conv-avatar span {
80 font-family: var(--font-display, serif);
81 font-weight: 700; color: var(--accent);
82}
83
84.prutter-conv-body { flex: 1; min-width: 0; }
85.prutter-conv-meta {
86 display: flex; justify-content: space-between; gap: 0.5rem;
87 margin-bottom: 0.15rem;
88}
89.prutter-conv-name { font-weight: 600; }
90.prutter-conv-time {
91 color: var(--ink-muted, var(--ink-soft));
92 font-size: 0.8rem; flex-shrink: 0;
93}
94.prutter-conv-preview {
95 color: var(--ink-soft);
96 font-size: 0.9rem;
97 white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
98}
99.prutter-conv-preview.muted { font-style: italic; color: var(--ink-muted, var(--ink-soft)); }
100
101.prutter-unread-badge {
102 background: var(--accent); color: white;
103 border-radius: 10px;
104 padding: 0.1rem 0.5rem;
105 font-size: 0.75rem;
106 font-weight: 600;
107}
108</style>
Note: See TracBrowser for help on using the repository browser.