From d449c29321024a43517e92cc59223b4b22fe2e82 Mon Sep 17 00:00:00 2001 From: MAZE Date: Thu, 1 Feb 2024 22:23:49 +0330 Subject: [PATCH] feat: add donate section --- src/components/categories/categories.tsx | 17 +++-- .../categories/donate/donate.module.css | 63 +++++++++++++++++++ src/components/categories/donate/donate.tsx | 27 ++++++++ src/components/categories/donate/index.ts | 1 + 4 files changed, 102 insertions(+), 6 deletions(-) create mode 100644 src/components/categories/donate/donate.module.css create mode 100644 src/components/categories/donate/donate.tsx create mode 100644 src/components/categories/donate/index.ts diff --git a/src/components/categories/categories.tsx b/src/components/categories/categories.tsx index b7b7687..857751a 100644 --- a/src/components/categories/categories.tsx +++ b/src/components/categories/categories.tsx @@ -1,6 +1,7 @@ import { AnimatePresence } from 'framer-motion'; import { Category } from '@/components/category'; +import { Donate } from './donate'; import type { Categories } from '@/data/types'; @@ -11,12 +12,16 @@ interface CategoriesProps { export function Categories({ categories }: CategoriesProps) { return ( - {categories.map(category => ( - + {categories.map((category, index) => ( + <> + + + {index === 3 && } + ))} ); diff --git a/src/components/categories/donate/donate.module.css b/src/components/categories/donate/donate.module.css new file mode 100644 index 0000000..de92935 --- /dev/null +++ b/src/components/categories/donate/donate.module.css @@ -0,0 +1,63 @@ +.donate { + & .iconContainer { + display: flex; + flex-direction: column; + align-items: center; + margin-bottom: 15px; + + & .tail { + width: 1px; + height: 75px; + background: linear-gradient(transparent, var(--color-neutral-300)); + } + + & .icon { + display: flex; + align-items: center; + justify-content: center; + width: 45px; + height: 45px; + font-size: var(--font-md); + background-color: var(--color-neutral-100); + border: 1px solid var(--color-neutral-300); + border-radius: 50%; + } + } + + & .title { + font-family: var(--font-display); + font-size: var(--font-lg); + font-weight: 600; + text-align: center; + } + + & .desc { + margin-top: 8px; + color: var(--color-foreground-subtle); + text-align: center; + } + + .button { + position: relative; + display: flex; + align-items: center; + justify-content: center; + width: max-content; + height: 40px; + padding: 0 20px; + margin: 16px auto 0; + font-size: var(--font-xsm); + font-weight: 500; + color: var(--color-neutral-subtle); + text-decoration: none; + cursor: pointer; + background-color: var(--color-neutral-50); + border: 1px solid var(--color-neutral-200); + border-radius: 50px; + transition: 0.2s; + + &:hover { + background-color: var(--color-neutral-100); + } + } +} diff --git a/src/components/categories/donate/donate.tsx b/src/components/categories/donate/donate.tsx new file mode 100644 index 0000000..7089285 --- /dev/null +++ b/src/components/categories/donate/donate.tsx @@ -0,0 +1,27 @@ +import { FaCoffee } from 'react-icons/fa/index'; + +import styles from './donate.module.css'; + +export function Donate() { + return ( +
+
+
+
+ +
+
+ +

Support Me

+

Help me keep Moodist ad-free.

+ + Donate Today + +
+ ); +} diff --git a/src/components/categories/donate/index.ts b/src/components/categories/donate/index.ts new file mode 100644 index 0000000..a37b9c0 --- /dev/null +++ b/src/components/categories/donate/index.ts @@ -0,0 +1 @@ +export { Donate } from './donate';