Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix data/stripe_products.yml format #177

Merged
merged 3 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions data/stripe_products.yml
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
- label: "€ 10.00"
id: "eur:1000"
payment_link: "test_cN28zq9FF4KU5NebII"
payment_link: "https://donate.stripe.com/test_cN28zq9FF4KU5NebII"

- label: "€ 20.00"
id: "eur:2000"
payment_link: "test_bIY7vmaJJ2CM4Ja7st"
payment_link: "https://donate.stripe.com/test_bIY7vmaJJ2CM4Ja7st"

- label: "€ 50.00"
id: "eur:5000"
payment_link: "test_cN28zq9FF4KU5NebII"
payment_link: "https://donate.stripe.com/test_cN28zq9FF4KU5NebII"

- label: "€ 100.00"
id: "eur:10000"
payment_link: "test_bIY7vmaJJ2CM4Ja7st"
payment_link: "https://donate.stripe.com/test_bIY7vmaJJ2CM4Ja7st"

- label: "€ 250.00"
id: "eur:25000"
payment_link: "test_bIY7vmaJJ2CM4Ja7st"
payment_link: "https://donate.stripe.com/test_bIY7vmaJJ2CM4Ja7st"

- label: "$ 10.00"
id: "usd:1000"
payment_link: "test_cN28zq9FF4KU5NebII"
payment_link: "https://donate.stripe.com/test_cN28zq9FF4KU5NebII"

- label: "$ 20.00"
id: "usd:2000"
payment_link: "test_bIY7vmaJJ2CM4Ja7st"
payment_link: "https://donate.stripe.com/test_bIY7vmaJJ2CM4Ja7st"

- label: "$ 50.00"
id: "usd:5000"
payment_link: "test_cN28zq9FF4KU5NebII"
payment_link: "https://donate.stripe.com/test_cN28zq9FF4KU5NebII"

- label: "$ 100.00"
id: "usd:10000"
payment_link: "test_bIY7vmaJJ2CM4Ja7st"
payment_link: "https://donate.stripe.com/test_bIY7vmaJJ2CM4Ja7st"

- label: "$ 250.00"
id: "usd:25000"
payment_link: "test_bIY7vmaJJ2CM4Ja7st"
payment_link: "https://donate.stripe.com/test_bIY7vmaJJ2CM4Ja7st"
2 changes: 1 addition & 1 deletion themes/hugo-bulma-blocks-theme/assets/js/donate.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ function updatePaymentLink() {
// set href to "Donate" button depending on selected value
let paymentLink = document.getElementById('donate-stripe').querySelector('input[name="amount"]:checked').value;
let donateBtn = document.getElementById('submit-button');
donateBtn.href = "https://donate.stripe.com/" + paymentLink;
donateBtn.href = paymentLink;
};

function updateCurrency() {
dqunbp marked this conversation as resolved.
Show resolved Hide resolved
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
@import "richlist"
@import "fund"
@import "roadmap"
@import "stripe"
Original file line number Diff line number Diff line change
Expand Up @@ -51,33 +51,6 @@
padding: 50px 0
z-index: 1
align-self: normal
.stripe-widget
background: #fff
border-radius: 20px
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1)
padding: 20px
width: 100%
p
font-size: 20px
font-weight: 500
&:not(:last-child)
margin-bottom: 0
hr
margin: 0.5rem 0 1rem
.submit-button
height: 50px
margin: 1rem 0 1rem
.alpha70
font-weight: 300
color: #4D6370
.currency
font-weight: 300
color: #4D6370
.picker
padding-left: 1rem
padding-right: 1rem
&:hover
color: #fff !important

.coloring-1
&::after
Expand Down Expand Up @@ -204,5 +177,3 @@
width: 100%
&::after
width: 100%
.stripe-widget
border-radius: 10px
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.stripe-widget
background: #fff
border-radius: 20px
box-shadow: 0 0 10px rgba(0, 0, 0, 0.1)
padding: 20px
width: 100%
p
font-size: 20px
font-weight: 500
&:not(:last-child)
margin-bottom: 0
hr
margin: 0.5rem 0 1rem
.submit-button
height: 50px
margin: 1rem 0 1rem
.alpha70
font-weight: 300
color: #4D6370
.currency
font-weight: 300
color: #4D6370
.picker
padding-left: 1rem
padding-right: 1rem
&:hover
color: #fff !important
#submit-button
width: 100%
border-radius: 10px
select
display: inline-block
margin-left: auto

@media screen and (max-width: 768px)
.stripe-widget
border-radius: 10px
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,17 @@
<a
id="submit-button"
class="button is-primary1"
style="width: 100%; border-radius: 10px"
rel="noopener noreferrer"
target="_blank"
{{/* href to be set by js depending on selected donation */}}
>Donate
</a>

<div class="is-flex is-justify-content-space-between">
{{ if .Get "otherMethods" }}
<a class="alpha70" href="{{ absURL "donate/" }}">Other methods, more info</a>
{{ end }}
<select id="currency" class="currency" style="display: inline-block; margin-left: auto" onchange="updateCurrency()">
<select id="currency" class="currency" onchange="updateCurrency()">
<option value="usd">USD</option>
<option value="eur">EUR</option>
</select>
Expand Down
Loading