~ knotless Search/
↑↓ move↵ open⇧↵ all results
0
0
main
14 lines · 561 B Raw History
<script lang="ts">
  import { siteLogo, siteName, type Brand } from '#lib/brand.ts';
  /** The host as its operator names it (`brand`): its logo, if it serves one, and its name, as the way home. */
  let { brand }: { brand?: Brand } = $props();
  const logo = $derived(siteLogo(brand));
  // A logo the host names but does not serve, as one too large or no image.
  let failed = $state(false);
</script>

<a class="brand" href="/"
  >{#if logo && !failed}<img src={logo} alt="" onerror={() => (failed = true)} />{/if}<span
    >{siteName(brand)}</span
  ></a
>