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

main
Last change on this file since 8ea3d0d was 8ea3d0d, checked in by roboburr <roboburr@…>, 3 months ago

Defaults: new sites grid + moderate; Circle page graphical header

(A) New-site defaults aligned with Robin's preference: feed_view_default
'timeline'->'grid' and comments_moderation_mode 'trust'->'moderate'. Set in
column defaults (fresh installs), siteEditableFields + createSite INSERT,
and ensurePrimarySite. Other defaults were already correct (public/index/
audio/switcher/search/archive on, login-to-comment off).
(B) /circle header redesigned: centred, graphical "connected circles"
motif in accent colour + chips with the avatars/names of the synced circle
sites.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@…>

  • Property mode set to 100644
File size: 3.8 KB
RevLine 
[8ea3d0d]1<div class="container cirkel-hero">
2 <span class="cirkel-badge" aria-hidden="true">
3 <svg viewBox="0 0 64 64" fill="none" stroke="currentColor" stroke-width="2.4" stroke-linecap="round" stroke-linejoin="round">
4 <line x1="32" y1="16" x2="17" y2="45"/>
5 <line x1="32" y1="16" x2="47" y2="45"/>
6 <line x1="17" y1="45" x2="47" y2="45"/>
7 <circle cx="32" cy="16" r="8" fill="currentColor" fill-opacity=".16"/>
8 <circle cx="17" cy="45" r="8" fill="currentColor" fill-opacity=".16"/>
9 <circle cx="47" cy="45" r="8" fill="currentColor" fill-opacity=".16"/>
10 </svg>
11 </span>
[43dbf9c]12 <h1>Cirkel</h1>
[64b90c0]13 <p class="cirkel-sub">Wat er speelt bij de andere sites in mijn cirkel.</p>
[8ea3d0d]14 <% if (typeof sites !== 'undefined' && sites && sites.length) { %>
15 <div class="cirkel-members">
16 <% sites.forEach(function(s){ %>
17 <% 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 %>"><% } %>
18 <span class="cirkel-avatar"<% if (s.avatar) { %> style="background-image:url('<%= s.avatar %>')"<% } %>><% if (!s.avatar) { %><%= (s.name || '?').charAt(0).toUpperCase() %><% } %></span>
19 <span class="cirkel-member-name"><%= s.name %></span>
20 <% if (s.url) { %></a><% } else { %></span><% } %>
21 <% }); %>
22 </div>
23 <% } %>
[43dbf9c]24</div>
[0091cb7]25
[43dbf9c]26<% if (!posts.length) { %>
27 <div class="container">
28 <p class="cirkel-empty">Nog niets in je cirkel. Voeg sites toe via
[0091cb7]29 <a href="/admin/circle">Beheer &rsaquo; Cirkel</a> en ververs ze.</p>
[43dbf9c]30 </div>
31<% } else { %>
32
33 <%# Dezelfde view als de hoofdpagina: timeline (post-card) + grid (post-tile),
34 gewisseld door de view-switcher via body[data-feed-view]. De remote-posts
35 zijn in circle.js naar het lokale post-shape gevormd (met external_url,
36 zodat de kaarten naar de bron-site linken). %>
37
38 <!-- ===== TIMELINE (standaard) ===== -->
39 <div class="container feed-timeline">
40 <ul class="post-list feed-timeline-list">
41 <% posts.forEach(function(post){ %>
42 <%- include('../partials/post-card', { post: post }) %>
43 <% }); %>
44 </ul>
45 </div>
46
47 <!-- ===== GRID (body[data-feed-view="grid"]) ===== -->
48 <section class="feed-grid container" aria-label="Grid-weergave">
49 <div class="grid-tiles">
50 <% posts.forEach(function(post){ %>
51 <%- include('../partials/post-tile', { post: post }) %>
[0091cb7]52 <% }); %>
53 </div>
[43dbf9c]54 </section>
55
56<% } %>
[0091cb7]57
58<style>
[8ea3d0d]59.cirkel-hero { text-align: center; max-width: 640px; margin: 2.5rem auto 2rem; }
60.cirkel-badge { display: block; width: 60px; height: 60px; margin: 0 auto .6rem; color: var(--accent); }
61.cirkel-badge svg { width: 100%; height: 100%; }
62.cirkel-hero h1 { font-family: var(--font-display, serif); font-size: 2.4rem; margin: 0 0 .3rem; }
63.cirkel-sub { color: var(--ink-muted); margin: 0 0 1.25rem; font-size: 1.02rem; }
64.cirkel-members { display: flex; flex-wrap: wrap; gap: .55rem; justify-content: center; }
65.cirkel-member { display: inline-flex; align-items: center; gap: .45rem;
66 padding: .28rem .8rem .28rem .3rem; border: 1px solid var(--rule); border-radius: 999px;
67 text-decoration: none; color: var(--ink); background: var(--paper-2);
68 transition: border-color .15s, transform .15s; }
69.cirkel-member:hover { border-color: var(--accent); transform: translateY(-1px); }
70.cirkel-avatar { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0;
71 background-size: cover; background-position: center; background-color: var(--accent);
72 color: #fff; display: inline-flex; align-items: center; justify-content: center;
73 font-weight: 700; font-size: .82rem; }
74.cirkel-member-name { font-size: .9rem; font-weight: 600; }
75.cirkel-empty { color: var(--ink-muted); text-align: center; margin: 2rem auto; }
[43dbf9c]76.cirkel-empty a { color: var(--accent); }
[0091cb7]77</style>
Note: See TracBrowser for help on using the repository browser.