585c03a11e
Move OfflineSyncIndicator (logo pip) and OfflineSyncBanner from the [recipeLang] layout/page to (main)/+layout.svelte and (main)/+page.svelte. Sync is an app-wide concern, not recipe-specific, and surfacing it on the homepage gives the entry point users actually see when they install the PWA. Indicator pulls language from languageStore since (main) doesn't have data.lang from a recipe-scoped load. Drop the now-unused .banner-wrap CSS and OfflineSyncIndicator/Banner imports from the recipe routes. Auto-sync cadence: - AUTO_SYNC_INTERVAL 30 min -> 1 week. Recipes don't change often enough to justify a half-hourly background download (the user explicitly wanted this dialed back). - Internal poll tick 5 min -> 1 hour. Polling 12x an hour for a weekly event is wasted work; hourly is fine and still responsive when the weekly window opens. Bump 1.65.3 -> 1.66.0.
268 lines
20 KiB
Svelte
268 lines
20 KiB
Svelte
<script lang="ts">
|
|
import { resolve } from '$app/paths';
|
|
import LinksGrid from "$lib/components/LinksGrid.svelte";
|
|
import Seo from '$lib/components/Seo.svelte';
|
|
import OfflineSyncBanner from '$lib/components/OfflineSyncBanner.svelte';
|
|
import { onMount } from 'svelte';
|
|
let { data } = $props();
|
|
|
|
let lang = $state<'de' | 'en'>('de');
|
|
let recipesUrl = $state(resolve('/[recipeLang=recipeLang]', { recipeLang: 'rezepte' }));
|
|
let faithUrl = $state(resolve('/[faithLang=faithLang]', { faithLang: 'glaube' }));
|
|
|
|
onMount(() => {
|
|
// Check localStorage for preferred language
|
|
const preferredLanguage = localStorage.getItem('preferredLanguage');
|
|
if (preferredLanguage === 'en') {
|
|
lang = 'en';
|
|
recipesUrl = resolve('/[recipeLang=recipeLang]', { recipeLang: 'recipes' });
|
|
faithUrl = resolve('/[faithLang=faithLang]', { faithLang: 'faith' });
|
|
} else {
|
|
lang = 'de';
|
|
recipesUrl = resolve('/[recipeLang=recipeLang]', { recipeLang: 'rezepte' });
|
|
faithUrl = resolve('/[faithLang=faithLang]', { faithLang: 'glaube' });
|
|
}
|
|
|
|
// Listen for language changes from UserHeader
|
|
const handleLanguageChange = (e: CustomEvent) => {
|
|
lang = e.detail.lang;
|
|
recipesUrl = resolve('/[recipeLang=recipeLang]', { recipeLang: lang === 'en' ? 'recipes' : 'rezepte' });
|
|
faithUrl = resolve('/[faithLang=faithLang]', { faithLang: lang === 'en' ? 'faith' : 'glaube' });
|
|
};
|
|
window.addEventListener('languagechange', handleLanguageChange as EventListener);
|
|
|
|
return () => {
|
|
window.removeEventListener('languagechange', handleLanguageChange as EventListener);
|
|
};
|
|
});
|
|
|
|
import { m } from '$lib/js/commonI18n';
|
|
const t = $derived(m[lang]);
|
|
const isEnglish = $derived(lang === 'en');
|
|
const labels = $derived({
|
|
welcome: t.welcome,
|
|
intro1: isEnglish
|
|
? 'Hello, I\'m Alexander Bocken. On this website you\'ll find some software projects for friends, family, and myself. Everything is self-hosted at my home on a small mini-server (Arch, btw).'
|
|
: 'Hallo, ich bin Alexander Bocken. Auf dieser Seite findest du einige Softwareprojekte für Freunde, Familie und mich. Alles ist selbst gehostet bei mir daheim auf einem kleinen Mini-Server (Arch, btw).',
|
|
intro2: isEnglish
|
|
? 'I recommend my continuously growing recipe collection. There you\'ll find many delicious recipes that I\'ve tried myself and constantly refine. You\'re also welcome to use my search engine or Jitsi instance for video conferences. Some things are hidden behind a login, others are publicly accessible. If you know a bit about programming, feel free to browse my Git repositories.'
|
|
: 'Zu empfehlen ist meine stetig wachsende Rezeptsammlung. Dort findest du viele leckere Rezepte, die ich selbst ausprobiert habe und ständig weiterfeilsche. Zudem kannst du gerne meine Suchmaschine oder auch Jitsi-instanz für Videokonferenzen nutzen. Einiges ist hinter einem Login versteckt, anderes ist öffentlich zugänglich. Wer sich ein bisschen mit Programmieren auskennt, kann auch gerne in meinen Git-Repositories stöbern.',
|
|
pages: t.pages,
|
|
recipes: t.recipes,
|
|
git: 'Git',
|
|
streaming: 'Streaming',
|
|
familyPhotos: t.family_photos,
|
|
cloud: 'Cloud',
|
|
videoConferences: t.video_conferences,
|
|
searchEngine: t.search_engine,
|
|
shopping: t.shopping,
|
|
familyTree: t.family_tree,
|
|
faith: t.faith,
|
|
chat: 'Chat',
|
|
transmission: 'Transmission',
|
|
documents: t.documents,
|
|
audiobooksPodcasts: t.audiobooks_podcasts,
|
|
fitness: 'Fitness',
|
|
nutrition: t.nutrition,
|
|
tasks: t.tasks
|
|
});
|
|
</script>
|
|
<style>
|
|
.hero{
|
|
display: flex;
|
|
align-items: center;
|
|
max-width: 1400px;
|
|
margin-inline: auto;
|
|
gap: 2rem;
|
|
}
|
|
.hero img{
|
|
border-radius: var(--radius-pill);
|
|
margin: 1rem;
|
|
width: clamp(100px, 300px, 50vw);
|
|
object-fit: cover;
|
|
background-color: var(--nord4);
|
|
box-shadow: 0.2em 0.2em 1em 1em rgba(0, 0, 0, 0.1);
|
|
}
|
|
.hero div{
|
|
margin-inline: 1rem;
|
|
}
|
|
|
|
section h2{
|
|
font-size: 2rem;
|
|
text-align: center;
|
|
}
|
|
@media (prefers-color-scheme: dark){
|
|
.hero img{
|
|
box-shadow: 0.1em 0.1em 2em 0.5em rgba(255, 255, 255, 0.1);
|
|
}
|
|
}
|
|
:global(:root[data-theme="dark"]) .hero img {
|
|
box-shadow: 0.1em 0.1em 2em 0.5em rgba(255, 255, 255, 0.1);
|
|
}
|
|
@media (max-width: 600px){
|
|
.hero{
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
.hero img{
|
|
width: clamp(100px, 200px, 80vw);
|
|
}
|
|
.hero h1{
|
|
text-align: center;
|
|
}
|
|
}
|
|
</style>
|
|
<Seo
|
|
title={isEnglish ? "Alexander Bocken — personal site" : "Alexander Bocken — Persönliche Website"}
|
|
description={isEnglish
|
|
? "Self-hosted recipe collection, Catholic faith resources, apologetics, prayers, and personal projects by Alexander Bocken."
|
|
: "Selbstgehostete Rezeptsammlung, katholische Glaubensinhalte, Apologetik, Gebete und persönliche Projekte von Alexander Bocken."}
|
|
canonical="https://bocken.org/"
|
|
ogImage="https://bocken.org/static/user/full/alexander.webp"
|
|
ogImageAlt={isEnglish ? "Smiling Alexander Bocken" : "Lächelnder Alexander Bocken"}
|
|
siteName="Bocken"
|
|
lang={isEnglish ? 'en' : 'de'}
|
|
/>
|
|
|
|
<!-- SVG Definitions -->
|
|
<svg style="display: none;">
|
|
<defs>
|
|
<symbol id="lock-icon" viewBox="0 0 448 512">
|
|
<path d="M144 144v48H304V144c0-44.2-35.8-80-80-80s-80 35.8-80 80zM80 192V144C80 64.5 144.5 0 224 0s144 64.5 144 144v48h16c35.3 0 64 28.7 64 64V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V256c0-35.3 28.7-64 64-64H80z"/>
|
|
</symbol>
|
|
</defs>
|
|
</svg>
|
|
{#if ! data.session}
|
|
|
|
<section class=hero>
|
|
<img src="https://bocken.org/static/user/full/alexander.webp" alt="Smiling Alexander Bocken">
|
|
<div>
|
|
<h1><q>{labels.welcome}</q></h1>
|
|
<p>{labels.intro1}</p>
|
|
<p>{labels.intro2}</p>
|
|
</div>
|
|
</section>
|
|
{/if}
|
|
|
|
<OfflineSyncBanner {lang} />
|
|
|
|
<section>
|
|
|
|
<h2>{labels.pages}</h2>
|
|
<LinksGrid>
|
|
<a href={recipesUrl}>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M240 144A96 96 0 1 0 48 144a96 96 0 1 0 192 0zm44.4 32C269.9 240.1 212.5 288 144 288C64.5 288 0 223.5 0 144S64.5 0 144 0c68.5 0 125.9 47.9 140.4 112h71.8c8.8-9.8 21.6-16 35.8-16H496c26.5 0 48 21.5 48 48s-21.5 48-48 48H392c-14.2 0-27-6.2-35.8-16H284.4zM144 80a64 64 0 1 1 0 128 64 64 0 1 1 0-128zM400 240c13.3 0 24 10.7 24 24v8h96c13.3 0 24 10.7 24 24s-10.7 24-24 24H280c-13.3 0-24-10.7-24-24s10.7-24 24-24h96v-8c0-13.3 10.7-24 24-24zM288 464V352H512V464c0 26.5-21.5 48-48 48H336c-26.5 0-48-21.5-48-48zM48 320h80 16 32c26.5 0 48 21.5 48 48s-21.5 48-48 48H160c0 17.7-14.3 32-32 32H64c-17.7 0-32-14.3-32-32V336c0-8.8 7.2-16 16-16zm128 64c8.8 0 16-7.2 16-16s-7.2-16-16-16H160v32h16zM24 464H200c13.3 0 24 10.7 24 24s-10.7 24-24 24H24c-13.3 0-24-10.7-24-24s10.7-24 24-24z"/></svg>
|
|
<h3>{labels.recipes}</h3>
|
|
</a>
|
|
|
|
<a href="cospend/list">
|
|
<svg class="lock-icon"><use href="#lock-icon"/></svg>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 24C0 10.7 10.7 0 24 0H69.5c22 0 41.5 12.8 50.6 32h411c26.3 0 45.5 25 38.6 50.4l-41 152.3c-8.5 31.4-37 53.3-69.5 53.3H170.7l5.4 28.5c2.2 11.3 12.1 19.5 23.6 19.5H488c13.3 0 24 10.7 24 24s-10.7 24-24 24H199.7c-34.6 0-64.3-24.6-70.7-58.5L77.4 54.5c-.7-3.8-4-6.5-7.9-6.5H24C10.7 48 0 37.3 0 24zM128 464a48 48 0 1 1 96 0 48 48 0 1 1 -96 0zm336-48a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"/></svg>
|
|
<h3>{labels.shopping}</h3>
|
|
</a>
|
|
|
|
<a href={resolve('/fitness')}>
|
|
<svg class="lock-icon"><use href="#lock-icon"/></svg>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M96 64c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32l0 160 0 64 0 160c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-64-32 0c-17.7 0-32-14.3-32-32l0-64c-17.7 0-32-14.3-32-32s14.3-32 32-32l0-64c0-17.7 14.3-32 32-32l32 0 0-64zm448 0l0 64 32 0c17.7 0 32 14.3 32 32l0 64c17.7 0 32 14.3 32 32s-14.3 32-32 32l0 64c0 17.7-14.3 32-32 32l-32 0 0 64c0 17.7-14.3 32-32 32l-32 0c-17.7 0-32-14.3-32-32l0-160 0-64 0-160c0-17.7 14.3-32 32-32l32 0c17.7 0 32 14.3 32 32zM416 224l0 64-192 0 0-64 192 0z"/></svg>
|
|
<h3>{labels.fitness}</h3>
|
|
</a>
|
|
|
|
<a href={resolve('/tasks')}>
|
|
<svg class="lock-icon"><use href="#lock-icon"/></svg>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M152.1 38.2c9.9 8.9 10.7 24 1.8 33.9l-72 80c-4.4 4.9-10.6 7.8-17.2 7.9s-12.9-2.4-17.6-7L7 113c-9.3-9.4-9.3-24.6 0-34C16.3 69.5 31.5 69.5 40.7 79l21.9 22.3 53.5-59.4c8.9-9.9 24-10.7 33.9-1.8zm0 160c9.9 8.9 10.7 24 1.8 33.9l-72 80c-4.4 4.9-10.6 7.8-17.2 7.9s-12.9-2.4-17.6-7L7 273c-9.4-9.4-9.4-24.6 0-33.9s24.6-9.4 33.9 0l22 22.3 53.5-59.4c8.9-9.9 24-10.7 33.9-1.8zM224 96c0-17.7 14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H256c-17.7 0-32-14.3-32-32zm0 160c0-17.7 14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H256c-17.7 0-32-14.3-32-32zM160 416c0-17.7 14.3-32 32-32H480c17.7 0 32 14.3 32 32s-14.3 32-32 32H192c-17.7 0-32-14.3-32-32zM48 368a48 48 0 1 1 0 96 48 48 0 1 1 0-96z"/></svg>
|
|
<h3>{labels.tasks}</h3>
|
|
</a>
|
|
|
|
<a href={faithUrl}>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M351.2 4.8c3.2-2 6.6-3.3 10-4.1c4.7-1 9.6-.9 14.1 .1c7.7 1.8 14.8 6.5 19.4 13.6L514.6 194.2c8.8 13.1 13.4 28.6 13.4 44.4v73.5c0 6.9 4.4 13 10.9 15.2l79.2 26.4C631.2 358 640 370.2 640 384v96c0 9.9-4.6 19.3-12.5 25.4s-18.1 8.1-27.7 5.5L431 465.9c-56-14.9-95-65.7-95-123.7V224c0-17.7 14.3-32 32-32s32 14.3 32 32v80c0 8.8 7.2 16 16 16s16-7.2 16-16V219.1c0-7-1.8-13.8-5.3-19.8L340.3 48.1c-1.7-3-2.9-6.1-3.6-9.3c-1-4.7-1-9.6 .1-14.1c1.9-8 6.8-15.2 14.3-19.9zm-62.4 0c7.5 4.6 12.4 11.9 14.3 19.9c1.1 4.6 1.2 9.4 .1 14.1c-.7 3.2-1.9 6.3-3.6 9.3L213.3 199.3c-3.5 6-5.3 12.9-5.3 19.8V304c0 8.8 7.2 16 16 16s16-7.2 16-16V224c0-17.7 14.3-32 32-32s32 14.3 32 32V342.3c0 58-39 108.7-95 123.7l-168.7 45c-9.6 2.6-19.9 .5-27.7-5.5S0 490 0 480V384c0-13.8 8.8-26 21.9-30.4l79.2-26.4c6.5-2.2 10.9-8.3 10.9-15.2V238.5c0-15.8 4.7-31.2 13.4-44.4L245.2 14.5c4.6-7.1 11.7-11.8 19.4-13.6c4.6-1.1 9.4-1.2 14.1-.1c3.5 .8 6.9 2.1 10 4.1z"/></svg>
|
|
<h3>{labels.faith}</h3>
|
|
</a>
|
|
|
|
|
|
<a href={resolve('/fitness/nutrition')}>
|
|
<svg class="lock-icon"><use href="#lock-icon"/></svg>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="-10 -226 532 468"><path d="m256-140-15-21c-25-34-65-55-108-55C60-216 0-156 0-83v3C0-57 6-32 17-8h106c3 0 6-2 7-5l32-76c4-9 12-15 22-15 9 0 18 5 22 14l51 114 42-83c4-8 12-13 21-13s17 5 22 13l23 47c1 2 4 4 7 4h124c10-24 16-49 16-72v-3c0-73-60-133-133-133-43 0-83 21-108 55l-15 21zM470 40h-98c-21 0-41-12-50-31l-2-3-42 85c-5 8-13 13-22 13-10 0-18-6-22-14L185-20 174 6c-8 21-29 34-51 34H42c48 74 123 142 171 178 12 9 27 14 43 14 15 0 31-4 43-14 48-36 123-104 171-178z"/></svg>
|
|
<h3>{labels.nutrition}</h3>
|
|
</a>
|
|
|
|
<a href=https://git.bocken.org>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M392.8 1.2c-17-4.9-34.7 5-39.6 22l-128 448c-4.9 17 5 34.7 22 39.6s34.7-5 39.6-22l128-448c4.9-17-5-34.7-22-39.6zm80.6 120.1c-12.5 12.5-12.5 32.8 0 45.3L562.7 256l-89.4 89.4c-12.5 12.5-12.5 32.8 0 45.3s32.8 12.5 45.3 0l112-112c12.5-12.5 12.5-32.8 0-45.3l-112-112c-12.5-12.5-32.8-12.5-45.3 0zm-306.7 0c-12.5-12.5-32.8-12.5-45.3 0l-112 112c-12.5 12.5-12.5 32.8 0 45.3l112 112c12.5 12.5 32.8 12.5 45.3 0s12.5-32.8 0-45.3L77.3 256l89.4-89.4c12.5-12.5 12.5-32.8 0-45.3z"/></svg>
|
|
<h3>{labels.git}</h3>
|
|
</a>
|
|
|
|
<a href="https://stream.bocken.org">
|
|
<svg class="lock-icon"><use href="#lock-icon"/></svg>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M448 32H361.9l-1 1-127 127h92.1l1-1L453.8 32.3c-1.9-.2-3.8-.3-5.8-.3zm64 128V96c0-15.1-5.3-29.1-14-40l-104 104H512zM294.1 32H201.9l-1 1L73.9 160h92.1l1-1 127-127zM64 32C28.7 32 0 60.7 0 96v64H6.1l1-1 127-127H64zM512 192H0V416c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V192z"/></svg>
|
|
<h3>{labels.streaming}</h3>
|
|
</a>
|
|
|
|
<a href="https://bilder.bocken.org">
|
|
<svg class="lock-icon"><use href="#lock-icon"/></svg>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 96C0 60.7 28.7 32 64 32H448c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zM323.8 202.5c-4.5-6.6-11.9-10.5-19.8-10.5s-15.4 3.9-19.8 10.5l-87 127.6L170.7 297c-4.6-5.7-11.5-9-18.7-9s-14.2 3.3-18.7 9l-64 80c-5.8 7.2-6.9 17.1-2.9 25.4s12.4 13.6 21.6 13.6h96 32H424c8.9 0 17.1-4.9 21.2-12.8s3.6-17.4-1.4-24.7l-120-176zM112 192a48 48 0 1 0 0-96 48 48 0 1 0 0 96z"/></svg>
|
|
<h3>{labels.familyPhotos}</h3>
|
|
</a>
|
|
|
|
<a href="https://meet.bocken.org">
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 576 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 128C0 92.7 28.7 64 64 64H320c35.3 0 64 28.7 64 64V384c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V128zM559.1 99.8c10.4 5.6 16.9 16.4 16.9 28.2V384c0 11.8-6.5 22.6-16.9 28.2s-23 5-32.9-1.6l-96-64L416 337.1V320 192 174.9l14.2-9.5 96-64c9.8-6.5 22.4-7.2 32.9-1.6z"/></svg>
|
|
<h3>{labels.videoConferences}</h3>
|
|
</a>
|
|
|
|
<a href="https://searx.bocken.org">
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg>
|
|
<h3>{labels.searchEngine}</h3>
|
|
</a>
|
|
|
|
<a href="https://chat.bocken.org">
|
|
<svg class="lock-icon"><use href="#lock-icon"/></svg>
|
|
<svg xmlns="http://www.w3.org/2000/svg" width="636" height="580" viewBox="-10 -258 636 580"><path d="M168-248h448v392L490 60v-161c0-12-9-21-21-21H301c-12 0-21 9-21 21s9 21 21 21h147v308H238l-126 84v-84H0V-80h168v-168z"/></svg>
|
|
<h3>{labels.chat}</h3>
|
|
</a>
|
|
|
|
<a href="https://tree.bocken.org">
|
|
<svg class="lock-icon"><use href="#lock-icon"/></svg>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M335.5 4l288 160c15.4 8.6 21 28.1 12.4 43.5s-28.1 21-43.5 12.4L320 68.6 47.5 220c-15.4 8.6-34.9 3-43.5-12.4s-3-34.9 12.4-43.5L304.5 4c9.7-5.4 21.4-5.4 31.1 0zM320 160a40 40 0 1 1 0 80 40 40 0 1 1 0-80zM144 256a40 40 0 1 1 0 80 40 40 0 1 1 0-80zm312 40a40 40 0 1 1 80 0 40 40 0 1 1 -80 0zM226.9 491.4L200 441.5V480c0 17.7-14.3 32-32 32H120c-17.7 0-32-14.3-32-32V441.5L61.1 491.4c-6.3 11.7-20.8 16-32.5 9.8s-16-20.8-9.8-32.5l37.9-70.3c15.3-28.5 45.1-46.3 77.5-46.3h19.5c16.3 0 31.9 4.5 45.4 12.6l33.6-62.3c15.3-28.5 45.1-46.3 77.5-46.3h19.5c32.4 0 62.1 17.8 77.5 46.3l33.6 62.3c13.5-8.1 29.1-12.6 45.4-12.6h19.5c32.4 0 62.1 17.8 77.5 46.3l37.9 70.3c6.3 11.7 1.9 26.2-9.8 32.5s-26.2 1.9-32.5-9.8L552 441.5V480c0 17.7-14.3 32-32 32H472c-17.7 0-32-14.3-32-32V441.5l-26.9 49.9c-6.3 11.7-20.8 16-32.5 9.8s-16-20.8-9.8-32.5l36.3-67.5c-1.7-1.7-3.2-3.6-4.3-5.8L376 345.5V400c0 17.7-14.3 32-32 32H296c-17.7 0-32-14.3-32-32V345.5l-26.9 49.9c-1.2 2.2-2.6 4.1-4.3 5.8l36.3 67.5c6.3 11.7 1.9 26.2-9.8 32.5s-26.2 1.9-32.5-9.8z"/></svg>
|
|
<h3>{labels.familyTree}</h3>
|
|
</a>
|
|
|
|
<a href="https://cloud.bocken.org">
|
|
<svg class="lock-icon"><use href="#lock-icon"/></svg>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 640 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M0 336c0 79.5 64.5 144 144 144H512c70.7 0 128-57.3 128-128c0-61.9-44-113.6-102.4-125.4c4.1-10.7 6.4-22.4 6.4-34.6c0-53-43-96-96-96c-19.7 0-38.1 6-53.3 16.2C367 64.2 315.3 32 256 32C167.6 32 96 103.6 96 192c0 2.7 .1 5.4 .2 8.1C40.2 219.8 0 273.2 0 336z"/></svg>
|
|
<h3>{labels.cloud}</h3>
|
|
</a>
|
|
|
|
<!-- instead of redirect_to_docs(), use a normal link with internal checks for data.session -->
|
|
{#if !data.session}
|
|
<a href={resolve('/auth/signin')}>
|
|
<svg class="lock-icon"><use href="#lock-icon"/></svg>
|
|
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m106 512h300c24.814 0 45-20.186 45-45v-317h-105c-24.814 0-45-20.186-45-45v-105h-195c-24.814 0-45 20.186-45 45v422c0 24.814 20.186 45 45 45zm60-301h180c8.291 0 15 6.709 15 15s-6.709 15-15 15h-180c-8.291 0-15-6.709-15-15s6.709-15 15-15zm0 60h180c8.291 0 15 6.709 15 15s-6.709 15-15 15h-180c-8.291 0-15-6.709-15-15s6.709-15 15-15zm0 60h180c8.291 0 15 6.709 15 15s-6.709 15-15 15h-180c-8.291 0-15-6.709-15-15s6.709-15 15-15zm0 60h120c8.291 0 15 6.709 15 15s-6.709 15-15 15h-120c-8.291 0-15-6.709-15-15s6.709-15 15-15z"/><path d="m346 120h96.211l-111.211-111.211v96.211c0 8.276 6.724 15 15 15z"/></svg>
|
|
<h3>{labels.documents}</h3>
|
|
</a>
|
|
{:else if data.session.user.groups.includes("paperless_users")}
|
|
<a href="https://docs.bocken.org">
|
|
<svg class="lock-icon"><use href="#lock-icon"/></svg>
|
|
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m106 512h300c24.814 0 45-20.186 45-45v-317h-105c-24.814 0-45-20.186-45-45v-105h-195c-24.814 0-45 20.186-45 45v422c0 24.814 20.186 45 45 45zm60-301h180c8.291 0 15 6.709 15 15s-6.709 15-15 15h-180c-8.291 0-15-6.709-15-15s6.709-15 15-15zm0 60h180c8.291 0 15 6.709 15 15s-6.709 15-15 15h-180c-8.291 0-15-6.709-15-15s6.709-15 15-15zm0 60h180c8.291 0 15 6.709 15 15s-6.709 15-15 15h-180c-8.291 0-15-6.709-15-15s6.709-15 15-15zm0 60h120c8.291 0 15 6.709 15 15s-6.709 15-15 15h-120c-8.291 0-15-6.709-15-15s6.709-15 15-15z"/><path d="m346 120h96.211l-111.211-111.211v96.211c0 8.276 6.724 15 15 15z"/></svg>
|
|
<h3>{labels.documents}</h3>
|
|
</a>
|
|
{:else if data.session.user.groups.includes("paperless_eltern_users")}
|
|
<a href="https://dokumente.bocken.org">
|
|
<svg class="lock-icon"><use href="#lock-icon"/></svg>
|
|
<svg viewBox="0 0 512 512" xmlns="http://www.w3.org/2000/svg"><path d="m106 512h300c24.814 0 45-20.186 45-45v-317h-105c-24.814 0-45-20.186-45-45v-105h-195c-24.814 0-45 20.186-45 45v422c0 24.814 20.186 45 45 45zm60-301h180c8.291 0 15 6.709 15 15s-6.709 15-15 15h-180c-8.291 0-15-6.709-15-15s6.709-15 15-15zm0 60h180c8.291 0 15 6.709 15 15s-6.709 15-15 15h-180c-8.291 0-15-6.709-15-15s6.709-15 15-15zm0 60h180c8.291 0 15 6.709 15 15s-6.709 15-15 15h-180c-8.291 0-15-6.709-15-15s6.709-15 15-15zm0 60h120c8.291 0 15 6.709 15 15s-6.709 15-15 15h-120c-8.291 0-15-6.709-15-15s6.709-15 15-15z"/><path d="m346 120h96.211l-111.211-111.211v96.211c0 8.276 6.724 15 15 15z"/></svg>
|
|
<h3>{labels.documents}</h3>
|
|
</a>
|
|
{/if}
|
|
|
|
<a href=https://transmission.bocken.org>
|
|
<svg class="lock-icon"><use href="#lock-icon"/></svg>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.1 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M288 32c0-17.7-14.3-32-32-32s-32 14.3-32 32V274.7l-73.4-73.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l128 128c12.5 12.5 32.8 12.5 45.3 0l128-128c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L288 274.7V32zM64 352c-35.3 0-64 28.7-64 64v32c0 35.3 28.7 64 64 64H448c35.3 0 64-28.7 64-64V416c0-35.3-28.7-64-64-64H346.5l-45.3 45.3c-25 25-65.5 25-90.5 0L165.5 352H64zm368 56a24 24 0 1 1 0 48 24 24 0 1 1 0-48z"/></svg>
|
|
<h3>{labels.transmission}</h3>
|
|
</a>
|
|
|
|
<a href=https://audio.bocken.org>
|
|
<svg class="lock-icon"><use href="#lock-icon"/></svg>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.6.0 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M256 80C149.9 80 62.4 159.4 49.6 262c9.4-3.8 19.6-6 30.4-6c26.5 0 48 21.5 48 48l0 128c0 26.5-21.5 48-48 48c-44.2 0-80-35.8-80-80l0-16 0-48 0-48C0 146.6 114.6 32 256 32s256 114.6 256 256l0 48 0 48 0 16c0 44.2-35.8 80-80 80c-26.5 0-48-21.5-48-48l0-128c0-26.5 21.5-48 48-48c10.8 0 21 2.1 30.4 6C449.6 159.4 362.1 80 256 80z"/></svg>
|
|
<h3>{labels.audiobooksPodcasts}</h3>
|
|
</a>
|
|
|
|
</LinksGrid>
|
|
</section>
|