Skip to content

Commit 4f0f00b

Browse files
Add donation info including QR code
1 parent c5df2d3 commit 4f0f00b

File tree

6 files changed

+1244
-3
lines changed

6 files changed

+1244
-3
lines changed

pages/community/donate.mdx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ It also enables us to fund important Open Source projects within the ReScript ec
1414

1515
## How to Donate?
1616

17-
TODO:
18-
* Add stripe payment link: https://stripe.com/at/payments/payment-links
19-
* Add open collective link?
17+
For now we only support SEPA transfers.
18+
19+
20+
<DonationForm />

public/static/donation_qr_code.svg

Lines changed: 1196 additions & 0 deletions
Loading

src/components/Markdown.res

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -529,6 +529,11 @@ module Video = {
529529
}
530530
}
531531

532+
module DonationForm = {
533+
@react.component
534+
let make = () => <DonationForm />
535+
}
536+
532537
// Useful for debugging injected values in props
533538
// let mdxTestComponent: React.component<{.}> = %raw(`
534539
// function(children) {

src/components/Markdown.resi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,11 @@ module Video: {
169169
let make: (~src: string, ~caption: string=?) => React.element
170170
}
171171

172+
module DonationForm: {
173+
@react.component
174+
let make: unit => React.element
175+
}
176+
172177
// Used for the MdxJS Provider
173178

174179
/* Sets our preferred branded styles

src/components/MarkdownComponents.res

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ type t = {
2121
urlBox?: React.componentLike<UrlBox.props<string, string, Mdx.MdxChildren.t>, React.element>,
2222
@as("CodeTab")
2323
codeTab?: CodeTab.props<Mdx.MdxChildren.t, array<string>> => React.element,
24+
@as("DonationForm")
25+
donationForm?: React.componentLike<DonationForm.props, React.element>,
2426
/* Common markdown elements */
2527
p?: P.props<React.element> => React.element,
2628
li?: Li.props<React.element> => React.element,
@@ -74,4 +76,5 @@ let default = {
7476
pre: Pre.make,
7577
blockquote: Blockquote.make,
7678
code: Code.make,
79+
donationForm: DonationForm.make,
7780
}

src/others/DonationForm.res

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// TODO (fham): Make this a stripe checkout form.
2+
// 1. Create a rescript-association stripe account
3+
// 2. Use stripe's library on npm
4+
5+
@react.component
6+
let make = () => {
7+
<div className="max-w-2xl">
8+
<div className="mb-6">
9+
<div className="py-4 font-mono">
10+
<p>
11+
<strong> {React.string("IBAN: ")} </strong>
12+
{React.string("AT24 2021 9000 2110 4161")}
13+
</p>
14+
<p>
15+
<strong> {React.string("BIC: ")} </strong>
16+
{React.string("GIBAATWWXXX")}
17+
</p>
18+
<p>
19+
<strong> {React.string("Bank: ")} </strong>
20+
{React.string("Erste Bank der oesterreichischen Sparkassen AG")}
21+
</p>
22+
<p>
23+
<strong> {React.string("Account Name: ")} </strong>
24+
{React.string("ReScript Association")}
25+
</p>
26+
</div>
27+
</div>
28+
29+
<img src="/static/donation_qr_code.svg" className="w-48 mx-auto mt-6" alt="SEPA QR Code" />
30+
</div>
31+
}

0 commit comments

Comments
 (0)