46 lines
1.8 KiB
HTML
46 lines
1.8 KiB
HTML
{{ define "main" }}
|
|
<div class="container">
|
|
<main class="post">
|
|
<article>
|
|
<header class="post-header">
|
|
<h1 class="post-title">{{ .Title }}</h1>
|
|
{{ with .Resources.GetMatch .Params.banner }}
|
|
{{ $image := .Fit "1920x1080" }}
|
|
<img class="post-banner" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}">
|
|
{{ end }}
|
|
<div class="post-meta">
|
|
{{ with .Date }}
|
|
{{ $ISO_time := dateFormat "2006-01-02T15:04:05-07:00" . }}
|
|
<time datetime="{{ $ISO_time }}" itemprop="datePublished"> {{ . | time.Format ":date_medium" }} </time>
|
|
{{ end }}
|
|
{{ with .Params.sn_id }}
|
|
<span
|
|
hx-get="
|
|
{{- if not hugo.IsProduction -}}http://localhost:1337{{- end -}}
|
|
/api/content_meta?sn_id={{- . -}}
|
|
"
|
|
hx-trigger="load"
|
|
hx-swap="outerHTML"
|
|
>
|
|
<span class="px-1">|</span>
|
|
<span>
|
|
<a
|
|
class="underline"
|
|
href="https://stacker.news/items/{{- . -}}"
|
|
target="_blank"
|
|
rel="noopener noreferrer me">0 comments</a>
|
|
</span>
|
|
<span class="px-1">|</span>
|
|
<span>0 sats</span>
|
|
<span>
|
|
{{ end }}
|
|
</div>
|
|
</header>
|
|
<div class="post-content">
|
|
{{ .Content }}
|
|
</div>
|
|
</article>
|
|
</main>
|
|
</div>
|
|
{{ end }}
|