Skip to content

Commit

Permalink
Added donate on open-collective
Browse files Browse the repository at this point in the history
  • Loading branch information
flabbet committed Nov 26, 2024
1 parent 2f5e51a commit 3ff6f98
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 10 deletions.
37 changes: 37 additions & 0 deletions website/src/css/donation.css
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,43 @@ h1 {
margin: 20px 0;
}

.donate-btn-split {
display: flex;
margin-top: 35px;
gap: 10px;
}

.donate-btn-split a {
text-decoration: none;
display: flex;
align-items: center;
justify-content: center;
height: 50px;
border-radius: 5px;
font-size: 16px;
transition: all 0.3s ease;
}

.donate-btn-split-general {
flex: 1;
background-color: #ff315a;
border: none;
}

.donate-btn-split-option {
color: white;
border: 2px solid #ff315a;
padding: 0 15px;
min-width: fit-content;
}

.donate-btn-split-option:hover {
background-color: #ff315a;
color: white;
border: 2px solid #ff315a;
}


@media only screen and (max-width: 1024px) {
.one-time-donate-container {
flex-direction: column;
Expand Down
32 changes: 22 additions & 10 deletions website/src/pages/donate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const DonateWidget = (props) => {
setPickedOption(option);
};

/*<TogglePicker
/*<TogglePicker
label1="Monthly"
label2="One-time"
onOptionSelected={optionSelected}
Expand Down Expand Up @@ -44,24 +44,36 @@ dangerouslySetInnerHTML={{
</div>
)}*/


return (
<div className="donate-buttons">
<div className="one-time-donate-container">
<div>
<iframe src="https://store.steampowered.com/widget/2435860/" width="646" height="190"></iframe>
</div>
</div>
<div className="one-time-donate-container">
<div>
<iframe
src="https://store.steampowered.com/widget/2435860/"
width="646"
height="190"
></iframe>
<div className="donate-btn-split" style={{ marginTop: 35 }}>
<a className="btn-text big donate-btn-split-general" href="https://opencollective.com/pixieditor" target="_blank">
Donate on OpenCollective
</a>
<a className="donate-btn-split-option" href="https://opencollective.com/pixieditor/contribute/silver-tier-81980/checkout?interval=month&amount=5&contributeAs=me" target="_blank">5$</a>
<a className="donate-btn-split-option" href="https://opencollective.com/pixieditor/contribute/gold-tier-81981/checkout?interval=month&amount=10&contributeAs=me" target="_blank">10$</a>
<a className="donate-btn-split-option" href="https://opencollective.com/pixieditor/contribute/diamond-tier-81982/checkout?interval=month&amount=25&contributeAs=me" target="_blank">25$</a>
</div>
</div>
</div>
</div>
);
};

class Donate extends React.Component {

componentDidMount(): void {

if (document.getElementById("stripe-js") || document.getElementById("stripe-js-2")) {
if (
document.getElementById("stripe-js") ||
document.getElementById("stripe-js-2")
) {
return;
}

Expand Down

0 comments on commit 3ff6f98

Please sign in to comment.