source: Klonkt/src/views/partials/profile-header.ejs@ 0a7ba90

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

fix(profile): replace native prompt() with a styled follow modal

  • views/partials/profile-header.ejs — clicking "follow via the fediverse" opened the ugly browser prompt(); now opens an in-app .pf-follow modal (server input + suggestions datalist + remembered server via localStorage; Enter/Esc/backdrop) that bounces to authorize_interaction. + CSS.
  • services/i18n.js — fedi.cancel (NL/EN/DE).
  • Property mode set to 100644
File size: 24.0 KB
RevLine 
[7bc636b]1<!-- Profile header (v9 structure)
2 Body class controls collapse:
3 .on-home → full size, avatar + bio + links
4 .on-post → compact, just avatar + name
5 .on-special → compact (archive/search/tag pages)
6 .on-admin → hidden (admin pages don't show profile)
7-->
8
9<%
10// Show profile-header unless we're on an admin page or the site explicitly
11// disabled it via profile_enabled=0.
12const _showProfile = site
13 && (site.profile_enabled === undefined || site.profile_enabled !== 0)
14 && !(typeof bodyClass !== 'undefined' && bodyClass.indexOf('on-admin') >= 0);
15
16// profile_name and profile_bio used to be optional overrides exposed in the
17// admin form. P62 removed those form fields — title and description are the
18// single source of truth. We still consult the override columns first for
19// backward compat with any legacy data, but the form no longer writes them.
20const _displayName = (site && (site.profile_name || site.title)) || '';
21const _bioText = (site && (site.profile_bio || site.description || site.tagline)) || '';
22
23// Parse profile_links JSON column once.
24let _profileLinks = [];
25if (site && site.profile_links) {
26 try { _profileLinks = JSON.parse(site.profile_links) || []; } catch (e) { _profileLinks = []; }
27}
[1b99225]28
29// Profile-summary (lightbox) helpers — used by the avatar + the summary modal.
30const _base = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '';
31const _avatarUrl = (site && site.profile_photo) || ((typeof siteOwnerAvatar !== 'undefined' && siteOwnerAvatar) || '');
32const _platforms = (typeof platforms_catalog !== 'undefined' && platforms_catalog) || {};
33const _linkHref = function (p, u) { u = String(u || '').trim(); if (p === 'email' && u && u.indexOf('mailto:') !== 0) return 'mailto:' + u; if (p === 'phone' && u && !/^tel:/i.test(u)) return 'tel:' + u.replace(/[^\d+]/g, ''); return u; };
34const _linkVal = function (u) { return String(u || '').replace(/^(mailto:|tel:|https?:\/\/)/i, '').replace(/\/$/, ''); };
35const _isPrem = (typeof isPremium !== 'undefined' && isPremium);
36let _sinceStr = ''; try { if (site && site.created_at) _sinceStr = new Date(site.created_at).toLocaleDateString('nl-NL', { day: '2-digit', month: 'short', year: 'numeric' }); } catch (e) {}
[7bc636b]37%>
38
39<% if (_showProfile) { %>
40<aside class="profile-header" aria-label="Site profile">
41 <div class="container profile-header-inner">
42
[00a2bcd]43 <% if (_avatarUrl) { %>
[1b99225]44 <%# With a real photo: clicking opens the profile-summary modal (photo + details). %>
45 <button type="button" class="profile-photo" data-pf-summary aria-label="<%= _displayName || 'Profile' %>">
[00a2bcd]46 <img src="<%= _avatarUrl %>" alt="">
47 </button>
48 <% } else { %>
49 <a class="profile-photo" href="<%= _base %>/"
50 hx-get="<%= _base %>/?partial=1" hx-target="#pcms-main" hx-swap="innerHTML"
51 hx-push-url="<%= _base %>/" hx-indicator="#pcms-loading" aria-label="Home">
52 <% if (site.enable_audio_player && (typeof audioEnabled === 'undefined' || audioEnabled)) { %>
53 <span class="profile-photo-fallback profile-photo-fallback--music" aria-hidden="true">
54 <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
55 <path d="M9 17V5l12-2v12"/>
56 <circle cx="6" cy="17" r="3"/>
57 <circle cx="18" cy="15" r="3"/>
58 </svg>
59 </span>
60 <% } else { %>
61 <span class="profile-photo-fallback" aria-hidden="true"><%= (_displayName || '?').charAt(0).toUpperCase() %></span>
62 <% } %>
63 </a>
64 <% } %>
[7bc636b]65
66 <div class="profile-info">
67 <h2 class="profile-name">
68 <a href="<%= (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '' %>/"
69 hx-get="<%= (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '' %>/?partial=1"
70 hx-target="#pcms-main" hx-swap="innerHTML"
71 hx-push-url="<%= (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : '' %>/"
72 hx-indicator="#pcms-loading">
73 <%= _displayName %>
74 </a>
75 </h2>
76 <% if (_bioText) { %>
77 <p class="profile-bio"><%= _bioText %></p>
78 <% } %>
79
[eb2fe08]80 <%# Follow-via-fediverse: a compact icon in the links row (keeps the header
81 short), and hidden for the owner — you don't follow yourself. %>
[283f618]82 <% var _showFollow = (typeof canManageFedi === 'undefined' || !canManageFedi) && site && site.slug && (typeof apEnabled === 'undefined' || apEnabled); %>
[eb2fe08]83 <% if (_profileLinks.length || _showFollow) { %>
[7bc636b]84 <% const _platforms = (typeof platforms_catalog !== 'undefined' && platforms_catalog) || {}; %>
85 <ul class="profile-links" aria-label="External links">
86 <% _profileLinks.forEach(function(l) {
87 const meta = _platforms[l.platform];
88 if (!meta) return; %>
89 <li>
90 <a class="profile-link profile-link--<%= l.platform %>"
91 href="<%= l.platform === 'email' && l.url.indexOf('mailto:') !== 0 ? ('mailto:' + l.url) : l.url %>"
92 target="<%= l.platform === 'email' ? '_self' : '_blank' %>"
93 rel="noopener noreferrer"
94 aria-label="<%= meta.label %>"
95 title="<%= meta.label %>"
96 style="--brand: <%= meta.brand %>">
97 <%- meta.svg %>
98 </a>
99 </li>
100 <% }); %>
[eb2fe08]101 <% if (_showFollow) { %>
[356caeb]102 <li style="order:-1">
[eb2fe08]103 <button type="button" class="profile-link profile-fedi-link" data-fedi-actor-slug="<%= site.slug %>"
[5d39e40]104 aria-label="<%= t('fedi.profile_follow') %>" title="<%= t('fedi.profile_follow') %>"><svg viewBox="151 31 530 530" fill="currentColor" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><g transform="translate(6.6789703,-32.495842)"><path d="M257.1,266.8c-4.9,9.4-12.6,17.1-22.1,22l121.3,121.8l29.2-14.8L257.1,266.8z M417.1,427.4l-29.2,14.8l61.5,61.7c4.9-9.4,12.6-17.1,22.1-22L417.1,427.4z"/><path d="M557.5,315l-68.7,34.8l5.1,32.4l77.7-39.4C564.1,335.2,559.2,325.5,557.5,315z M448.9,370l-162.4,82.3c7.5,7.6,12.4,17.3,14.1,27.8L454,402.4L448.9,370z"/><path d="M396.7,167.3l-78.4,153l23.1,23.2l83-162C414,179.7,404.3,174.7,396.7,167.3z M298,360l-39.7,77.5c10.5,1.8,20.2,6.7,27.7,14.2l35.1-68.5L298,360z"/><path d="M234.3,289.1c-8,4-16.9,5.9-25.8,5.4c-1.7-0.1-3.3-0.3-5-0.5l23.2,148.2c8-4,16.9-5.9,25.8-5.4c1.7,0.1,3.3,0.3,5,0.5L234.3,289.1z"/><path d="M300.8,480.8c0.5,3.4,0.7,6.9,0.5,10.4c-0.4,7.1-2.3,14-5.5,20.4l148.2,23.8c-0.5-3.4-0.7-6.9-0.5-10.4c0.4-7.1,2.3-14,5.5-20.4L300.8,480.8z"/><path d="M572.1,343.3l-68.4,133.6c10.5,1.8,20.2,6.7,27.7,14.2l68.4-133.6C589.4,355.8,579.7,350.8,572.1,343.3z"/><path d="M478.8,154.4c-4.9,9.4-12.6,17.1-22.1,22l105.9,106.4c4.9-9.4,12.6-17.1,22.1-22L478.8,154.4z"/><path d="M382.1,138.9l-133.9,67.9c7.5,7.6,12.4,17.3,14.1,27.8l133.9-67.9C388.7,159.1,383.8,149.4,382.1,138.9z"/><path d="M456.5,176.6c-8.1,4.1-17.1,6.1-26.2,5.6c-1.5-0.1-3-0.3-4.5-0.5l11.9,76l32.4,5.2L456.5,176.6z M444.5,301.8l28.1,179.6c7.9-3.9,16.7-5.7,25.4-5.2c1.8,0.1,3.6,0.3,5.4,0.6L476.8,307L444.5,301.8z"/><path d="M262.4,235.2c0.6,3.5,0.7,7,0.6,10.6c-0.4,7-2.2,13.9-5.4,20.2l76,12.2l14.9-29.2L262.4,235.2z M392.7,256.1l-14.9,29.2l179.6,28.9c-0.5-3.4-0.7-6.9-0.5-10.3c0.4-7.1,2.3-14.1,5.5-20.5L392.7,256.1z"/><circle cx="433" cy="130.6" r="47"/><circle cx="608.4" cy="306.6" r="47"/><circle cx="495.1" cy="527.8" r="47"/><circle cx="249.7" cy="488.4" r="47"/><circle cx="211.3" cy="242.9" r="47"/></g></svg></button>
[eb2fe08]105 </li>
106 <% } %>
[7bc636b]107 </ul>
108 <% } %>
109 </div>
110
111 </div>
112</aside>
[1b99225]113
114<%# Profile-summary modal — opened by clicking the avatar. Shows photo + title + subtitle
115 + contact details + start date + premium status. %>
116<% if (_avatarUrl) { %>
117<div class="pf-summary">
118 <div class="pf-summary-card" role="dialog" aria-label="<%= _displayName %>">
119 <button type="button" class="pf-summary-close" aria-label="Sluiten">&times;</button>
120 <img class="pf-summary-photo" src="<%= _avatarUrl %>" alt="">
121 <h3 class="pf-summary-name"><%= _displayName %></h3>
122 <span class="pf-summary-prem<%= _isPrem ? ' is-prem' : '' %>"><%= _isPrem ? '★ Premium' : t('profile.free') %></span>
123 <% if (_bioText) { %><p class="pf-summary-bio"><%= _bioText %></p><% } %>
124 <% if (_profileLinks.length) { %>
125 <ul class="pf-summary-links">
126 <% _profileLinks.forEach(function (l) { var meta = _platforms[l.platform]; if (!meta) return; var href = _linkHref(l.platform, l.url); var ext = (l.platform !== 'email' && l.platform !== 'phone'); %>
127 <li>
128 <a href="<%= href %>" <% if (ext) { %>target="_blank" rel="noopener noreferrer"<% } %> style="--brand: <%= meta.brand %>">
129 <span class="pf-summary-ico" aria-hidden="true"><%- meta.svg %></span>
130 <span class="pf-summary-rowtext"><span class="pf-summary-lbl"><%= meta.label %></span><span class="pf-summary-val"><%= _linkVal(l.url) %></span></span>
131 </a>
132 </li>
133 <% }); %>
134 </ul>
135 <% } %>
[7eddb3b]136 <% if (_showFollow) { %>
137 <button type="button" class="pf-summary-follow profile-fedi-link" data-fedi-actor-slug="<%= site.slug %>" aria-label="<%= t('fedi.profile_follow') %>">
138 <svg class="pf-summary-follow-ico" viewBox="151 31 530 530" fill="currentColor" xmlns="http://www.w3.org/2000/svg" aria-hidden="true"><g transform="translate(6.6789703,-32.495842)"><path d="M257.1,266.8c-4.9,9.4-12.6,17.1-22.1,22l121.3,121.8l29.2-14.8L257.1,266.8z M417.1,427.4l-29.2,14.8l61.5,61.7c4.9-9.4,12.6-17.1,22.1-22L417.1,427.4z"/><path d="M557.5,315l-68.7,34.8l5.1,32.4l77.7-39.4C564.1,335.2,559.2,325.5,557.5,315z M448.9,370l-162.4,82.3c7.5,7.6,12.4,17.3,14.1,27.8L454,402.4L448.9,370z"/><path d="M396.7,167.3l-78.4,153l23.1,23.2l83-162C414,179.7,404.3,174.7,396.7,167.3z M298,360l-39.7,77.5c10.5,1.8,20.2,6.7,27.7,14.2l35.1-68.5L298,360z"/><path d="M234.3,289.1c-8,4-16.9,5.9-25.8,5.4c-1.7-0.1-3.3-0.3-5-0.5l23.2,148.2c8-4,16.9-5.9,25.8-5.4c1.7,0.1,3.3,0.3,5,0.5L234.3,289.1z"/><path d="M300.8,480.8c0.5,3.4,0.7,6.9,0.5,10.4c-0.4,7.1-2.3,14-5.5,20.4l148.2,23.8c-0.5-3.4-0.7-6.9-0.5-10.4c0.4-7.1,2.3-14,5.5-20.4L300.8,480.8z"/><path d="M572.1,343.3l-68.4,133.6c10.5,1.8,20.2,6.7,27.7,14.2l68.4-133.6C589.4,355.8,579.7,350.8,572.1,343.3z"/><path d="M478.8,154.4c-4.9,9.4-12.6,17.1-22.1,22l105.9,106.4c4.9-9.4,12.6-17.1,22.1-22L478.8,154.4z"/><path d="M382.1,138.9l-133.9,67.9c7.5,7.6,12.4,17.3,14.1,27.8l133.9-67.9C388.7,159.1,383.8,149.4,382.1,138.9z"/><path d="M456.5,176.6c-8.1,4.1-17.1,6.1-26.2,5.6c-1.5-0.1-3-0.3-4.5-0.5l11.9,76l32.4,5.2L456.5,176.6z M444.5,301.8l28.1,179.6c7.9-3.9,16.7-5.7,25.4-5.2c1.8,0.1,3.6,0.3,5.4,0.6L476.8,307L444.5,301.8z"/><path d="M262.4,235.2c0.6,3.5,0.7,7,0.6,10.6c-0.4,7-2.2,13.9-5.4,20.2l76,12.2l14.9-29.2L262.4,235.2z M392.7,256.1l-14.9,29.2l179.6,28.9c-0.5-3.4-0.7-6.9-0.5-10.3c0.4-7.1,2.3-14.1,5.5-20.5L392.7,256.1z"/><circle cx="433" cy="130.6" r="47"/><circle cx="608.4" cy="306.6" r="47"/><circle cx="495.1" cy="527.8" r="47"/><circle cx="249.7" cy="488.4" r="47"/><circle cx="211.3" cy="242.9" r="47"/></g></svg>
139 <span><%= t('fedi.profile_follow') %></span>
140 </button>
141 <% } %>
[1b99225]142 <% if (_sinceStr) { %><p class="pf-summary-since"><%= t('profile.since') %> <%= _sinceStr %></p><% } %>
143 </div>
144</div>
145<% } %>
[f1ce47a]146<% if (_showFollow) { %>
147<%# Follow-via-fediverse modal — replaces the native prompt() (which looked ugly). %>
148<div class="pf-follow">
149 <div class="pf-follow-card" role="dialog" aria-label="<%= t('fedi.follow_heading') %>">
150 <button type="button" class="pf-follow-cancel pf-follow-x" aria-label="Sluiten">&times;</button>
151 <h3 class="pf-follow-title"><%= t('fedi.follow_heading') %></h3>
152 <p class="pf-follow-sub"><%= t('fedi.remote_prompt') %></p>
153 <input type="text" class="pf-follow-input" inputmode="url" autocomplete="off" autocapitalize="none" spellcheck="false"
154 placeholder="<%= t('fedi.remote_ph') %>" list="pf-follow-servers">
155 <datalist id="pf-follow-servers"><option value="mastodon.social"></option><option value="mastodon.online"></option><option value="mas.to"></option><option value="fosstodon.org"></option><option value="hachyderm.io"></option></datalist>
156 <div class="pf-follow-actions">
157 <button type="button" class="pf-follow-cancel"><%= t('fedi.cancel') %></button>
158 <button type="button" class="pf-follow-go"><%= t('fedi.follow_btn') %></button>
159 </div>
160 </div>
161</div>
162<% } %>
[7c62efb]163<script>
164(function () {
165 if (window.__pcmsFediFollowWired) return;
166 window.__pcmsFediFollowWired = true;
[f1ce47a]167 function modal() { return document.querySelector('.pf-follow'); }
168 function closeM() { var m = modal(); if (m) m.classList.remove('is-open'); }
169 function go() {
170 var m = modal(); if (!m) return;
171 var inp = m.querySelector('.pf-follow-input'), raw = inp ? inp.value : '';
[7c62efb]172 // Strip a full @user@host handle (and any scheme/path) down to the server host.
[f1ce47a]173 var server = String(raw || '').trim().replace(/^@?[^@\s]*@/, '').replace(/^https?:\/\//i, '').replace(/\/.*$/, '').trim();
174 if (!server) { if (inp) inp.focus(); return; }
175 try { localStorage.setItem('pcmsFediServer', server); } catch (e) {}
176 var actor = location.origin + '/ap/users/' + encodeURIComponent(m.getAttribute('data-actor-slug') || '');
[7c62efb]177 location.href = 'https://' + server + '/authorize_interaction?uri=' + encodeURIComponent(actor);
[f1ce47a]178 }
179 document.addEventListener('click', function (e) {
180 var b = e.target.closest && e.target.closest('.profile-fedi-link');
181 if (b) { e.preventDefault();
182 var m = modal(); if (!m) return;
183 m.setAttribute('data-actor-slug', b.getAttribute('data-fedi-actor-slug') || '');
184 var inp = m.querySelector('.pf-follow-input');
185 try { if (inp && !inp.value) inp.value = localStorage.getItem('pcmsFediServer') || ''; } catch (e2) {}
186 m.classList.add('is-open');
187 setTimeout(function () { if (inp) inp.focus(); }, 30);
188 return;
189 }
190 if (e.target.closest && e.target.closest('.pf-follow-go')) { e.preventDefault(); go(); return; }
191 if (e.target.closest && e.target.closest('.pf-follow-cancel')) { e.preventDefault(); closeM(); return; }
192 var open = document.querySelector('.pf-follow.is-open');
193 if (open && e.target === open) closeM(); /* click on backdrop */
194 });
195 document.addEventListener('keydown', function (e) {
196 var m = document.querySelector('.pf-follow.is-open'); if (!m) return;
197 if (e.key === 'Escape') { closeM(); }
198 else if (e.key === 'Enter' && e.target.closest && e.target.closest('.pf-follow')) { e.preventDefault(); go(); }
[7c62efb]199 });
200})();
[00a2bcd]201
[1b99225]202/* Profile summary: click the avatar to open a modal with photo + details. */
[00a2bcd]203(function () {
204 if (window.__pcmsLightboxWired) return; window.__pcmsLightboxWired = true;
[1b99225]205 function close() { var m = document.querySelector('.pf-summary.is-open'); if (m) m.classList.remove('is-open'); }
[00a2bcd]206 document.addEventListener('click', function (e) {
[1b99225]207 if (e.target.closest && e.target.closest('.pf-summary-close')) { e.preventDefault(); close(); return; }
208 var open = document.querySelector('.pf-summary.is-open');
209 if (open && e.target === open) { close(); return; } /* click on backdrop */
210 var t = e.target.closest && e.target.closest('.profile-photo[data-pf-summary]');
[00a2bcd]211 if (!t) return;
212 e.preventDefault();
[1b99225]213 var root = (t.closest && t.closest('#pcms-chrome')) || document;
214 var modal = root.querySelector('.pf-summary') || document.querySelector('.pf-summary');
215 if (modal) modal.classList.add('is-open');
[00a2bcd]216 });
217 document.addEventListener('keydown', function (e) { if (e.key === 'Escape') close(); });
218})();
[7c62efb]219</script>
[7bc636b]220<% } %>
221
222<style>
223/* Profile header (v9 collapse pattern) */
224.profile-header {
225 border-bottom: 1px solid var(--rule);
226 background: var(--paper);
227 padding: 1.5rem 0;
228 transition: padding 250ms cubic-bezier(.4,0,.2,1);
229}
230.profile-header-inner {
231 max-width: 800px;
232 margin: 0 auto;
233 padding: 0 1rem;
234 display: flex;
235 align-items: center;
236 gap: 1.25rem;
237 transition: gap 250ms;
238}
239.profile-photo {
240 flex-shrink: 0;
241 display: block;
242 width: 80px;
243 height: 80px;
[00a2bcd]244 padding: 0;
[7bc636b]245 border-radius: 50%;
246 overflow: hidden;
247 background: var(--paper-2);
248 border: 2px solid var(--rule);
249 transition: width 250ms, height 250ms;
250 cursor: pointer;
[00a2bcd]251 font: inherit;
252 -webkit-appearance: none;
253 appearance: none;
[7bc636b]254}
[00a2bcd]255.profile-photo[data-lightbox] { cursor: zoom-in; }
[7bc636b]256.profile-photo:hover {
257 border-color: var(--accent);
258}
259.profile-photo img {
260 width: 100%;
261 height: 100%;
262 object-fit: cover;
263 pointer-events: none;
264}
265.profile-photo-fallback {
266 display: flex;
267 align-items: center;
268 justify-content: center;
269 width: 100%;
270 height: 100%;
271 font-family: var(--font-display, serif);
272 font-size: 2rem;
273 font-weight: 700;
274 color: var(--ink-soft);
275 background: var(--paper-2);
276 pointer-events: none;
277}
278.profile-photo-fallback--music {
279 color: var(--accent);
280}
281.profile-photo-fallback--music svg {
282 width: 50%;
283 height: 50%;
284}
285.profile-info {
286 flex: 1;
287 min-width: 0;
288}
289.profile-name {
290 font-family: var(--font-display, serif);
291 font-size: 1.75rem;
292 margin: 0 0 0.25rem;
293 line-height: 1.2;
294}
295.profile-name a {
296 color: var(--ink);
297 text-decoration: none;
298}
299.profile-bio {
300 margin: 0;
301 color: var(--ink-soft);
302 font-size: 0.95rem;
303 line-height: 1.4;
304}
305
306/* Compact mode on post / special pages */
307.on-post .profile-header,
308.on-special .profile-header,
309.on-search .profile-header,
310.on-archive .profile-header {
311 padding: 0.75rem 0;
312}
313.on-post .profile-photo,
314.on-special .profile-photo,
315.on-search .profile-photo,
316.on-archive .profile-photo {
317 width: 40px;
318 height: 40px;
319 border-width: 1px;
320}
321.on-post .profile-photo-fallback,
322.on-special .profile-photo-fallback,
323.on-search .profile-photo-fallback,
324.on-archive .profile-photo-fallback {
325 font-size: 1rem;
326}
327.on-post .profile-name,
328.on-special .profile-name,
329.on-search .profile-name,
330.on-archive .profile-name {
331 font-size: 1.1rem;
332 margin: 0;
333}
334.on-post .profile-bio,
335.on-special .profile-bio,
336.on-search .profile-bio,
337.on-archive .profile-bio {
338 display: none;
339}
340
341/* Hide on admin pages */
342.on-admin .profile-header { display: none; }
343
344/* Mobile tweaks */
345@media (max-width: 600px) {
346 .profile-photo { width: 64px; height: 64px; }
347 .profile-photo-fallback { font-size: 1.5rem; }
348 .profile-name { font-size: 1.4rem; }
349}
350
351/* Social / streaming icon row */
352.profile-links {
353 list-style: none;
354 margin: 0.5rem 0 0;
355 padding: 0;
356 display: flex;
357 gap: 0.5rem;
358 flex-wrap: wrap;
359}
360.profile-link {
361 display: inline-flex;
362 align-items: center;
363 justify-content: center;
364 width: 36px;
365 height: 36px;
366 border-radius: 50%;
367 background: var(--paper-2);
368 color: var(--ink-soft);
369 text-decoration: none;
370 transition: background 120ms, color 120ms, transform 100ms ease;
371}
372.profile-link:hover {
373 background: var(--brand, var(--accent));
374 color: white;
375 transform: translateY(-1px);
376}
377.profile-link svg { width: 18px; height: 18px; display: block; }
378
379/* Compact mode collapses social links too (post pages) */
380.on-post .profile-links,
381.on-special .profile-links,
382.on-archive .profile-links { display: none; }
[7c62efb]383
[eb2fe08]384/* Follow-via-fediverse: compact icon button, sits in the links row */
[ce0bedf]385.profile-fedi-link { border: 0; padding: 0; background: var(--paper-2); cursor: pointer; -webkit-appearance: none; appearance: none; }
[066951c]386/* The fediverse logo is an open line-network, so it reads smaller than a solid
387 glyph at 18px — render it larger INSIDE the same 36px circle (circle unchanged). */
[3507b0b]388.profile-fedi-link svg { width: 22px; height: 22px; }
[00a2bcd]389
[1b99225]390/* Profile-summary modal (click the avatar) */
391.profile-photo[data-pf-summary] { cursor: zoom-in; }
392.pf-summary { position: fixed; inset: 0; z-index: 2147483600; display: none;
[00a2bcd]393 align-items: center; justify-content: center; padding: 4vmin;
[1b99225]394 background: rgba(0,0,0,.7); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
395.pf-summary.is-open { display: flex; }
396.pf-summary-card { position: relative; width: 100%; max-width: 380px; max-height: 90vh; overflow-y: auto;
397 background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 20px;
398 padding: 1.75rem 1.5rem; box-shadow: 0 20px 60px rgba(0,0,0,.4); text-align: center; }
399.pf-summary-close { position: absolute; top: .6rem; right: .7rem; width: 36px; height: 36px; border: 0;
400 border-radius: 50%; background: var(--paper-2); color: var(--ink-soft); font-size: 1.5rem; line-height: 1;
401 cursor: pointer; display: flex; align-items: center; justify-content: center; }
402.pf-summary-close:hover { color: var(--ink); }
403.pf-summary-photo { width: 110px; height: 110px; border-radius: 50%; object-fit: cover; margin: 0 auto .9rem;
404 display: block; border: 3px solid var(--paper-2); background: #fff; }
405.pf-summary-name { font-family: var(--font-display, serif); font-size: 1.4rem; margin: 0 0 .35rem; }
406.pf-summary-prem { display: inline-block; margin: 0 0 .7rem; padding: .15rem .6rem; border-radius: 999px;
407 font-size: .75rem; font-weight: 600; background: var(--paper-2); color: var(--ink-soft); }
408.pf-summary-prem.is-prem { background: color-mix(in srgb, #e8b04b 22%, transparent); color: #b8860b; }
409.pf-summary-bio { color: var(--ink-soft); font-size: .92rem; line-height: 1.5; margin: 0 0 1rem; }
410.pf-summary-links { list-style: none; padding: 0; margin: .25rem 0 1rem; display: flex; flex-direction: column; gap: .4rem; text-align: left; }
411.pf-summary-links a { display: flex; align-items: center; gap: .7rem; padding: .5rem .7rem; border-radius: 12px;
412 text-decoration: none; color: var(--ink); background: var(--paper-2); transition: background .12s; }
413.pf-summary-links a:hover { background: color-mix(in srgb, var(--brand, var(--accent)) 16%, var(--paper-2)); }
414.pf-summary-ico { flex: 0 0 22px; width: 22px; height: 22px; color: var(--brand, var(--ink-soft)); display: inline-flex; }
415.pf-summary-ico svg { width: 22px; height: 22px; }
416.pf-summary-rowtext { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
417.pf-summary-lbl { font-size: .72rem; font-weight: 600; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .03em; }
418.pf-summary-val { font-size: .9rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
419.pf-summary-since { color: var(--ink-soft); font-size: .8rem; margin: 0; }
[7eddb3b]420.pf-summary-follow { display: inline-flex; align-items: center; gap: .5rem; margin: .2rem auto 1rem; padding: .5rem 1.15rem;
421 border: 1.5px solid var(--accent); border-radius: 999px; background: transparent; color: var(--accent);
422 font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; transition: background .15s, color .15s; }
423.pf-summary-follow:hover { background: var(--accent); color: var(--paper); }
424.pf-summary-follow-ico { width: 18px; height: 18px; flex: 0 0 auto; }
[f1ce47a]425.pf-follow { position: fixed; inset: 0; z-index: 2147483601; display: none; align-items: center; justify-content: center; padding: 1rem; background: rgba(0,0,0,.55); }
426.pf-follow.is-open { display: flex; }
427.pf-follow-card { position: relative; width: 100%; max-width: 380px; text-align: left;
428 background: var(--paper); color: var(--ink); border: 1px solid var(--rule); border-radius: 16px;
429 padding: 1.5rem 1.4rem 1.3rem; box-shadow: 0 18px 50px rgba(0,0,0,.4); }
430.pf-follow-x { position: absolute; top: .55rem; right: .65rem; width: 2rem; height: 2rem; border: 0; border-radius: 999px;
431 background: transparent; color: var(--ink-soft); font-size: 1.4rem; line-height: 1; cursor: pointer; }
432.pf-follow-title { margin: 0 0 .35rem; font-size: 1.15rem; }
433.pf-follow-sub { margin: 0 0 .8rem; color: var(--ink-soft); font-size: .86rem; line-height: 1.45; }
434.pf-follow-input { width: 100%; box-sizing: border-box; padding: .6rem .8rem; border: 1.5px solid var(--rule);
435 border-radius: 10px; background: var(--paper-2); color: var(--ink); font: inherit; font-size: .95rem; }
436.pf-follow-input:focus { outline: none; border-color: var(--accent); }
437.pf-follow-actions { display: flex; justify-content: flex-end; gap: .6rem; margin-top: 1rem; }
438.pf-follow-actions button { padding: .5rem 1.1rem; border-radius: 999px; font: inherit; font-weight: 600; font-size: .88rem; cursor: pointer; border: 0; }
439.pf-follow-actions .pf-follow-cancel { background: transparent; border: 1.5px solid var(--rule); color: var(--ink); }
440.pf-follow-actions .pf-follow-go { background: var(--accent); color: var(--paper); }
441.pf-follow-actions .pf-follow-go:hover { filter: brightness(1.06); }
[7bc636b]442</style>
Note: See TracBrowser for help on using the repository browser.