Files
njump/templates/note.html

141 lines
4.4 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="sm:flex sm:justify-center sm:items-center mx-auto px-4 sm:px-0">
<div
class="sm:flex w-full sm:w-9/12 px-4 justify-between overflow-visible gap-10 lg:gap-20 print:w-full"
>
<div class="column column_content">
<header class="max-w-full mb-4">
<a class="flex items-center flex-wrap" href="/{{.Npub}}">
<div
class="mr-2 sm:mr-4 basis-1/6 print:basis-1-12 max-w-full imgclip overflow-hidden"
>
<img class="block w-full h-auto" src="{{.Metadata.Picture}}" />
</div>
<div class="block sm:grow print:text-base">
<div class="text-sm sm:text-2xl">
{{.Metadata.Name}}
<!---->
{{if not (eq .Metadata.Name .Metadata.DisplayName)}}
<span
class="text-sm sm:text-xl text-neutral-300 dark:text-slate-400"
>{{.Metadata.DisplayName}}</span
>
{{end}}
</div>
<div
class="text-sm sm:text-base text-neutral-300 dark:text-slate-400"
>
{{.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 | prose dark:prose-invert sm:prose-a:text-justify prose-headings:font-light;"
>
{{ if (not (eq "" .Subject))}}
<h1 class="text-2xl">{{.Subject}}</h1>
{{ else }}
<h1 class="hidden">
{{.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 }}
<!---->
{{template "details" .}}
<div class="field separator"></div>
</div>
{{template "clients" .ClientsPartial}}
</div>
</div>
{{template "footer" .}}
</body>
</html>