managarten/packages/shared-branding/src/AppLogo.svelte
Till-JS 926ca231b5 feat: add i18n localization with language switcher to all web apps
- Add svelte-i18n configuration with SSR support to all web apps
- Create LanguageSelector component for each app with brand colors
- Add German and English locale files
- Integrate language switcher into login pages via headerControls snippet
- Fix Tailwind v4 @source directives for shared package scanning
- Update AppSlider styling to match login container design

Apps updated:
- Memoro (gold #f8d62b)
- Märchenzauber (pink #FF6B9D)
- ManaDeck (purple #8b5cf6)
- ManaCore (indigo #6366f1)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-25 01:41:25 +01:00

52 lines
1,006 B
Svelte

<script lang="ts">
import type { AppId } from './types';
import { APP_BRANDING } from './config';
interface Props {
/** App to show logo for */
app: AppId;
/** Size in pixels */
size?: number;
/** Override color */
color?: string;
/** Additional CSS classes */
class?: string;
}
let {
app,
size = 32,
color,
class: className = ''
}: Props = $props();
const branding = $derived(APP_BRANDING[app]);
const fillColor = $derived(color ?? branding.primaryColor);
</script>
<svg
xmlns="http://www.w3.org/2000/svg"
width={size}
height={size}
viewBox={branding.logoViewBox ?? '0 0 24 24'}
class={className}
aria-label="{branding.name} logo"
>
{#if branding.logoStroke}
<path
d={branding.logoPath}
fill="none"
stroke={fillColor}
stroke-width={branding.logoStrokeWidth ?? 2}
stroke-linecap="round"
stroke-linejoin="round"
/>
{:else}
<path
d={branding.logoPath}
fill={fillColor}
fill-rule="evenodd"
clip-rule="evenodd"
/>
{/if}
</svg>