Skip to content

Commit 16e7238

Browse files
jomoormannclaude
andcommitted
Move the experimental badge to the top right and tidy the landing page
- The badge sits in the header corner and says: test funds only, with the address for feedback. With a wallet connected it sits just below the header. - The line under "How it works" is in an info box without an icon. - The film has no heading and sits closer to the section above. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
1 parent 2a3152c commit 16e7238

4 files changed

Lines changed: 45 additions & 23 deletions

File tree

‎src/app.tsx‎

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { shortAddress } from "./lib/format.ts";
44
import { type Address, parseAddress, sameAddress } from "./lib/hex.ts";
55
import { buildChanged, lastAccount, lastWallet, setLastAccount, setLastWallet } from "./lib/store.ts";
66
import { type WalletOption, accountsOf, chainIdOf, errorText, isRejection, rpcOf, switchChain, watchWallets } from "./lib/wallet.ts";
7-
import { AddressText, Button, Modal, Notice, type Session } from "./ui/common.tsx";
7+
import { AddressText, Button, Experimental, Modal, Notice, type Session } from "./ui/common.tsx";
88
import { CreatePage } from "./ui/create.tsx";
99
import { ByZodiac, Lockup } from "./ui/logo.tsx";
1010
import { StartPage, vaultHref } from "./ui/start.tsx";
@@ -226,7 +226,10 @@ export function App() {
226226
</Button>
227227
</div>
228228
</details>
229-
) : route.page === "start" ? null : (
229+
) : route.page === "start" ? (
230+
// The landing page has its own button to connect. This corner says that the app is new.
231+
<Experimental />
232+
) : (
230233
// The welcome screen has its own button. Everywhere else this is the way in.
231234
<Button small onClick={() => setConnectOpen(true)}>
232235
Connect wallet

‎src/styles.css‎

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ strong {
146146

147147
.top {
148148
display: flex;
149+
flex-wrap: wrap;
149150
align-items: center;
150151
justify-content: space-between;
151152
gap: 12px;
@@ -553,10 +554,6 @@ a:focus-visible {
553554
white-space: nowrap;
554555
}
555556

556-
.hiw-after {
557-
color: var(--muted);
558-
font-size: 0.95rem;
559-
}
560557

561558
@container (max-width: 480px) {
562559
.hiw ol {
@@ -670,6 +667,11 @@ a:focus-visible {
670667
text-align: center;
671668
}
672669

670+
/* The film has no heading of its own. It belongs to "How it works", so it sits closer. */
671+
.start > .film-section {
672+
margin-top: 72px;
673+
}
674+
673675
.film-poster {
674676
position: relative;
675677
padding: 0;
@@ -1940,12 +1942,6 @@ a:focus-visible {
19401942
padding: 10vh 0 6vh;
19411943
}
19421944

1943-
.hiw-after {
1944-
text-align: center;
1945-
text-wrap: pretty;
1946-
max-width: 52ch;
1947-
margin: 0 auto;
1948-
}
19491945

19501946
.section-center {
19511947
justify-items: center;
@@ -2357,6 +2353,16 @@ button.row-strong:hover .row-hint {
23572353
margin: 0;
23582354
}
23592355

2356+
.info-box-center {
2357+
justify-content: center;
2358+
text-align: center;
2359+
}
2360+
2361+
.experimental-row {
2362+
display: flex;
2363+
justify-content: flex-end;
2364+
}
2365+
23602366
/* The app is new. This is a risk, so it has the colour of a risk. */
23612367
.experimental {
23622368
display: inline-flex;
@@ -2365,12 +2371,12 @@ button.row-strong:hover .row-hint {
23652371
justify-content: center;
23662372
gap: 6px 10px;
23672373
margin: 0;
2368-
padding: 6px 16px 6px 6px;
2374+
padding: 5px 14px 5px 5px;
23692375
border: 1px solid var(--risk-line);
23702376
border-radius: 20px;
23712377
background: var(--risk-bg);
23722378
color: var(--risk-fg);
2373-
font-size: 0.9rem;
2379+
font-size: 0.82rem;
23742380
text-wrap: pretty;
23752381
}
23762382

‎src/ui/common.tsx‎

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,18 @@ export function Notice(props: { kind: "risk" | "bad" | "info" | "good"; title?:
139139
);
140140
}
141141

142+
/** The app is new. This says so, and where feedback goes. It sits at the top right of the landing page. */
143+
export function Experimental() {
144+
return (
145+
<p class="experimental">
146+
<span class="experimental-tag">Experimental</span>
147+
<span>
148+
Test funds only. Feedback to <a href="mailto:johannes@zodiac.eco">johannes@zodiac.eco</a> ❤️
149+
</span>
150+
</p>
151+
);
152+
}
153+
142154
/** Copies text. True when it worked. Some browsers and frames do not allow the modern way, so the old one is tried too. */
143155
export async function copyText(text: string): Promise<boolean> {
144156
try {

‎src/ui/start.tsx‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { type Address, parseAddress, sameAddress } from "../lib/hex.ts";
99
import { blockHints, rememberVault, vaultsOf } from "../lib/store.ts";
1010
import { isRejection, switchChain } from "../lib/wallet.ts";
1111
import { discover, inspect } from "../lib/chronobox.ts";
12-
import { Button, type Session } from "./common.tsx";
12+
import { Button, Experimental, type Session } from "./common.tsx";
1313
import { HowItWorks } from "./how.tsx";
1414
import { Mark } from "./logo.tsx";
1515

@@ -193,13 +193,13 @@ export function StartPage(props: { session: Session | null; chain: Chain | undef
193193

194194
return (
195195
<div class="start">
196+
{/* Without a wallet the notice is in the header. With one, the wallet is there, so the notice is here. */}
197+
{session ? (
198+
<div class="experimental-row">
199+
<Experimental />
200+
</div>
201+
) : null}
196202
<section class="hero">
197-
<p class="experimental">
198-
<span class="experimental-tag">Experimental</span>
199-
<span>
200-
Do not put serious money in yet. Send feedback to <a href="mailto:johannes@zodiac.eco">johannes@zodiac.eco</a>.
201-
</span>
202-
</p>
203203
<h1>Money that cannot leave in a hurry.</h1>
204204
<p class="lead">Every withdrawal has to wait. No password, no threat and no stolen key can make it faster. Not even you can.</p>
205205
<div class="hero-actions">
@@ -251,11 +251,12 @@ export function StartPage(props: { session: Session | null; chain: Chain | undef
251251
<section class="section" id="how">
252252
<h2>How it works</h2>
253253
<HowItWorks />
254-
<p class="hiw-after">When you need the money, you ask for it. When the wait ends, you collect it and it goes back to your wallet. You can cancel until then.</p>
254+
<div class="info-box info-box-center">
255+
<p>When you need the money, you ask for it. When the wait ends, you collect it and it goes back to your wallet. You can cancel until then.</p>
256+
</div>
255257
</section>
256258

257259
<section class="section film-section">
258-
<h2>See it in 35 seconds</h2>
259260
{film ? (
260261
<video class="film" src={FILM} poster={POSTER} controls autoplay playsinline />
261262
) : (

0 commit comments

Comments
 (0)