Format date using built-in locale-aware formatting
This commit is contained in:
parent
aba952f0d7
commit
7ebd00c633
|
@ -1,4 +1,5 @@
|
|||
baseURL = 'https://kontakt-bamberg.de/'
|
||||
defaultContentLanguage = 'de'
|
||||
languageCode = 'de-de'
|
||||
paginate = 3
|
||||
title = 'kontakt – Das Kulturprojekt'
|
||||
|
|
|
@ -2,10 +2,8 @@
|
|||
{{ .Content }}
|
||||
<h1 id="aktuelles">Aktuelles</h1>
|
||||
{{ $pagination := .Paginate .RegularPages }}
|
||||
{{ $days := dict "Monday" "Mo" "Tuesday" "Di" "Wednesday" "Mi" "Thursday" "Do" "Friday" "Fr" "Saturday" "Sa" "Sunday" "So" }}
|
||||
{{ $months := dict "January" "Januar" "February" "Februar" "March" "März" "April" "April" "May" "Mai" "June" "Juni" "July" "Juli" "August" "August" "September" "September" "October" "Oktober" "November" "November" "December" "Dezember" }}
|
||||
{{ range $pagination.Pages }}
|
||||
<p class="date">{{ index $days (.Date.Format "Monday") }}, {{ .Date.Format "02" }}. {{ index $months (.Date.Format "January") }} {{ .Date.Format "2006" }}</p>
|
||||
<p class="date">{{ .Date | dateFormat "Mon, 02. January 2006" }}</p>
|
||||
<article class="preview">
|
||||
{{ with .Resources.GetMatch "image.jpg" }}
|
||||
<section class="image"><img alt="{{ .Title }}" src="{{ .RelPermalink }}"></section>
|
||||
|
|
Loading…
Reference in New Issue