feat: add about section

This commit is contained in:
MAZE 2023-10-31 18:41:05 +03:30
parent f3603e8431
commit 4e84419ab1
4 changed files with 57 additions and 0 deletions

View file

@ -0,0 +1,19 @@
.about {
padding: 120px 0;
& .title {
margin-bottom: 12px;
font-family: var(--font-display);
font-size: var(--font-lg);
font-weight: 600;
}
& .desc {
color: var(--color-foreground-subtle);
line-height: 1.7;
& span {
color: var(--color-foreground);
}
}
}

View file

@ -0,0 +1,35 @@
import { Container } from '@/components/container';
import { sounds } from '@/data/sounds';
import styles from './about.module.css';
import { useMemo } from 'react';
export function About() {
const count = useMemo(() => {
let count = 0;
sounds.categories.forEach(category => {
count += category.sounds.length;
});
return count;
}, []);
return (
<div className={styles.about}>
<Container>
<h2 className={styles.title}>What is Moodist?</h2>
<p className={styles.desc}>
Moodist is your gateway to a world of serenity and focus. It&apos;s a
free and registration-free online ambient sound generator offering{' '}
<span>{count}</span> handpicked sounds in various categories, from
nature&apos;s tranquil melodies to the soothing ambiance of urban
life. Whether you&apos;re seeking relaxation or a productivity boost,
Moodist lets you effortlessly customize your environment with the
perfect background sounds.
</p>
</Container>
</div>
);
}

View file

@ -0,0 +1 @@
export { About } from './about';

View file

@ -3,12 +3,14 @@ import Layout from '@/layouts/layout.astro';
import { Hero } from '@/components/hero'; import { Hero } from '@/components/hero';
import { App } from '@/components/app'; import { App } from '@/components/app';
import { About } from '@/components/about';
--- ---
<Layout title="Welcome to Astro."> <Layout title="Welcome to Astro.">
<main> <main>
<Hero /> <Hero />
<App client:load /> <App client:load />
<About />
</main> </main>
</Layout> </Layout>