Files
Rosea/packages/domi-ui/src/components/DomiCredit.svelte
T

27 lines
1.3 KiB
Svelte

<!-- SPDX-License-Identifier: CPAL-1.0 -->
<!--
The licence credit (CPAL-1.0 Exhibit B): "Built on Domi", the URL and the copyright notice, exactly. Place it where
it is seen when the app starts or a session begins (the first screen's foot, the sign-in screen, a splash), no less
prominent than any other credit there. The words are fixed by the licence: do not translate or shorten them.
-->
<script lang="ts">
import { DOMI_ATTRIBUTION as A } from '../lib/credit';
interface Props {
/**
* true (default): the URL is a link. false: the URL is plain text, for an offline app (Rosea's game, an app with
* no network): the licence asks for the URL to be shown, not to be clickable.
*/
link?: boolean;
class?: string;
}
let { link = true, class: cls = '' }: Props = $props();
</script>
<p class={['domi-credit', cls]}>
<!-- Real spaces around the dots, so copied text reads as the licence writes it; flex ignores them in layout. -->
<span>{A.phrase}</span> <span class="domi-credit__dot" aria-hidden="true">·</span>
{#if link}<a href={A.url} target="_blank" rel="noopener noreferrer">{A.url}</a>{:else}<span class="domi-credit__url">{A.url}</span>{/if}
<span class="domi-credit__dot" aria-hidden="true">·</span> <span>{A.copyright}</span>
</p>