refactor: move donation to React

This commit is contained in:
MAZE 2024-02-08 19:47:31 +03:30
parent 3f45be3942
commit c505c574a8
5 changed files with 60 additions and 57 deletions

View File

@ -1,56 +0,0 @@
---
import { Container } from '@/components/container';
---
<Container>
<section class="wrapper">
<p class="text">
Enjoy Moodist? <a
href="https://buymeacoffee.com/remvze"
rel="noreferrer"
target="_blank"
>
Support with a donation!
</a>
</p>
</section>
</Container>
<style>
.wrapper {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
padding: 16px;
font-size: var(--font-xsm);
color: var(--color-foreground-subtle);
&::after {
position: absolute;
bottom: 0;
left: 50%;
width: 80%;
height: 1px;
content: '';
background: linear-gradient(
90deg,
transparent,
var(--color-neutral-200),
transparent
);
transform: translateX(-50%);
}
& .text {
text-align: center;
& a {
font-weight: 500;
color: var(--color-foreground);
text-decoration: none;
}
}
}
</style>

View File

@ -0,0 +1,36 @@
.wrapper {
position: relative;
display: flex;
align-items: center;
justify-content: center;
width: 100%;
padding: 16px;
font-size: var(--font-xsm);
color: var(--color-foreground-subtle);
&::after {
position: absolute;
bottom: 0;
left: 50%;
width: 80%;
height: 1px;
content: '';
background: linear-gradient(
90deg,
transparent,
var(--color-neutral-200),
transparent
);
transform: translateX(-50%);
}
& .text {
text-align: center;
& a {
font-weight: 500;
color: var(--color-foreground);
text-decoration: none;
}
}
}

View File

@ -0,0 +1,22 @@
import { Container } from '@/components/container';
import styles from './donate.module.css';
export function Donate() {
return (
<Container>
<section className={styles.wrapper}>
<p className={styles.text}>
Enjoy Moodist?{' '}
<a
href="https://buymeacoffee.com/remvze"
rel="noreferrer"
target="_blank"
>
Support with a donation!
</a>
</p>
</section>
</Container>
);
}

View File

@ -0,0 +1 @@
export { Donate } from './donate';

View File

@ -1,11 +1,11 @@
---
import Layout from '@/layouts/layout.astro';
import Donate from '@/components/donate.astro';
import Footer from '@/components/footer.astro';
import { Hero } from '@/components/hero';
import { App } from '@/components/app';
import { Source } from '@/components/source';
import { Donate } from '@/components/donate';
---
<Layout title="Moodist: Ambient Sounds for Focus and Calm">