{{define "home"}}
{{if .Policy.Icon}}{{end}}

{{or .Policy.Name .Slug}}

{{.URL}} | {{template "nostrKey" .Identity}}
{{if .Policy.Contact}}{{end}} {{if .Policy.Tags}}{{end}} {{if .Policy.LanguageTags}}{{end}} {{if .Policy.RelayCountries}}{{end}}
contact{{.Policy.Contact}}
tags{{range .Policy.Tags}}#{{.}}{{end}}
languages{{join .Policy.LanguageTags ", "}}
countries{{join .Policy.RelayCountries ", "}}
policies{{if .Policy.PostingPolicy}}posting | {{end}}{{if .Policy.PrivacyPolicy}}privacy | {{end}}terms
reads{{.Policy.Reads}}
writes{{.Policy.Writes}}
{{if .Policy.Description}}

About

{{markdown .Policy.Description}} {{end}}{{if .Connections}}

Connect

Open this relay in an app. Each card is a way in; sign in to see the ones made for members.

{{range .Connections}}{{$c := asMap .}}

{{str (index $c "title")}} {{str (index $c "app")}}{{with str (index $c "where")}}, {{.}}{{end}}{{if ne (str (index $c "visibility")) "public"}} | {{str (index $c "visibility")}}{{end}}

{{str (index $c "about")}}

{{range index $c "inputs"}}{{$i := asMap .}} {{end}}

{{range index $c "links"}}{{$l := asMap .}}{{if str (index $l "href")}}{{str (index $l "label")}} {{else}} {{end}}{{end}}{{if index $c "hidden"}}sign in for {{str (index $c "hidden")}} more{{end}}

{{with str (index $c "qr")}}
QR codeQR code
{{end}}
{{end}}{{end}}
{{end}} {{define "signin"}}

{{if and .Actor (.Query.Get "connect")}}Connect your signer{{else if .Actor}}Your account{{else}}Sign in{{end}}

{{if .Notice}}

{{.Notice}}

{{end}} {{if .Actor}}

Signed in as {{template "nostrKey" .Actor}}.

Open your account | Chat

{{if not (.Query.Get "connect")}}

Connect a signer to restore signing without signing out.

{{end}} {{if .Query.Get "connect"}}

Connect the signer for this account. Your sign-in session stays active.

{{template "signerControls" .}}{{else}}

Open Menu on a phone, or use the desktop footer, to sign out.

{{end}} {{else}}

Use a browser extension, or connect Amber on your phone. The relay never sees a private key.

{{template "signerControls" .}} {{end}}
{{end}} {{define "account"}}

Account

Manage your profile, chat preferences and relay lists.

signed in as{{template "nostrName" .Actor}}
profileEdit your profile

Chat preferences

Show when you are online or typing in chat.

Your relay lists

Choose where other Nostr clients find your notes, messages and files. Existing entries stay.

Relay list NIP-65where clients read your notes and send you mentions
DM inbox NIP-17where people send you private messages
Search relays NIP-51where clients run your searches
Blossom servers BUD-03where clients upload and look for your files
{{end}} {{define "signerControls"}}

Phone signer

Scan the QR code with Amber and approve the connection and sign-in request. You will return to the page you opened.

Keeps the phone signer connected after the app closes. Sign out to forget it.

Bunker URL

{{end}} {{define "inbox"}}

Inbox

Events addressed to this signed-in key, subject to the same private-event gates as websocket queries.

{{if .Error}}{{template "alert" .Error}}{{else}}{{template "eventList" .}}{{end}}
{{end}} {{define "outbox"}}

Outbox

Events authored by this signed-in key.

{{if .Error}}{{template "alert" .Error}}{{else}}{{template "eventList" .}}{{end}}
{{end}} {{define "search"}}

Search

{{if .Error}}{{template "alert" .Error}} {{else if .Feed}}

Results

{{template "eventList" .}} {{else if .Query.Get "q"}}

No matching events.

{{end}}
{{end}} {{define "articles"}}

Articles

Long-form NIP-23 events published on this relay.

{{if .Error}}{{template "alert" .Error}}{{else}}{{template "eventList" .}}{{end}}

Atom feed | JSON feed

{{end}} {{define "event"}}

Event

{{if .Feed}}{{template "eventList" .}}{{else}}{{template "nostrEvent" .Event}}{{end}}

Atom feed | JSON feed

{{end}} {{define "view"}}

View: {{.View}}

{{template "jsonView" .Event}}
{{end}} {{define "invite"}}

Join this relay

This invite is claimed with one signature from your Nostr signer. The relay never receives a private key.

{{if .Policy.JoinTerms}}

Before you join

{{.Policy.JoinTerms}}
{{end}} {{if .Policy.JoinTerms}} {{end}}
{{end}} {{define "terms"}}

Terms

{{if .Policy.JoinTerms}}{{markdown .Policy.JoinTerms}}{{else}}

This relay has not published terms.

{{end}}
{{end}} {{define "private"}}

Private messages

Sign in with a Nostr client to view addressed private events.

{{end}} {{define "media"}}

Media

Blossom uploads and NIP-96 metadata are available from compatible clients.

{{end}} {{define "marmot"}}

Marmot

Marmot group state is served when the feature is enabled.

{{end}} {{define "grasp"}}

GRASP

Repository state and relay capabilities are served through the GRASP endpoints.

{{end}}