Files
njump/templates/note.html
2023-10-21 07:45:44 -03:00

138 lines
4.1 KiB
HTML

<!DOCTYPE html>
<html class="theme--default">
<meta charset="UTF-8" />
<head>
<title>{{.TitleizedContent}}</title>
<title>{{.Nevent}} by {{.Metadata.Name}} is this note nostr ”nevent"</title>
<meta property="og:title" content="{{.Title}}" />
{{ if eq .Style "twitter" }}
<meta name="twitter:title" content="{{.TwitterTitle}}" />
{{ end }}
<meta property="og:site_name" content="{{.AuthorLong}}" />
{{ if not (eq "" .TextImageURL) }}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="@nostrprotocol" />
<meta property="og:image" content="{{.TextImageURL}}" />
<meta name="twitter:image" content="{{.TextImageURL}}" />
{{ else }}
<!---->
<meta property="twitter:card" content="summary" />
{{ if not (eq "" .Image) }}
<meta property="og:image" content="{{.Image}}" />
<meta name="twitter:image" content="{{.Proxy}}{{.Image}}" />
{{ end }} {{ if not (eq "" .Video) }}
<meta property="og:video" content="{{.Video}}" />
<meta property="og:video:secure_url" content="{{.Video}}" />
<meta property="og:video:type" content="video/{{.VideoType}}" />
{{ end }} {{ end }}
<!---->
{{ if not (eq "" .Description) }}
<meta property="og:description" content="{{.Description}}" />
<meta name="twitter:description" content="{{.Description}}" />
{{ end }}
<link rel="canonical" href="https://njump.me/{{.Nevent }}" />
<!---->
{{ if not (eq "" .Oembed) }}
<link
rel="alternate"
type="application/json+oembed"
href="{{.Oembed}}&format=json"
/>
<link
rel="alternate"
type="text/xml+oembed"
href="{{.Oembed}}&format=xml"
/>
{{ end }}
<!---->
{{template "head_common" .}}
</head>
<body class="note">
{{template "top" .}}
<div class="container_wrapper">
<div class="container">
<div class="column column_content">
<header class="profile_intro">
<a href="/{{.Npub}}">
<div class="pic-wrapper">
<img class="pic" src="{{.Metadata.Picture}}" />
</div>
<div class="info-wrapper">
<div class="name">
{{.Metadata.Name}}
<!---->
{{if not (eq .Metadata.Name .Metadata.DisplayName)}}
<span class="display">{{.Metadata.DisplayName}}</span>
{{end}}
</div>
<div class="npub">{{.NpubShort}}</div>
</div>
</a>
</header>
<div class="published_at">{{.CreatedAt}}</div>
<div class="reply_of">
{{ if not (eq "" .ParentLink) }} In reply to {{ .ParentLink }} {{
end }}
</div>
<div class="field separator"></div>
<article class="field content">
{{ if (not (eq "" .Subject))}}
<h1>{{.Subject}}</h1>
{{ else }}
<h1 class="h">
{{.Metadata.Name}} on Nostr: {{.TitleizedContent}}
</h1>
{{ end }}
<!-- main content -->
{{ .Content }}
</article>
<div class="field separator"></div>
<div class="field">
<div class="label">Author Public key</div>
{{.Npub}}
</div>
{{ if not (eq 0 (len .SeenOn)) }}
<div class="field">
<div class="label">Seen on</div>
{{ range .SeenOn }}<a href="/r/{{.}}">{{.}}</a>
{{ end }}
</div>
{{ end }}
<div class="field advanced-switch-wrapper">
<input
type="checkbox"
id="advanced-switch"
class="advanced-switch"
/>
<label for="advanced-switch">X</label>
<label for="advanced-switch">Show more details</label>
</div>
{{template "details" .}}
<div class="field separator"></div>
</div>
{{template "clients" .ClientsPartial}}
</div>
</div>
{{template "footer" .}}
<script src="/njump/static/scripts.js"></script>
</body>
</html>