Skip to content

Commit 706905a

Browse files
committed
Add basic donation page
1 parent 114a31c commit 706905a

File tree

7 files changed

+110
-20
lines changed

7 files changed

+110
-20
lines changed

src/components/Donation.astro

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
---
2+
const { lang } = Astro.props;
3+
4+
import { getEntry } from "astro:content";
5+
6+
const strings = await getEntry("strings", `${lang}/strings`);
7+
8+
const github = "https://github.com/sponsors/FossifyOrg";
9+
const patreon = "https://www.patreon.com/naveen3singh";
10+
const paypal = "https://paypal.me/naveen3singh";
11+
const liberapay = "https://liberapay.com/naveensingh";
12+
const opencollective = "https://opencollective.com/fossify";
13+
const bitcoin = "bc1q5flmuh5f3canqza07cfekjn64p2aqvd2w7pnn3";
14+
const ethereum = "0x9354fC372BC3BdA58766a8a9Fabadf77A76CdE01";
15+
const monero =
16+
"48FkVUcJ7AGeBMR4SC4J7QU5nAt6YNwKZWz6sGDT1s5haEY7reZtJr5CniXLaQzTzGAuZNoc83BQAcETHw1d3Lkn8AAf1XF";
17+
const tron = "TGi4VpD1D9A9ZvyP9d3aVowwzMSvev2hub";
18+
---
19+
20+
<section class="wrapper">
21+
<h1>{strings?.data.donation.title}</h1>
22+
<p>{strings?.data.donation.description}</p>
23+
<div class="support-list">
24+
<p>
25+
<strong>GitHub Sponsors:</strong>
26+
<a href={github} target="_blank">{github}</a>
27+
</p>
28+
<p>
29+
<strong>Patreon:</strong>
30+
<a href={patreon} target="_blank">{patreon}</a>
31+
</p>
32+
<p>
33+
<strong>PayPal:</strong>
34+
<a href={paypal} target="_blank">{paypal}</a>
35+
</p>
36+
<p>
37+
<strong>Liberapay:</strong>
38+
<a href={liberapay} target="_blank">{liberapay}</a>
39+
</p>
40+
<p>
41+
<strong>OpenCollective:</strong>
42+
<a href={opencollective} target="_blank">{opencollective}</a>
43+
</p>
44+
<p><strong>Bitcoin:</strong> <code>{bitcoin}</code></p>
45+
<p><strong>Ethereum:</strong><code>{ethereum}</code></p>
46+
<p><strong>Monero:</strong> <code>{monero}</code></p>
47+
<p><strong>Tron:</strong> <code>{tron}</code></p>
48+
</div>
49+
</section>
50+
51+
<style>
52+
section > h1 {
53+
text-align: center;
54+
font-weight: 600;
55+
color: var(--primary);
56+
font-size: var(--fs-lg);
57+
}
58+
59+
section > p {
60+
text-align: center;
61+
margin: 1rem 0;
62+
}
63+
64+
.support-list a {
65+
color: var(--primary);
66+
}
67+
68+
.support-list p > strong {
69+
font-weight: 600;
70+
}
71+
72+
.support-list p {
73+
margin: 0.75rem 0;
74+
}
75+
76+
.support-list code {
77+
background-color: var(--surface-container);
78+
padding: 0.25rem 0.5rem;
79+
border-radius: 0.25rem;
80+
margin-right: 0.5rem;
81+
}
82+
</style>

src/components/Hero.astro

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,21 @@ const { lang } = Astro.props;
77
import { getEntry } from "astro:content";
88
import { Image } from "astro:assets";
99
const strings = await getEntry("strings", `${lang}/strings`);
10+
11+
import { getRelativeLocaleUrl } from "astro:i18n";
12+
13+
const donateURL = getRelativeLocaleUrl(lang, "donate");
1014
---
1115

1216
<section>
1317
<div class="text">
1418
<h1>{strings?.data.hero.title}</h1>
1519
<p>{strings?.data.hero.subtitle}</p>
16-
<button
17-
><a
18-
href="https://github.com/FossifyOrg#support-fossify-heart"
19-
target="_blank"><Icon name="github" /> {strings?.data.hero.donate}</a
20-
></button
21-
>
20+
<button>
21+
<a href={donateURL}>
22+
<Icon name="donation" /> {strings?.data.hero.donate}
23+
</a>
24+
</button>
2225
</div>
2326
<Image
2427
src={heroImage}

src/content/config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,10 @@ const strings = defineCollection({
3131
text: z.string()
3232
})
3333
}),
34+
donation: z.object({
35+
title: z.string(),
36+
description: z.string(),
37+
}),
3438
products: z.object({
3539
title: z.string(),
3640
description: z.string(),

src/content/strings/ar/strings.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
"text": "بناء تطبيقات محمولة تحترم الخصوصية للجميع. يعيد Fossify إحياء إرث @SimpleMobileTools، ويصنع أدوات مفتوحة المصدر خالية من الإعلانات وسهلة الاستخدام. نمنح الأفراد والمجتمعات التكنولوجيا التي تحترم خصوصيتهم وتبسط الأمور."
2626
}
2727
},
28+
"donation": {
29+
"title": "Support Fossify ❤️",
30+
"description": "If you'd like to support Fossify's development, consider making a donation using any of the following options."
31+
},
2832
"products": {
2933
"title": "منتجاتنا",
3034
"description": "تعتبر تطبيقات Fossify مجموعة من التطبيقات المحمولة مدعومة من المجتمع، مفتوحة المصدر، وخالية من الإعلانات. فرع من @SimpleMobileTools الذي لم يعد مُحتفظ به، ونحن هنا لمواصلة التراث، وجلب التكنولوجيا البسيطة والخاصة إلى الجميع.",

src/content/strings/en/strings.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
"text": "Building privacy-first mobile apps for everyone. Fossify revives the legacy of @SimpleMobileTools, crafting open-source tools that are ad-free and easy to use. We empower individuals and communities with technology that respects their privacy and keeps things simple."
2626
}
2727
},
28+
"donation": {
29+
"title": "Support Fossify ❤️",
30+
"description": "If you'd like to support Fossify's development, consider making a donation using any of the following options."
31+
},
2832
"products": {
2933
"title": "Our products",
3034
"description": "Fossify apps are a community-backed, open-source, and ad-free suite of mobile apps. A fork of the @SimpleMobileTools, which is no longer maintained, and we're here to continue the legacy, bringing simple and private tech to everyone.",
@@ -43,4 +47,4 @@
4347
"footer": {
4448
"copyright": "Copyright © 2025, All Rights Reserved"
4549
}
46-
}
50+
}

src/icons/donation.svg

Lines changed: 1 addition & 0 deletions
Loading

src/pages/donate.astro

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,8 @@
11
---
2-
const redirectUrl = "https://github.com/FossifyOrg/#support-fossify-heart";
2+
import Layout from "../layouts/Layout.astro";
3+
import Donation from "../components/Donation.astro";
34
---
45

5-
<html lang="en">
6-
<head>
7-
<meta charset="utf-8" />
8-
<title>Redirecting to Donation Page...</title>
9-
<meta http-equiv="refresh" content={`0; url=${redirectUrl}`} />
10-
</head>
11-
<body>
12-
<p>
13-
If you are not redirected, please <a href={redirectUrl}>click here</a>.
14-
</p>
15-
</body>
16-
</html>
6+
<Layout title="Fossify | Donate" lang="en" dir="ltr">
7+
<Donation lang="en" />
8+
</Layout>

0 commit comments

Comments
 (0)