Browse Source

Add tooltips for dates to show full time string

master
Jan-Lukas Else 2 years ago
parent
commit
03b7a57f0b
  1. 4
      layouts/partials/post_meta.html
  2. 4
      layouts/partials/summary_meta.html

4
layouts/partials/post_meta.html

@ -1,7 +1,7 @@
<div class="post-meta">
{{ if not .Date.IsZero }}
<div class="item">
<span><time class="dt-published" datetime="{{.Date.Format "2006-01-02T15:04:05Z07:00"}}">{{.Date.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</time>{{ if not (eq .FirstSection.RelPermalink .RelPermalink) }} in <a href="{{ .FirstSection.RelPermalink }}">{{ .FirstSection.Title }}</a>{{ end }}</span>
<span><time class="dt-published" datetime="{{.Date.Format "2006-01-02T15:04:05Z07:00"}}" title="{{.Date.Format "2006-01-02T15:04:05Z07:00"}}">{{.Date.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</time>{{ if not (eq .FirstSection.RelPermalink .RelPermalink) }} in <a href="{{ .FirstSection.RelPermalink }}">{{ .FirstSection.Title }}</a>{{ end }}</span>
</div>
{{ else }}
{{ if not (eq .FirstSection.RelPermalink .RelPermalink) }}
@ -12,7 +12,7 @@
{{ end }}
{{ if ne .Date .Lastmod }}
<div class="item">
<time class="dt-updated" datetime="{{.Lastmod.Format "2006-01-02T15:04:05Z07:00"}}">{{ T "meta_lastmod" }}: {{.Lastmod.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</time>
<time class="dt-updated" datetime="{{.Lastmod.Format "2006-01-02T15:04:05Z07:00"}}" title="{{.Lastmod.Format "2006-01-02T15:04:05Z07:00"}}">{{ T "meta_lastmod" }}: {{.Lastmod.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</time>
</div>
{{ end }}
{{ with .Param "indieweb.reply" }}

4
layouts/partials/summary_meta.html

@ -1,6 +1,6 @@
{{ if not .Date.IsZero }}
<div class="item">
<span><time class="dt-published" datetime="{{.Date.Format "2006-01-02T15:04:05Z07:00"}}">{{.Date.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</time>{{ if not (eq .FirstSection.RelPermalink .RelPermalink) }} in <a href="{{ .FirstSection.RelPermalink }}">{{ .FirstSection.Title }}</a>{{ end }}</span>
<span><time class="dt-published" datetime="{{.Date.Format "2006-01-02T15:04:05Z07:00"}}" title="{{.Date.Format "2006-01-02T15:04:05Z07:00"}}">{{.Date.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</time>{{ if not (eq .FirstSection.RelPermalink .RelPermalink) }} in <a href="{{ .FirstSection.RelPermalink }}">{{ .FirstSection.Title }}</a>{{ end }}</span>
</div>
{{ else }}
{{ if not (eq .FirstSection.RelPermalink .RelPermalink) }}
@ -11,7 +11,7 @@
{{ end }}
{{ if ne .Date .Lastmod }}
<div class="item">
<time class="dt-updated" datetime="{{.Lastmod.Format "2006-01-02T15:04:05Z07:00"}}">{{ T "meta_lastmod" }}: {{.Lastmod.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</time>
<time class="dt-updated" datetime="{{.Lastmod.Format "2006-01-02T15:04:05Z07:00"}}" title="{{.Lastmod.Format "2006-01-02T15:04:05Z07:00"}}">{{ T "meta_lastmod" }}: {{.Lastmod.Format ( .Site.Params.dateformat | default "January 02, 2006")}}</time>
</div>
{{ end }}
{{ with .Param "indieweb.reply" }}