2023-07-25 19:48:30 +00:00
|
|
|
<div class="posts">
|
2023-07-29 19:26:45 +00:00
|
|
|
{{ $apiBaseURL := .ApiBaseUrl }}
|
2023-07-30 13:40:50 +00:00
|
|
|
{{ with .Garbage }}
|
2023-07-25 19:48:30 +00:00
|
|
|
<article class="post on-list">
|
2023-07-30 04:29:26 +00:00
|
|
|
<h1 class="post-title">{{ .Title }}</h1>
|
2023-07-25 19:48:30 +00:00
|
|
|
<div class="post-meta">
|
2023-07-29 16:36:24 +00:00
|
|
|
{{- with .Username -}}
|
2023-07-29 19:26:45 +00:00
|
|
|
<span>Submitter: {{ . }}</span>
|
2023-07-25 19:48:30 +00:00
|
|
|
{{- end -}}
|
2023-07-29 16:36:24 +00:00
|
|
|
{{- with .CreatedAt -}}
|
|
|
|
|
<time class="post-date">
|
|
|
|
|
{{- .Format "2006-01-02" -}}
|
|
|
|
|
</time>
|
|
|
|
|
{{- end -}}
|
2023-07-30 04:29:26 +00:00
|
|
|
{{if .Url}}<a href={{ .Url }}>Link</a>{{ end }}
|
2023-07-29 20:24:19 +00:00
|
|
|
{{ if eq .OwnerID.String $.UserID }}
|
2023-07-29 19:26:45 +00:00
|
|
|
<a href="#"
|
|
|
|
|
hx-get="{{ $apiBaseURL }}/garbage/{{ .ID }}/edit"
|
|
|
|
|
hx-target="#content"
|
|
|
|
|
hx-swap="outerHTML">Edit</a>
|
|
|
|
|
{{ end }}
|
2023-07-25 19:48:30 +00:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div class="post-content">
|
|
|
|
|
{{ .Content }}
|
|
|
|
|
</div>
|
2023-07-30 04:29:26 +00:00
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
|
<div class="post-meta">
|
|
|
|
|
{{ if .Metadata.tags }}
|
|
|
|
|
<span>tags</span>
|
|
|
|
|
<span>
|
|
|
|
|
{{ range .Metadata.tags }}
|
|
|
|
|
{{- . -}},
|
|
|
|
|
{{ end }}
|
|
|
|
|
</span>
|
|
|
|
|
{{ end }}
|
|
|
|
|
</div>
|
2023-07-25 19:48:30 +00:00
|
|
|
</article>
|
|
|
|
|
{{end}}
|
|
|
|
|
</div>
|
2023-07-28 01:14:38 +00:00
|
|
|
|
|
|
|
|
{{- with .Alert -}}
|
|
|
|
|
<div id="alert" remove-me="5s" class="alert">{{ . }}</div>
|
|
|
|
|
{{ end }}
|