mirror of
https://github.com/remvze/moodist.git
synced 2025-12-17 00:44:14 +00:00
feat: add about section
This commit is contained in:
parent
f3603e8431
commit
4e84419ab1
4 changed files with 57 additions and 0 deletions
19
src/components/about/about.module.css
Normal file
19
src/components/about/about.module.css
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
||||
35
src/components/about/about.tsx
Normal file
35
src/components/about/about.tsx
Normal 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's a
|
||||
free and registration-free online ambient sound generator offering{' '}
|
||||
<span>{count}</span> handpicked sounds in various categories, from
|
||||
nature's tranquil melodies to the soothing ambiance of urban
|
||||
life. Whether you're seeking relaxation or a productivity boost,
|
||||
Moodist lets you effortlessly customize your environment with the
|
||||
perfect background sounds.
|
||||
</p>
|
||||
</Container>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
1
src/components/about/index.ts
Normal file
1
src/components/about/index.ts
Normal file
|
|
@ -0,0 +1 @@
|
|||
export { About } from './about';
|
||||
|
|
@ -3,12 +3,14 @@ import Layout from '@/layouts/layout.astro';
|
|||
|
||||
import { Hero } from '@/components/hero';
|
||||
import { App } from '@/components/app';
|
||||
import { About } from '@/components/about';
|
||||
---
|
||||
|
||||
<Layout title="Welcome to Astro.">
|
||||
<main>
|
||||
<Hero />
|
||||
<App client:load />
|
||||
<About />
|
||||
</main>
|
||||
</Layout>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue