Make a group by date list
This commit is contained in:
parent
a2cfe3459e
commit
bc7b2d5e39
@ -926,26 +926,14 @@ table.time {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.turniermeldung-list {
|
.turniermeldungen-group-list {
|
||||||
.turniermeldung {
|
.day {
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
.date {
|
.date {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
flex: auto 0 0;
|
margin: 10px 0 0;
|
||||||
}
|
}
|
||||||
.ort {
|
.participation {
|
||||||
margin: 0 0 0 10px;
|
margin: 0 0 0 2em;
|
||||||
padding: 2px 0;
|
|
||||||
flex: auto 1 0;
|
|
||||||
|
|
||||||
a {
|
|
||||||
display: block;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
padding: 3px 0;
|
|
||||||
box-sizing: border-box;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,15 +3,20 @@
|
|||||||
<h1>{{ .Title }}</h1>
|
<h1>{{ .Title }}</h1>
|
||||||
</a>
|
</a>
|
||||||
{{ $meldungen := where .Site.RegularPages "Section" "==" "turniermeldung" }}
|
{{ $meldungen := where .Site.RegularPages "Section" "==" "turniermeldung" }}
|
||||||
<div class="turniermeldung-list">
|
{{- $futureMeldungen := slice -}}
|
||||||
{{ range (sort $meldungen ".Params.dateCompetition" "asc") }}
|
{{- range $meldungen -}}
|
||||||
{{ $date := time.AsTime .Params.dateCompetition }}
|
{{- if ge (time.AsTime .Params.dateCompetition) (now.AddDate 0 0 -1) }}
|
||||||
{{ if ge $date (now.AddDate 0 0 -1) }}
|
{{- $futureMeldungen = $futureMeldungen | append . }}
|
||||||
<div class="turniermeldung">
|
{{- end }}
|
||||||
<div class="date">{{ $date.Format "02.01.2006" }}</div>
|
{{- end }}
|
||||||
<div class="ort"><a href="{{ .RelPermalink }}">{{ .Params.ort }} ({{ .Params.partner }} / {{ .Params.partnerin }})</a></div>
|
<div class="turniermeldungen-group-list">
|
||||||
</div>
|
{{ range ( $futureMeldungen.GroupByParamDate "dateCompetition" "02.01.2006" "asc") }}
|
||||||
|
<div class="day">
|
||||||
|
<div class="date">{{ .Key }}</div>
|
||||||
|
{{ range .Pages }}
|
||||||
|
<div class="participation"><a href="{{ .RelPermalink }}">{{ .Params.ort }} ({{ .Params.partner }} / {{ .Params.partnerin }})</a></div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
</div>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ .Content }}
|
{{ .Content }}
|
||||||
|
Loading…
Reference in New Issue
Block a user