Skip to content

Commit a6d76a8

Browse files
committed
Footer
1 parent 7a9d857 commit a6d76a8

File tree

8 files changed

+86
-15
lines changed

8 files changed

+86
-15
lines changed

apps/server/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
"@grpc/proto-loader": "^0.7.13",
1111
"@repo/database": "workspace:*",
1212
"@repo/shared": "workspace:*",
13+
"@trpc/server": "^11.0.1",
1314
"async-mutex": "^0.5.0",
1415
"cors": "^2.8.5",
1516
"dotenv": "^16.4.7",

apps/web/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"@repo/shared": "workspace:*",
1515
"@tailwindcss/vite": "^4.0.14",
1616
"@tanstack/react-query": "^5.71.1",
17+
"@trpc/client": "^11.0.1",
1718
"astro": "^5.5.3",
1819
"axios": "^1.8.3",
1920
"bech32": "^2.0.0",

apps/web/src/components/ui/Link.tsx

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,33 @@ import { ExternalLink } from "lucide-react";
22
import type { DetailedHTMLProps } from "react";
33

44
type Props = DetailedHTMLProps<React.AnchorHTMLAttributes<HTMLAnchorElement>, HTMLAnchorElement> & {
5-
isExternal?: boolean;
5+
variant?: keyof typeof linkVariants;
6+
showExternalIcon?: boolean;
67
};
78

8-
export const Link = ({ children, className, isExternal = false, ...rest }: Props) => (
9+
const linkVariants = {
10+
primary: "text-orange hover:underline",
11+
button: "rounded-lg px-3 py-1.5 text-white-muted hover:text-white hover:bg-white-muted/30",
12+
};
13+
14+
export const Link = ({
15+
children,
16+
className,
17+
variant = "primary",
18+
showExternalIcon = false,
19+
...rest
20+
}: Props) => (
921
<a
10-
className={"inline-flex items-center gap-2 text-orange hover:underline".concat(
22+
className={"inline-flex items-center gap-2 transition-all duration-100".concat(
23+
" ",
24+
linkVariants[variant],
1125
" ",
1226
className || "",
1327
)}
1428
{...rest}
1529
>
1630
{children}
1731

18-
{isExternal && <ExternalLink size={16} />}
32+
{showExternalIcon && <ExternalLink size={16} />}
1933
</a>
2034
);

apps/web/src/containers/PaymentSuccess.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ export const PaymentSuccess = ({ claim, onCancel }: Props) => {
3131
them yourself.
3232
</p>
3333

34-
<Link href={getClaimLink(claim.id)} target="_blank" rel="noreferrer" isExternal>
34+
<Link href={getClaimLink(claim.id)} target="_blank" rel="noreferrer" showExternalIcon>
3535
Reclaim sats
3636
</Link>
3737
</div>

apps/web/src/layouts/Layout.astro

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
import { Github, History, Home } from "lucide-react";
3+
import { Link } from "../components/ui/Link";
24
import "../styles/global.css";
35
---
46

@@ -14,15 +16,44 @@ import "../styles/global.css";
1416
name="description"
1517
content="The easiest way to orange-pill nocoiners by getting their hands dirty with their first sats. Plant the seeds of financial revolution."
1618
/>
17-
<script defer is:inline data-domain="stackorange.com" src="https://plausible.stackorange.com/js/script.js"></script>
19+
<script
20+
defer
21+
is:inline
22+
data-domain="stackorange.com"
23+
src="https://plausible.stackorange.com/js/script.js"></script>
1824
</head>
1925

2026
<body class="flex flex-col px-4 pt-12 min-h-screen max-w-4xl mx-auto">
2127
<main class="flex-1">
2228
<slot />
2329
</main>
2430

25-
<footer class="my-4 text-center text-white-muted">
31+
<footer class="mt-8 mb-4 text-center text-white-muted">
32+
<div class="mb-2 flex justify-center gap-8">
33+
<Link href="/" variant="button">
34+
<Home size={18} />
35+
36+
<span>Home</span>
37+
</Link>
38+
39+
<Link href="/history" variant="button">
40+
<History size={18} />
41+
42+
<span>Orange pill history</span>
43+
</Link>
44+
45+
<Link
46+
href="https://github.com/pycanis/stackorange"
47+
target="_blank"
48+
rel="noreferrer"
49+
variant="button"
50+
>
51+
<Github size={18} />
52+
53+
<span>GitHub</span>
54+
</Link>
55+
</div>
56+
2657
<p>
2758
© {new Date().getFullYear()} Stack Orange{/* · commit */}
2859
</p>

apps/web/src/pages/claim.astro

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ import Layout from "../layouts/Layout.astro";
258258
href="https://www.lopp.net/bitcoin-information.html"
259259
target="_blank"
260260
rel="noreferrer"
261-
isExternal
261+
showExternalIcon
262262
>
263263
Jameson Lopp's Resources
264264
</Link>
@@ -269,7 +269,7 @@ import Layout from "../layouts/Layout.astro";
269269
href="https://www.youtube.com/@Bitcoin_University"
270270
target="_blank"
271271
rel="noreferrer"
272-
isExternal
272+
showExternalIcon
273273
>
274274
Bitcoin University
275275
</Link>
@@ -280,7 +280,7 @@ import Layout from "../layouts/Layout.astro";
280280
href="https://learnmeabitcoin.com"
281281
target="_blank"
282282
rel="noreferrer"
283-
isExternal
283+
showExternalIcon
284284
>
285285
learn me a bitcoin
286286
</Link>
@@ -291,7 +291,7 @@ import Layout from "../layouts/Layout.astro";
291291
href="https://twentyone.world"
292292
target="_blank"
293293
rel="noreferrer"
294-
isExternal
294+
showExternalIcon
295295
>
296296
Twentyone.world
297297
</Link>
@@ -302,7 +302,7 @@ import Layout from "../layouts/Layout.astro";
302302
href="https://yzer.io"
303303
target="_blank"
304304
rel="noreferrer"
305-
isExternal
305+
showExternalIcon
306306
>
307307
Yzer
308308
</Link>

apps/web/src/pages/history.astro

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,4 @@
22
import Layout from "../layouts/Layout.astro";
33
---
44

5-
<Layout>
6-
WIP
7-
</Layout>
5+
<Layout> Will be implemented soon! </Layout>

pnpm-lock.yaml

Lines changed: 26 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)