Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion site/layouts/_default/baseof.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
{{ partial "components/footer/footer.html" . }}
</div>
</div>
{{ partial "components/cookie-notice.html" . }}
{{ partial "scripts/body-scripts.html" . }}
</body>
</html>
20 changes: 11 additions & 9 deletions site/layouts/_partials/blog/post-info.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,21 @@
{{ $hasLabel := .has_label | default false }}

{{ $label := "" }}
{{ if and (not $context.Params.author) $hasLabel }}
{{ $postAuthor := $context.Params.author }}

{{ if and (not $postAuthor) $hasLabel }}
{{ $label = "Posted on" }}
{{ end }}

<div class="post-info">
{{ with $context.Params.author }}
<span class="post-author">{{ . }}</span>
<span>on</span>
{{ end }}
{{ with $context.Params.publishdate }}
{{ partial "components/iso-date.html" (dict
{{- with $postAuthor -}}
{{- $author := printf "%s %s&nbsp;" . "on" -}}
<span class="post-author">{{ $author | safeHTML }}</span>
{{- end -}}
{{- with $context.Params.publishdate -}}
{{- partial "components/iso-date.html" (dict
"date" .
"label" $label
) }}
{{ end }}
) -}}
{{- end -}}
</div>
41 changes: 0 additions & 41 deletions site/layouts/_partials/components/cookie-notice.html

This file was deleted.

14 changes: 7 additions & 7 deletions site/layouts/_partials/components/iso-date.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@
~ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->

{{ $date := .date }}
{{ $label := .label }}
{{- $date := .date -}}
{{- $label := .label -}}

{{ $formattedDate := $date | time.Format ":date_long" }}
{{ $isoDate := $date | time.Format "2006-01-02" }}
{{- $formattedDate := $date | time.Format ":date_long" -}}
{{- $isoDate := $date | time.Format "2006-01-02" -}}
<p class="date">
{{ with $label }}
{{ .}}
{{ end }}
{{- with $label -}}
<span>{{ . }}&nbsp;</span>
{{- end -}}
<time datetime="{{ $isoDate }}">{{ $formattedDate }}</time>
</p>