prayers: add search and individual prayer pages
All checks were successful
CI / update (push) Successful in 1m22s

- Add SearchInput component for reusable search UI
- Add search functionality to prayers list with two-tier results:
  - Primary matches (name/searchTerms) shown first
  - Secondary matches (text content) shown after with reduced opacity
- Add individual prayer pages with language-appropriate slugs
  (e.g., /glaube/gebete/ave-maria, /faith/prayers/hail-mary)
- Make prayer cards clickable to navigate to individual pages
- Fix language visibility for prayers without Latin (BruderKlaus, Joseph)
- Add Prayer wrapper to MichaelGebet for consistent styling
- Use CSS columns for masonry layout with dynamic reordering
This commit is contained in:
2026-02-02 22:22:49 +01:00
parent 8699bef209
commit 660a1b0539
10 changed files with 645 additions and 128 deletions

View File

@@ -1,6 +1,8 @@
<script>
export let is_bilingue;
export let name;
export let id = '';
export let href = '';
</script>
<style>
div.gebet{
@@ -33,6 +35,22 @@ div.gebet{
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
max-width: 600px;
}
.gebet_wrapper.clickable {
cursor: pointer;
transition: transform 150ms ease, box-shadow 150ms ease;
}
.gebet_wrapper.clickable:hover {
transform: translateY(-2px);
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}
.gebet_wrapper.clickable:active {
transform: translateY(0);
}
a.gebet-link {
text-decoration: none;
color: inherit;
display: block;
}
@media(prefers-color-scheme: light){
.gebet_wrapper{
background-color: var(--accent-light);
@@ -43,10 +61,22 @@ div.gebet{
}
</style>
<div class="gebet_wrapper">
{#if href}
<a {href} class="gebet-link">
<div class="gebet_wrapper clickable" data-prayer-id={id}>
<h2>{name}</h2>
<slot name="intro"></slot>
<div class="gebet" class:bilingue={is_bilingue}>
<slot></slot>
</div>
</div>
</a>
{:else}
<div class="gebet_wrapper" data-prayer-id={id}>
<h2>{name}</h2>
<slot name="intro"></slot>
<div class="gebet" class:bilingue={is_bilingue}>
<slot></slot>
</div>
</div>
{/if}