+
+ Events
+ {#if showSidePanel}
+
+ Close Details
+
+ {/if}
+
+
+
+ Search and view any event on the Nostr network. Enter an npub, nprofile, nevent, naddr, note,
+ pubkey, or eventID. You can also search for events by d-tag using the
+ format "d:tag-name", t-tags with "t:tag-name", or profiles by name with "n:name".
+
+
+
Visit the
+ Compose page to create new events.
+
+
+
+
+ {#if secondOrderSearchMessage}
+
+ {secondOrderSearchMessage}
+
+ {/if}
+
+ {#if searchResults.length > 0}
+
+
+ {#if searchType === "n"}
+ Search Results for name: "{searchTerm && searchTerm.length > 50 ? searchTerm.slice(0, 50) + '...' : searchTerm || ''}" ({searchResults.length} profiles)
+ {:else if searchType === "t"}
+ Search Results for t-tag: "{searchTerm && searchTerm.length > 50 ? searchTerm.slice(0, 50) + '...' : searchTerm || ''}" ({searchResults.length}
+ events)
+ {:else}
+ Search Results for d-tag: "{(() => {
+ const term = searchTerm || dTagValue?.toLowerCase() || '';
+ return term.length > 50 ? term.slice(0, 50) + '...' : term;
+ })()}" ({searchResults.length} events)
+ {/if}
+
+
+ {#each searchResults as result, index}
+
+
+ {@const profileData = parseProfileContent(result)}
+ {/each}
+
+
+ {/if}
+
+ {#if secondOrderResults.length > 0}
+
+
+ Second-Order Events (References, Replies, Quotes) ({secondOrderResults.length}
+ events)
+
+ {#if (searchType === "n" || searchType === "d") && secondOrderResults.length === 100}
+
+ Showing the 100 newest events. More results may be available.
+
+ {/if}
+
+ Events that reference, reply to, highlight, or quote the original
+ events.
+
+
+ {#each secondOrderResults as result, index}
+ {@const profileData = parseProfileContent(result)}
+
handleEventFound(result)}
+ >
+
+
+
Reference {index + 1}
+
Kind: {result.kind}
+ {#if result.pubkey && communityStatus[result.pubkey]}
+
+ {:else}
+
+ {/if}
+
+ {@render userBadge(
+ toNpub(result.pubkey) as string,
+ profileData?.display_name || profileData?.name,
+ )}
+
+
+ {result.created_at
+ ? new Date(
+ result.created_at * 1000,
+ ).toLocaleDateString()
+ : "Unknown date"}
+
+
+
+ {getReferenceType(
+ result,
+ originalEventIds,
+ originalAddresses,
+ )}
+
+ {#if result.kind === 0 && profileData}
+
+ {#if profileData.picture}
+
{
+ (e.target as HTMLImageElement).style.display = 'none';
+ }}
+ />
+ {:else}
+
+
+ {(profileData.display_name || profileData.name || result.pubkey.slice(0, 1)).toUpperCase()}
+
+
+ {/if}
+
+ {#if profileData.display_name || profileData.name}
+
+ {profileData.display_name || profileData.name}
+
+ {/if}
+ {#if profileData.about}
+
+ {profileData.about}
+
+ {/if}
+
+
+ {:else}
+ {#if getSummary(result)}
+
+ {getSummary(result)}
+
+ {/if}
+ {#if getDeferralNaddr(result)}
+
+ Read
+ {
+ e.stopPropagation();
+ navigateToPublication(
+ getDeferralNaddr(result) || "",
+ );
+ }}
+ onkeydown={(e) => {
+ if (e.key === "Enter" || e.key === " ") {
+ e.preventDefault();
+ e.stopPropagation();
+ navigateToPublication(
+ getDeferralNaddr(result) || "",
+ );
+ }
+ }}
+ tabindex="0"
+ role="button"
+ >
+ {getDeferralNaddr(result)}
+
+
+ {/if}
+ {#if isAddressableEvent(result)}
+
+
+
+ {/if}
+ {#if result.content}
+
+ {result.content.slice(0, 200)}{result.content.length >
+ 200
+ ? "..."
+ : ""}
+
+ {/if}
+ {/if}
+
+
+ {/each}
+
+
+ {/if}
+
+ {#if tTagResults.length > 0}
+
+
+ Search Results for t-tag: "{searchTerm ||
+ dTagValue?.toLowerCase()}" ({tTagResults.length} events)
+
+
+ Events that are tagged with the t-tag.
+
+
+ {#each tTagResults as result, index}
+ {@const profileData = parseProfileContent(result)}
+
handleEventFound(result)}
+ >
+
+
+
Tagged Event {index + 1}
+
Kind: {result.kind}
+ {#if result.pubkey && communityStatus[result.pubkey]}
+
+ {:else}
+
+ {/if}
+
+ {@render userBadge(
+ toNpub(result.pubkey) as string,
+ profileData?.display_name || profileData?.name,
+ )}
+
+
+ {result.created_at
+ ? new Date(
+ result.created_at * 1000,
+ ).toLocaleDateString()
+ : "Unknown date"}
+
+
+ {#if result.kind === 0 && profileData}
+
+ {#if profileData.picture}
+
{
+ (e.target as HTMLImageElement).style.display = 'none';
+ }}
+ />
+ {:else}
+
+
+ {(profileData.display_name || profileData.name || result.pubkey.slice(0, 1)).toUpperCase()}
+
+
+ {/if}
+
+ {#if profileData.display_name || profileData.name}
+
+ {profileData.display_name || profileData.name}
+
+ {/if}
+ {#if profileData.about}
+
+ {profileData.about}
+
+ {/if}
+
+
+ {:else}
+ {#if getSummary(result)}
+
+ {getSummary(result)}
+
+ {/if}
+ {#if getDeferralNaddr(result)}
+
+ Read
+ {
+ e.stopPropagation();
+ navigateToPublication(
+ getDeferralNaddr(result) || "",
+ );
+ }}
+ onkeydown={(e) => {
+ if (e.key === "Enter" || e.key === " ") {
+ e.preventDefault();
+ e.stopPropagation();
+ navigateToPublication(
+ getDeferralNaddr(result) || "",
+ );
+ }
+ }}
+ tabindex="0"
+ role="button"
+ >
+ {getDeferralNaddr(result)}
+
+
+ {/if}
+ {#if isAddressableEvent(result)}
+
+
+
+ {/if}
+ {#if result.content}
+
+ {result.content.slice(0, 200)}{result.content.length >
+ 200
+ ? "..."
+ : ""}
+
+ {/if}
+ {/if}
+
+
+ {/each}
+
+
+ {/if}
+
+