filter styling

This commit is contained in:
Simon Martens
2025-03-01 03:13:16 +01:00
parent 3968f6b1b4
commit 8bc1fdb79c
7 changed files with 136 additions and 49 deletions

View File

@@ -38,13 +38,13 @@
IncipitString string
}
.filters
type BeitraegeFilterParameters struct {
.filters
type BeitraegeFilterParameters struct {
Agent string
Type string
Year string
OnlyScans bool
}
}
*/}}
{{ $isAlm := false }}
@@ -139,11 +139,15 @@ type BeitraegeFilterParameters struct {
</div>
{{- template "_fieldscript" -}}
{{- if $model.parameters.IsBeitraegeSearch -}}
<div class="container-normal" id="searchresults">
{{ template "_filterlist" $model }}
{{ template "tablehead" $model }}
<div class="cotents" id="searchresult">
{{- if $model.result.Hits -}}
{{ template "_filterlist" $model }}
{{- end -}}
<div class="container-normal">
{{ template "tablehead" $model }}
{{- if $model.result.Hits -}}
<div class="mt-8" id="almanachcontents">
{{- range $_, $hit := $model.result.Hits -}}
@@ -171,6 +175,11 @@ type BeitraegeFilterParameters struct {
{{- end -}}
</div>
{{- end -}}
<div class="flex flex-row justify-end items-start border-t border-zinc-300 pt-4">
{{- template "pagination" $model -}}
</div>
</div>
<script type="module">

View File

@@ -0,0 +1,21 @@
{{ $model := . }}
{{- if gt (len $model.result.Pages) 1 }}
<div class="[&>_a]:no-underline">
{{ if gt $model.parameters.Page 1 -}}
<a
href="{{- $model.parameters.ToQueryParamsBeitraege -}}&page={{ $model.parameters.Prev }}"
class="mr-1.5">
<i class="ri-arrow-left-long-line"></i>
</a>
{{- end -}}
Seite
<b>{{ $model.parameters.Page }}&thinsp;/&thinsp;{{ $model.result.PagesCount }}</b>
{{ if lt $model.parameters.Page ($model.result.PagesCount) -}}
<a
href="{{- $model.parameters.ToQueryParamsBeitraege -}}&page={{ $model.parameters.Next }}"
class="ml-1.5">
<i class="ri-arrow-right-long-line"></i>
</a>
{{- end -}}
</div>
{{- end -}}

View File

@@ -43,27 +43,11 @@
{{ $model.result.Entries | len }} Bänden
{{- end -}}
</div>
{{- if gt (len $model.result.Pages) 1 }}
<div>&middot;</div>
<div class="[&>_a]:no-underline">
{{ if gt $model.parameters.Page 1 -}}
<a
href="{{- $model.parameters.ToQueryParamsBeitraege -}}&page={{ $model.parameters.Prev }}"
class="mr-1.5">
<i class="ri-arrow-left-long-line"></i>
</a>
{{- end -}}
Seite {{ $model.parameters.Page }} /
{{ $model.result.PagesCount }}
{{ if lt $model.parameters.Page ($model.result.PagesCount) -}}
<a
href="{{- $model.parameters.ToQueryParamsBeitraege -}}&page={{ $model.parameters.Next }}"
class="ml-1.5">
<i class="ri-arrow-right-long-line"></i>
</a>
{{- end -}}
</div>
{{- end -}}
{{ template "pagination" $model }}
</div>
{{- if not $isAlm -}}