Changeset 7c62efb in Klonkt for src/views/partials
- Timestamp:
- 06/25/2026 09:10:27 PM (3 months ago)
- Branches:
- main
- Children:
- fc2b68b
- Parents:
- 8ad1784
- File:
-
- 1 edited
-
src/views/partials/profile-header.ejs (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/views/partials/profile-header.ejs
r8ad1784 r7c62efb 88 88 </ul> 89 89 <% } %> 90 91 <button type="button" class="profile-fedi-btn" data-fedi-actor-slug="<%= site.slug %>"> 92 🐘 <%= t('fedi.profile_follow') %> 93 </button> 90 94 </div> 91 95 92 96 </div> 93 97 </aside> 98 <script> 99 (function () { 100 if (window.__pcmsFediFollowWired) return; 101 window.__pcmsFediFollowWired = true; 102 document.addEventListener('click', function (e) { 103 var b = e.target.closest && e.target.closest('.profile-fedi-btn'); 104 if (!b) return; 105 var raw = window.prompt(<%- JSON.stringify(t('fedi.remote_prompt')) %>, ''); 106 if (!raw) return; 107 // Strip a full @user@host handle (and any scheme/path) down to the server host. 108 var server = raw.trim().replace(/^@?[^@\s]*@/, '').replace(/^https?:\/\//i, '').replace(/\/.*$/, '').trim(); 109 if (!server) return; 110 var actor = location.origin + '/ap/users/' + encodeURIComponent(b.getAttribute('data-fedi-actor-slug') || ''); 111 location.href = 'https://' + server + '/authorize_interaction?uri=' + encodeURIComponent(actor); 112 }); 113 })(); 114 </script> 94 115 <% } %> 95 116 … … 250 271 .on-special .profile-links, 251 272 .on-archive .profile-links { display: none; } 273 274 /* Follow-via-fediverse button */ 275 .profile-fedi-btn { 276 margin-top: 0.65rem; 277 display: inline-flex; align-items: center; gap: 0.4rem; 278 padding: 0.4rem 0.85rem; 279 border: 1px solid var(--rule); 280 border-radius: 999px; 281 background: var(--paper-2); 282 color: var(--ink-soft); 283 font: inherit; font-size: 0.85rem; font-weight: 600; 284 cursor: pointer; 285 transition: border-color 120ms, color 120ms, background 120ms; 286 } 287 .profile-fedi-btn:hover { border-color: var(--accent); color: var(--ink); } 288 .on-post .profile-fedi-btn, 289 .on-special .profile-fedi-btn, 290 .on-search .profile-fedi-btn, 291 .on-archive .profile-fedi-btn { display: none; } 252 292 </style>
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)