feat: resolve NIP-19 identifiers in article content

- Add nostrUriResolver utility to detect and replace nostr: URIs
- Support npub, note, nprofile, nevent, and naddr identifiers
- Convert nostr: URIs to clickable njump.me links
- Process markdown before rendering to handle nostr mentions
- Add CSS styling for nostr-uri-link class
- Implements NIP-19 and NIP-27 (nostr: URI scheme)

Nostr-native articles can now contain references like:
- nostr:npub1... → @npub1abc...
- nostr:note1... → note:note1abc...
- nostr:naddr1... → article:identifier

All identifiers become clickable links to njump.me
This commit is contained in:
Gigi
2025-10-11 01:42:03 +01:00
parent 6783ff23f9
commit 8a69d5bc6b
4 changed files with 167 additions and 4 deletions

View File

@@ -479,6 +479,23 @@ body.mobile-sidebar-open {
text-decoration: underline;
}
.nostr-uri-link {
color: #007bff;
text-decoration: none;
font-family: monospace;
background: #f8f9fa;
padding: 0.2rem 0.4rem;
border-radius: 4px;
font-size: 0.9em;
word-wrap: break-word;
overflow-wrap: break-word;
}
.nostr-uri-link:hover {
background: #e9ecef;
text-decoration: underline;
}
.logout-button {
background: #dc3545;
color: white;