clove/pkviewer
web/src/routes/credits/+page.svelte
back to web/src/routes/credits
<!-- web/src/routes/credits/+page.svelte -->
<script lang="ts">
import Icon from "$lib/components/Icon.svelte";
import Meta from "$lib/components/Meta.svelte";
import SiteDisclosure from "$lib/components/SiteDisclosure.svelte";
// Sections are data, not markup: adding "Translators" is an admin action
let { data } = $props();
</script>
<Meta
title="Credits · pkviewer"
description="People who helped build pkviewer."
path="/credits"
/>
<main class="page stack">
<header class="stack-tight">
<h1>Credits</h1>
<p class="prose">
pkviewer exists because of people who reported things, broke things on
purpose, and said when something was wrong.
</p>
</header>
{#if !data.result.ok}
<p class="prose muted">
The credits could not be loaded right now. Please try again shortly.
</p>
{:else if data.result.value.sections.length === 0}
<p class="prose muted">Nobody is credited yet.</p>
{:else}
{#each data.result.value.sections as section (section.id)}
<section class="stack-tight">
<h2>{section.label}</h2>
{#if section.description}
<p class="muted">{section.description}</p>
{/if}
<ul class="credit-list">
{#each section.entries as entry (entry.id)}
<li>
<span class="credit-name">
{#if entry.url}
<!-- Rendered as a link and never fetched; user-supplied, so noopener -->
<a href={entry.url} rel="noopener nofollow ugc" target="_blank">
{entry.name} <Icon name="box-arrow-up-right" />
</a>
{:else}
{entry.name}
{/if}
</span>
{#if entry.detail}
<span class="muted"> — {entry.detail}</span>
{/if}
</li>
{/each}
</ul>
</section>
{/each}
{/if}
<SiteDisclosure />
</main>