[ui] DomiUi: Rosea's buttons and town search on @domi/ui v1.0.4 (CPAL-1.0, vendored by its own tool into packages/domi-ui), the licence credit at the foot of every screen, the README's copy line and public-domain sources; before-and-after pictures by pnpm look:shots
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<script lang="ts">
|
||||
import { Button, DOMI_ATTRIBUTION_TEXT, strike } from '@domi/ui';
|
||||
import { PRODUCT_NAME, type Gardener } from '@rosea/schema';
|
||||
import { tick } from 'svelte';
|
||||
import { en } from './copy/en.js';
|
||||
@@ -178,6 +179,7 @@
|
||||
<h1 bind:this={heading} tabindex="-1">{en.letter.title}</h1>
|
||||
<Letter {blocks} />
|
||||
<a href={GARDEN_HASH}>{en.letter.back}</a>
|
||||
{@render credit()}
|
||||
</main>
|
||||
{:else}
|
||||
<main class="shell">
|
||||
@@ -222,8 +224,11 @@
|
||||
{#if !kept}
|
||||
<p class="hint">{en.sunset.notKept}</p>
|
||||
{/if}
|
||||
<button type="button" class="quiet" onclick={() => (changing = true)}>{place ? en.sunset.change : en.sunset.choose}</button>
|
||||
<button type="button" class="quiet" bind:this={chairButton} onclick={() => (watching = true)}>{en.chair.move}</button>
|
||||
<Button variant="quiet" onclick={() => (changing = true)}>{place ? en.sunset.change : en.sunset.choose}</Button>
|
||||
<!-- @domi/ui's quiet button written as markup (INTEGRATE.md §3): focus comes back here after the sunset. -->
|
||||
<button type="button" class="domi-btn domi-btn--quiet" bind:this={chairButton} use:strike onclick={() => (watching = true)}>
|
||||
<span class="domi-btn__label">{en.chair.move}</span>
|
||||
</button>
|
||||
</div>
|
||||
{#if watching}
|
||||
<ChairSunset {place} guessed={choice?.kind === 'device-zone'} now={sunset.now} onclose={stopWatching} />
|
||||
@@ -233,13 +238,23 @@
|
||||
{#if blocks.length > 0}
|
||||
<a href={LETTER_HASH}>{en.letter.title}</a>
|
||||
{/if}
|
||||
{@render credit()}
|
||||
</main>
|
||||
{/if}
|
||||
|
||||
<!--
|
||||
The licence's credit (CPAL-1.0 Exhibit B, for Rosea and for @domi/ui): its exact words, at the foot of every screen
|
||||
from the first open on (domi-ui.md D9). Plain text, not @domi/ui's DomiCredit link: the garden is offline, and a
|
||||
tap must never carry the player out of it, least of all on Android, which has no internet at all.
|
||||
-->
|
||||
{#snippet credit()}
|
||||
<p class="credit">{DOMI_ATTRIBUTION_TEXT}</p>
|
||||
{/snippet}
|
||||
|
||||
{#if updateReady && onrefresh}
|
||||
<aside class="update" aria-label={en.update.ready}>
|
||||
<p role="status">{en.update.ready}</p>
|
||||
<button type="button" onclick={onrefresh}>{en.update.refresh}</button>
|
||||
<Button onclick={onrefresh}>{en.update.refresh}</Button>
|
||||
</aside>
|
||||
{/if}
|
||||
|
||||
@@ -296,14 +311,11 @@
|
||||
font-size: 0.9rem;
|
||||
}
|
||||
|
||||
.quiet {
|
||||
font: inherit;
|
||||
background: none;
|
||||
border: none;
|
||||
padding: var(--space-1) 0;
|
||||
color: var(--rose);
|
||||
text-decoration: underline;
|
||||
cursor: pointer;
|
||||
.credit {
|
||||
margin: var(--space-4) 0 0;
|
||||
font-size: 0.8rem;
|
||||
color: var(--ink-soft);
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.update {
|
||||
@@ -323,20 +335,4 @@
|
||||
margin: 0;
|
||||
color: var(--ink-soft);
|
||||
}
|
||||
|
||||
.update button {
|
||||
font: inherit;
|
||||
padding: var(--space-1) var(--space-3);
|
||||
border-radius: 999px;
|
||||
border: 1px solid var(--rose);
|
||||
background: var(--paper);
|
||||
color: var(--ink);
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.update button:focus-visible,
|
||||
.quiet:focus-visible {
|
||||
outline: 2px solid var(--rose);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user