<% // Show profile-header unless we're on an admin page or the site explicitly // disabled it via profile_enabled=0. const _showProfile = site && (site.profile_enabled === undefined || site.profile_enabled !== 0) && !(typeof bodyClass !== 'undefined' && bodyClass.indexOf('on-admin') >= 0); // profile_name and profile_bio used to be optional overrides exposed in the // admin form. P62 removed those form fields — title and description are the // single source of truth. We still consult the override columns first for // backward compat with any legacy data, but the form no longer writes them. const _displayName = (site && (site.profile_name || site.title)) || ''; const _bioText = (site && (site.profile_bio || site.description || site.tagline)) || ''; // Parse profile_links JSON column once. let _profileLinks = []; if (site && site.profile_links) { try { _profileLinks = JSON.parse(site.profile_links) || []; } catch (e) { _profileLinks = []; } } // Profile-summary (lightbox) helpers — used by the avatar + the summary modal. const _base = (typeof siteUrlBase !== 'undefined' && siteUrlBase) ? siteUrlBase : ''; const _avatarUrl = (site && site.profile_photo) || ((typeof siteOwnerAvatar !== 'undefined' && siteOwnerAvatar) || ''); const _platforms = (typeof platforms_catalog !== 'undefined' && platforms_catalog) || {}; const _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; }; const _linkVal = function (u) { return String(u || '').replace(/^(mailto:|tel:|https?:\/\/)/i, '').replace(/\/$/, ''); }; const _isPrem = (typeof isPremium !== 'undefined' && isPremium); let _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) {} %> <% if (_showProfile) { %> <%# Profile-summary modal — opened by clicking the avatar. Shows photo + title + subtitle + contact details + start date + premium status. %> <% if (_avatarUrl) { %>
<% } %> <% if (_showFollow) { %> <%# Follow-via-fediverse modal — replaces the native prompt() (which looked ugly). %>
<% } %> <% } %>