Personen Verbesserungen

This commit is contained in:
Simon Martens
2025-02-25 12:16:39 +01:00
parent 24f1e4fd55
commit f35c738cee
13 changed files with 81 additions and 23 deletions

View File

@@ -43,6 +43,12 @@
</div>
{{ end }}
<h1 class="text-3xl font-bold">{{ $model.result.Agent.Name }}</h1>
{{- if $model.result.Agent.Pseudonyms -}}
<p class="italic">
auch:
<span class="">{{ $model.result.Agent.Pseudonyms }}</span>
</p>
{{- end -}}
<div>
<span class="">
{{ $model.result.Agent.BiographicalData }}
@@ -51,10 +57,12 @@
{{- $arr := $model.result.Agent.ProfessionArray -}}
{{- if $arr -}}
{{- range $i, $p := $arr -}}
<div
class="inline-block align-middle bg-slate-200 px-2 font-sans text-sm py-0.5 rounded mx-1">
<a
href="/personen/?letter={{- Upper (First $model.result.Agent.Name) -}}&filter={{ Lower $p }}#{{- $model.result.Agent.Id -}}"
class="inline-block align-middle bg-slate-200 px-2 font-sans text-sm py-0.5 rounded mx-1
hover:text-slate-900 no-underline">
{{- $p -}}
</div>
</a>
{{- end -}}
{{- end -}}
</span>

View File

@@ -17,7 +17,7 @@
<div id="personheader" class="border-t border-r border-zinc-300 relative w-full">
{{ template "heading" . }}
<div class="flex flex-row justify-end mt-12 items-end">
{{ template "notifier" . }}
{{ template "notifier" . }}
{{ template "professionselectbox" . }}
{{ template "searchbox" . }}
</div>
@@ -29,8 +29,10 @@
{{ if .agents }}
<div class="w-full flex flex-col">
{{ range $count, $agent := .agents }}
<div class="flex flex-row odd:bg-stone-100 even:bg-stone-50 px-3 py-0.5">
<div class="grow">
<div
class="flex flex-row odd:bg-stone-100 even:bg-stone-50 px-3 py-0.5"
id="personlist">
<div class="grow" id="{{- $agent.Id -}}">
<a href="/person/{{ $agent.Id }}" class="search-result font-bold">
{{ $agent.Name }}
</a>
@@ -61,11 +63,12 @@
{{- $parr := $agent.ProfessionArray -}}
{{- if $parr -}}
{{- range $i, $p := $parr -}}
<div
class="inline-block px-2 py-0.5 text-sm font-sans
bg-slate-200 rounded ml-2">
<a
href="/personen/?letter={{- Upper (First $agent.Name) -}}&filter={{ Lower $p }}"
class="inline-block px-2 py-0.5 text-sm font-sans no-underline
hover:text-slate-950 bg-slate-200 rounded ml-2">
{{ $p }}
</div>
</a>
{{- end -}}
{{- end -}}
{{- end -}}
@@ -79,8 +82,6 @@
</div>
{{ end }}
{{ if .altagents }}
{{ end }}
{{ else }}
<p>Keine Personen gefunden.</p>
{{ end }}

View File

@@ -1,6 +1,8 @@
{{ $model := . }}
{{ $isPerson := and $model.filter (or (eq $model.filter "noorg") (eq $model.filter "musik") (eq $model.filter "autor") (eq $model.filter "graphik") (eq $model.filter "hrsg")) }}
{{ $isPerson := and $model.filter (or (eq $model.filter "noorg") (eq $model.filter "musik") (eq
$model.filter "text") (eq $model.filter "graphik") (eq $model.filter "hrsg"))
}}
{{ $isNoOrg := and $model.filter (eq $model.filter "noorg") }}

View File

@@ -1,6 +1,8 @@
{{ $model := . }}
{{ $isPerson := and $model.filter (or (eq $model.filter "noorg") (eq $model.filter "musik") (eq $model.filter "autor") (eq $model.filter "graphik") (eq $model.filter "hrsg")) }}
{{ $isPerson := and $model.filter (or (eq $model.filter "noorg") (eq $model.filter "musik") (eq
$model.filter "text") (eq $model.filter "graphik") (eq $model.filter "hrsg"))
}}
{{ $isOrg := and $model.filter (eq $model.filter "org") }}

View File

@@ -1,8 +1,8 @@
{{ $model := . }}
{{ $isPerson := and $model.filter (or (eq $model.filter "noorg") (eq $model.filter "musik") (eq $model.filter "autor") (eq $model.filter "graphik") (eq $model.filter "hrsg")) }}
{{ $isPerson := and $model.filter (or (eq $model.filter "noorg") (eq $model.filter "musik") (eq $model.filter "text") (eq $model.filter "graphik") (eq $model.filter "hrsg")) }}
{{ $isProfession := and $model.filter (or (eq $model.filter "musik") (eq $model.filter "autor") (eq $model.filter "graphik") (eq $model.filter "hrsg")) }}
{{ $isProfession := and $model.filter (or (eq $model.filter "musik") (eq $model.filter "text") (eq $model.filter "graphik") (eq $model.filter "hrsg")) }}
{{ $isNoOrg := and $model.filter (eq $model.filter "noorg") }}
@@ -10,7 +10,7 @@
{{ $isMusik := and $model.filter (eq $model.filter "musik") }}
{{ $isAutor := and $model.filter (eq $model.filter "autor") }}
{{ $isAutor := and $model.filter (eq $model.filter "text") }}
{{ $isGraphik := and $model.filter (eq $model.filter "graphik") }}

View File

@@ -1,6 +1,8 @@
{{ $model := . }}
{{ $isPerson := and $model.filter (or (eq $model.filter "noorg") (eq $model.filter "musik") (eq $model.filter "autor") (eq $model.filter "graphik") (eq $model.filter "hrsg")) }}
{{ $isPerson := and $model.filter (or (eq $model.filter "noorg") (eq $model.filter "musik") (eq
$model.filter "text") (eq $model.filter "graphik") (eq $model.filter "hrsg"))
}}
{{ $isNoOrg := and $model.filter (eq $model.filter "noorg") }}
@@ -8,7 +10,7 @@
{{ $isMusik := and $model.filter (eq $model.filter "musik") }}
{{ $isAutor := and $model.filter (eq $model.filter "autor") }}
{{ $isAutor := and $model.filter (eq $model.filter "text") }}
{{ $isGraphik := and $model.filter (eq $model.filter "graphik") }}
@@ -32,7 +34,7 @@
hx-target="main">
<option value="noorg" {{ if $isNoOrg }}selected{{ end }}>Alle</option>
<option value="musik" {{ if $isMusik }}selected{{ end }}>Musiker:innen</option>
<option value="autor" {{ if $isAutor }}selected{{ end }}>Autor:innen</option>
<option value="text" {{ if $isAutor }}selected{{ end }}>Autor:innen</option>
<option value="graphik" {{ if $isGraphik }}selected{{ end }}>Graphiker:innen</option>
<option value="hrsg" {{ if $isHrsg }}selected{{ end }}>Herausgeber:innen</option>
</select>