mirror of
https://github.com/Theodor-Springmann-Stiftung/musenalm.git
synced 2026-02-04 10:35:30 +00:00
Let's try separating content and alm info
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -60,6 +60,16 @@
|
||||
|
||||
{{ template "entrydata" $model }}
|
||||
|
||||
{{- if $model.result.Contents | len -}}
|
||||
{{ template "contents" $model }}
|
||||
{{- if $model.result.HasContents -}}
|
||||
<div
|
||||
id="almanachcontents"
|
||||
hx-get="/almanach/{{ $model.result.Entry.MusenalmID }}/contents/{{- if $model.request.query -}}?{{- $model.request.query -}}{{- end -}}"
|
||||
hx-trigger="load"
|
||||
hx-target="this"
|
||||
hx-swap="outerHTML"
|
||||
hx-indicator="body">
|
||||
<div class="container-oversize mt-8 pt-0">
|
||||
<div class="flex justify-center text-sm text-stone-600">Inhalt lädt…</div>
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<div class="flex flex-row items-center justify-center ml-2.5">
|
||||
<div class="block bg-stone-200 text-sm px-3 py-0.5 rounded mt-1">
|
||||
<i class="ri-arrow-left-long-line"></i>
|
||||
<a href="./" hx-target="#almanachcontents" hx-select="#almanachcontents" hx-swap="outerHTML show:none" hx-indicator="body"> Alle Beiträge anzeigen </a>
|
||||
<a href="/almanach/{{ $model.result.Entry.MusenalmID }}/contents/" hx-target="#almanachcontents" hx-select="#almanachcontents" hx-swap="outerHTML show:none" hx-indicator="body"> Alle Beiträge anzeigen </a>
|
||||
</div>
|
||||
</div>
|
||||
{{- end -}}
|
||||
@@ -16,7 +16,7 @@
|
||||
{{ $isFra := false }}
|
||||
{{ $isEng := false }}
|
||||
|
||||
{{- $hasContents := len $model.result.Contents -}}
|
||||
{{- $hasContents := $model.result.HasContents -}}
|
||||
|
||||
|
||||
<div class="container-oversize mt-12 pb-0 mb-0">
|
||||
|
||||
7
views/routes/almanach/contents/body.gohtml
Normal file
7
views/routes/almanach/contents/body.gohtml
Normal file
@@ -0,0 +1,7 @@
|
||||
{{ $model := . }}
|
||||
|
||||
{{- if $model.result.Contents | len -}}
|
||||
{{ template "_contents" $model }}
|
||||
{{- else -}}
|
||||
<div id="almanachcontents"></div>
|
||||
{{- end -}}
|
||||
Reference in New Issue
Block a user