Files
njump/templates/profile.html
2023-10-22 08:47:10 -03:00

127 lines
4.1 KiB
HTML

<!DOCTYPE html>
<html class="theme--default">
<meta charset="UTF-8" />
<head>
<title>{{.Metadata.Name}} / {{.Metadata.DisplayName}} is on nostr</title>
<meta
name="description"
content="{{.Npub}} is {{.Metadata.Name}} / {{.Metadata.DisplayName}} public key on nostr"
/>
<meta property="og:title" content="{{.Title}}" />
<meta property="og:site_name" content="{{.Npub}}" />
{{ if not (eq "" .Metadata.Picture) }}
<meta property="og:image" content="{{.Metadata.Picture}}" />
<meta property="twitter:image" content="{{.Proxy}}{{.Metadata.Picture}}" />
{{end}} {{ if not (eq "" .Metadata.About) }}
<meta property="og:description" content="{{.Metadata.About}}" />
{{end}}
<meta property="twitter:card" content="summary" />
<link rel="canonical" href="https://njump.me/{{.Npub}}" />
<link
rel="sitemap"
type="application/xml"
title="Sitemap for {{.Npub}}"
href="/{{.Npub}}.Xml"
/>
{{template "head_common" .}}
</head>
<body class="profile">
{{template "top" .}}
<div class="container_wrapper">
<div class="container">
<header class="column columnA">
<div
class="info-wrapper"
_="on scroll from window get #profile_name then call it.getBoundingClientRect() then if result.top is less than result.height / -2 set me.style.display to 'block' otherwise set me.style.display to 'none' end"
>
<div class="name">
{{.Metadata.Name}} {{if not (eq .Metadata.Name
.Metadata.DisplayName)}}
<span class="display">{{.Metadata.DisplayName}}</span>
{{end}}
</div>
</div>
<div class="pic-wrapper">
<img class="pic" src="{{.Metadata.Picture}}" />
</div>
</header>
<div class="column column_content">
<header class="field info-wrapper">
<h1 id="profile_name" class="name">
{{.Metadata.Name}} {{if not (eq .Metadata.Name
.Metadata.DisplayName)}}
<span class="display">{{.Metadata.DisplayName}}</span>
{{end}}
</h1>
</header>
<div class="field separator long"></div>
<div class="field">
<a href="{{.NormalizedAuthorWebsiteURL}}">{{.Metadata.Website}}</a>
</div>
<div class="field about">{{.RenderedAuthorAboutText}}</div>
<div class="field separator"></div>
<div class="field">
<div class="label">Public key</div>
{{.Npub}}
</div>
<div class="field">
<div class="label">NIP-05</div>
{{.Metadata.NIP05}}
</div>
<div class="field">
<div class="label">LN Address</div>
{{.Metadata.LUD16}}
</div>
{{ if not (eq 0 (len .AuthorRelays)) }}
<div class="field">
<div class="label">Posting on these relays</div>
{{range $index, $element := .AuthorRelays}}
<a href="/r/{{$element}}" class="button">{{$element}}</a>
{{end}}
</div>
{{ end }}
<!---->
{{template "details" .}}
<div class="field last_update">
Last update:<br />
{{.CreatedAt}}
</div>
{{if not (eq 0 (len .LastNotes))}}
<div class="field separator"></div>
<nav class="field last_notes">
<h2>Last Notes</h2>
{{range $i, $ee := .LastNotes}}
<a href="/{{$ee.Nevent}}" class="note">
<div class="header">
<div class="published_at">{{$ee.CreatedAtStr}}</div>
{{if $ee.IsReply}}
<div class="is_reply">- reply</div>
{{end}}
</div>
<div class="content">{{$ee.Preview}}</div>
</a>
{{end}}
</nav>
{{end}}
<div class="field separator"></div>
</div>
{{template "clients" .ClientsPartial}}
</div>
</div>
{{template "footer" .}}
</body>
</html>