source: Klonkt/src/views/pages/circle-feed.ejs@ cbe4f4e

main
Last change on this file since cbe4f4e was cbe4f4e, checked in by Robin Genis <roboburr@…>, 2 months ago

style: transparent covers on white everywhere (not just the Cirkel)

Move the white-bg-behind-covers rule from the Cirkel page to global style.css:
.post-cover img / .post-list-cover img / .grid-tile (non-gradient). So any
transparent PNG/WebP cover sits on white on a dark theme, in every feed/post view.

Co-Authored-By: Claude <noreply@…>

  • Property mode set to 100644
File size: 4.6 KB
Line 
1<div class="container cirkel-hero">
2 <span class="cirkel-badge" aria-hidden="true">
3 <svg viewBox="0 0 100 100" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round">
4 <defs>
5 <marker id="cf-a" viewBox="0 0 10 10" refX="6.5" refY="5" markerWidth="5" markerHeight="5" orient="auto-start-reverse"><path d="M1.5 1.5 L8.5 5 L1.5 8.5 Z" fill="currentColor" stroke="none"/></marker>
6 </defs>
7 <line x1="28.95" y1="43.5" x2="63.05" y2="26.5" stroke-width="2.6" marker-start="url(#cf-a)" marker-end="url(#cf-a)"/>
8 <line x1="72" y1="32" x2="72" y2="66" stroke-width="2.6" marker-end="url(#cf-a)"/>
9 <line x1="28.8" y1="52.7" x2="63.2" y2="71.3" stroke-width="2.6" marker-end="url(#cf-a)"/>
10 <circle cx="20" cy="48" r="7" stroke-width="2.4"/>
11 <circle cx="72" cy="22" r="7" stroke-width="2.4"/>
12 <circle cx="72" cy="76" r="7" stroke-width="2.4"/>
13 </svg>
14 </span>
15 <h1><%= t('cfeed.title') %></h1>
16 <p class="cirkel-sub"><%= t('cfeed.sub') %></p>
17 <% if (typeof sites !== 'undefined' && sites && sites.length) { %>
18 <% if (sites.length <= 5) { %>
19 <div class="cirkel-members">
20 <% sites.forEach(function(s){ %>
21 <% if (s.url) { %><a class="cirkel-member" href="<%= s.url %>" target="_blank" rel="noopener" title="<%= s.name %>"><% } else { %><span class="cirkel-member" title="<%= s.name %>"><% } %>
22 <span class="cirkel-avatar"<% if (s.avatar) { %> style="background-image:url('<%= s.avatar %>');background-color:transparent"<% } %>><% if (!s.avatar) { %><%= (s.name || '?').charAt(0).toUpperCase() %><% } %></span>
23 <span class="cirkel-member-name"><%= s.name %></span>
24 <% if (s.url) { %></a><% } else { %></span><% } %>
25 <% }); %>
26 </div>
27 <% } else { %>
28 <%# More than 5: no chips (would become a wall) — show the count only. %>
29 <span class="cirkel-count"><%= t('cfeed.count', { n: sites.length }) %></span>
30 <% } %>
31 <% } %>
32</div>
33
34<% if (!posts.length) { %>
35 <div class="container">
36 <p class="cirkel-empty"><%= t('cfeed.empty') %></p>
37 </div>
38<% } else { %>
39
40 <%# Same view as the home page: timeline (post-card) + grid (post-tile),
41 switched by the view-switcher via body[data-feed-view]. The remote posts
42 are shaped to the local post format in circle.js (with external_url,
43 so cards link to the source site). %>
44
45 <!-- ===== TIMELINE (standaard) ===== -->
46 <div class="container feed-timeline">
47 <ul class="post-list feed-timeline-list">
48 <% posts.forEach(function(post){ %>
49 <%- include('../partials/post-card', { post: post }) %>
50 <% }); %>
51 </ul>
52 </div>
53
54 <!-- ===== GRID (body[data-feed-view="grid"]) ===== -->
55 <section class="feed-grid container" aria-label="<%= t('cfeed.grid_view') %>">
56 <div class="grid-tiles">
57 <% posts.forEach(function(post){ %>
58 <%- include('../partials/post-tile', { post: post }) %>
59 <% }); %>
60 </div>
61 </section>
62
63<% } %>
64
65<style>
66.cirkel-hero { text-align: center; max-width: 640px; margin: 2.5rem auto 2rem; }
67.cirkel-badge { display: block; width: 100px; height: 100px; margin: 0 auto .7rem; color: var(--accent);
68 filter: drop-shadow(0 0 6px color-mix(in srgb, var(--accent) 65%, transparent)) drop-shadow(0 0 1px var(--accent)); }
69.cirkel-badge svg { width: 100%; height: 100%; }
70.cirkel-hero h1 { font-family: var(--font-display, serif); font-size: 2.4rem; margin: 0 0 .3rem; }
71.cirkel-sub { color: var(--ink-muted); margin: 0 0 1.25rem; font-size: 1.02rem; }
72.cirkel-members { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; }
73.cirkel-member { display: inline-flex; align-items: center; gap: .45rem;
74 padding: .28rem .8rem .28rem .3rem; border: 1px solid var(--rule); border-radius: 999px;
75 text-decoration: none; color: var(--ink); background: var(--paper-2);
76 transition: border-color .15s, transform .15s; }
77.cirkel-member:hover { border-color: var(--accent); transform: translateY(-1px); }
78.cirkel-avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
79 background-size: cover; background-position: center; background-color: var(--accent);
80 color: #fff; display: inline-flex; align-items: center; justify-content: center;
81 font-weight: 700; font-size: .82rem; }
82.cirkel-member-name { font-size: .9rem; font-weight: 600; }
83.cirkel-count { display: inline-block; color: var(--ink-muted); font-size: .92rem; font-weight: 600;
84 padding: .35rem 1rem; border: 1px solid var(--rule); border-radius: 999px; background: var(--paper-2); }
85.cirkel-empty { color: var(--ink-muted); text-align: center; margin: 2rem auto; }
86.cirkel-empty a { color: var(--accent); }
87</style>
Note: See TracBrowser for help on using the repository browser.