GoBlog/templates/summaryandpostmeta.gohtml

19 lines
1.5 KiB
Plaintext

{{ define "summaryandpostmeta" }}
{{ $section := (index .Blog.Sections .Data.Section) }}
{{ if .Data.Published }}<div>{{ string .Blog.Lang "publishedon" }} <time class="dt-published" datetime="{{ dateformat .Data.Published "2006-01-02T15:04:05Z07:00"}}">{{ isodate .Data.Published }}</time>{{ if $section }} in <a href="{{ .Blog.RelativePath $section.Name }}">{{ mdtitle $section.Title }}</a>{{ end }}</div>{{ end }}
{{ if .Data.Updated }}<div>{{ string .Blog.Lang "updatedon" }} <time class="dt-updated" datetime="{{ dateformat .Data.Updated "2006-01-02T15:04:05Z07:00"}}">{{ isodate .Data.Updated }}</time></div>{{ end }}
{{ if replylink .Data }}
<div>{{ string .Blog.Lang "replyto" }}: <a class="u-in-reply-to" href="{{ replylink .Data }}" target="_blank" rel="noopener">{{ with (replytitle .Data) }}{{ . }}{{ else }}{{ replylink .Data }}{{ end }}</a></div>
{{ end }}
{{ if likelink .Data }}
<div>{{ string .Blog.Lang "likeof" }}: <a class="u-like-of" href="{{ likelink .Data }}" target="_blank" rel="noopener">{{ with (liketitle .Data) }}{{ . }}{{ else }}{{ likelink .Data }}{{ end }}</a></div>
{{ end }}
{{ $geo := geouri .Data }}
{{ if $geo }}
<div>📍 <a class="p-location h-geo" href="{{ geolink $geo }}" target="_blank" rel="nofollow noopener noreferrer">
<span class="p-name">{{ geotitle $geo .Blog.Lang }}</span>
<data class="p-longitude" value="{{ $geo.Longitude }}" />
<data class="p-latitude" value="{{ $geo.Latitude }}" />
</a></div>
{{ end }}
{{ end }}