mirror of
				https://github.com/Theodor-Springmann-Stiftung/musenalm.git
				synced 2025-10-30 17:55:31 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			66 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			66 lines
		
	
	
		
			2.1 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| {{ $model := . }}
 | |
| 
 | |
| {{ if $model.letters }}
 | |
| 	<div class="flex flex-row border-b px-3 border-zinc-300 items-end min-h-14">
 | |
| 		<div id="alphabet" class="alphabet flex flex-row items-end text-xl">
 | |
| 			{{ range $id, $r := .letters }}
 | |
| 				<a
 | |
| 					class="odd:bg-stone-100 even:bg-zinc-100 mr-1 border-zinc-300 border-x border-t [&>a[aria-current='page']]:font-bold
 | |
| 				px-2 no-underline transition-all duration-75
 | |
| 				{{ if not $model.active -}}inactive{{- end -}}"
 | |
| 					:class="search ? 'inactive' : 'active'"
 | |
| 					href="?letter={{ $r }}"
 | |
| 					{{ if eq $model.active $r }}aria-current="page"{{ end }}
 | |
| 					hx-indicator="body"
 | |
| 					hx-select="main"
 | |
| 					hx-target="main"
 | |
| 					hx-swap="outerHTML show:none"
 | |
| 					>{{ $r }}</a
 | |
| 				>
 | |
| 			{{ end }}
 | |
| 
 | |
| 
 | |
| 			<i class="ml-2 pb-1 ri-hourglass-2-fill request-indicator spinning"></i>
 | |
| 		</div>
 | |
| 
 | |
| 		<div class="flex-grow"></div>
 | |
| 
 | |
| 		<div class="min-w-[22.5rem] max-w-96 flex flex-row bg-stone-50 relative">
 | |
| 			<div class="pb-0">
 | |
| 				<i class="ri-search-line"></i><i class="-ml-0.5 inline-block ri-arrow-right-s-line"></i>
 | |
| 			</div>
 | |
| 			<div class="pb-0 border-b-4 border-zinc-300 grow">
 | |
| 				<input
 | |
| 					class="px-1.5 font-serif placeholder:italic w-full"
 | |
| 					type="search"
 | |
| 					name="search"
 | |
| 					value="{{ $model.search }}"
 | |
| 					placeholder="Almanach-Nr oder Suchbegriff"
 | |
| 					x-model="search"
 | |
| 					hx-get=""
 | |
| 					hx-trigger="input changed delay=1500ms, keyup[key=='Enter']"
 | |
| 					hx-select="#searchcontent"
 | |
| 					hx-target="#searchcontent"
 | |
| 					hx-swap="outerHTML"
 | |
| 					autocomplete="off"
 | |
| 					{{ if $model.search }}disabled="true"{{ end }} />
 | |
| 			</div>
 | |
| 			<div id="permalink" class="font-serif ml-3 min-w-7 pb-1">
 | |
| 				{{- if not $model.search -}}
 | |
| 					<tool-tip position="right" x-show="search">
 | |
| 						<a
 | |
| 							:href="'/reihen/?search=' + search"
 | |
| 							x-show="search"
 | |
| 							class="inline-block px-1
 | |
| 				text-white no-underline bg-stone-700 hover:bg-stone-900 rounded"
 | |
| 							hx-boost="false">
 | |
| 							<i class="ri-links-line"></i
 | |
| 						></a>
 | |
| 						<div class="data-tip">Link zu dieser Suchanfrage</div>
 | |
| 					</tool-tip>
 | |
| 				{{- end -}}
 | |
| 			</div>
 | |
| 		</div>
 | |
| 	</div>
 | |
| {{ end }}
 | 
