From 1a01a0086648c7564ecab30b79df0d67e93eb392 Mon Sep 17 00:00:00 2001 From: MAZE Date: Thu, 8 Feb 2024 18:59:58 +0330 Subject: [PATCH] feat: change alignments --- src/components/sections/about.astro | 72 ++++++++++++++++++----------- src/components/sections/why.astro | 62 ++++++++++++++++--------- 2 files changed, 87 insertions(+), 47 deletions(-) diff --git a/src/components/sections/about.astro b/src/components/sections/about.astro index b124125..0116c16 100644 --- a/src/components/sections/about.astro +++ b/src/components/sections/about.astro @@ -1,4 +1,7 @@ --- +import { Balancer } from 'react-wrap-balancer'; +import { FaQuestion } from 'react-icons/fa/index'; + import { Container } from '@/components/container'; import { count as soundCount } from '@/lib/sounds'; @@ -7,17 +10,21 @@ const count = soundCount();
-
-

What is Moodist?

-
+
+
+
+ +
+ +

What is Moodist?

- Welcome to Moodist – your free, open-source ambient sound generator. With {count} curated sounds, effortlessly create your custom mix for focus or relaxation. No - accounts, no hassle – just pure tranquility. Explore nature's calm - and urban rhythms. Elevate your ambiance with Moodist, where simplicity - meets serenity. + + Moodist is a free and open-source ambient sound generator featuring {count} carefully curated sounds. Create your ideal atmosphere for relaxation, focus, or creativity + with this versatile tool. +

@@ -26,35 +33,48 @@ const count = soundCount(); .about { padding: 80px 0; - & .titleWrapper { + & .iconContainer { display: flex; - column-gap: 12px; + flex-direction: column; align-items: center; + margin-bottom: 15px; - & .title { - margin-bottom: 12px; - font-family: var(--font-display); - font-size: var(--font-lg); - font-weight: 600; + & .tail { + width: 1px; + height: 75px; + background: linear-gradient(transparent, var(--color-neutral-300)); } - & .line { - flex-grow: 1; - height: 1px; - background: linear-gradient( - 90deg, - var(--color-neutral-300), - transparent - ); - transform: translateY(-0.25rem); + & .icon { + display: flex; + align-items: center; + justify-content: center; + width: 45px; + height: 45px; + font-size: var(--font-base); + background-color: var(--color-neutral-100); + border: 1px solid var(--color-neutral-300); + border-radius: 50%; } } + & .title { + margin-bottom: 12px; + font-family: var(--font-display); + font-size: var(--font-lg); + font-weight: 600; + text-align: center; + } + & .desc { + width: 100%; + max-width: 450px; + margin: 0 auto; line-height: 1.7; color: var(--color-foreground-subtle); + text-align: center; - & span { + & .counter { color: var(--color-foreground); } } diff --git a/src/components/sections/why.astro b/src/components/sections/why.astro index 666577a..8aa8d77 100644 --- a/src/components/sections/why.astro +++ b/src/components/sections/why.astro @@ -3,6 +3,7 @@ import { BiMoney, BiUserCircle, BiLogoGithub } from 'react-icons/bi/index'; import { BsSoundwave, BsStars } from 'react-icons/bs/index'; import { RxMixerHorizontal } from 'react-icons/rx/index'; import { IoShareSocialSharp } from 'react-icons/io5/index'; +import { FaQuestion } from 'react-icons/fa/index'; import { Balancer } from 'react-wrap-balancer'; @@ -63,11 +64,15 @@ const reasons = [
-
-

Why use Moodist?

-
+
+
+
+ +
+

Why use Moodist?

+
{ reasons.map(reason => ( @@ -81,7 +86,7 @@ const reasons = [

{reason.link && ( - {reason.link.label} → + {reason.link.label} )}
@@ -95,30 +100,39 @@ const reasons = [ .why { padding-bottom: 80px; - & .titleWrapper { + & .iconContainer { display: flex; - column-gap: 12px; + flex-direction: column; align-items: center; + margin-bottom: 15px; - & .title { - margin-bottom: 12px; - font-family: var(--font-display); - font-size: var(--font-lg); - font-weight: 600; + & .tail { + width: 1px; + height: 75px; + background: linear-gradient(transparent, var(--color-neutral-300)); } - & .line { - flex-grow: 1; - height: 1px; - background: linear-gradient( - 90deg, - var(--color-neutral-300), - transparent - ); - transform: translateY(-0.25rem); + & .icon { + display: flex; + align-items: center; + justify-content: center; + width: 45px; + height: 45px; + font-size: var(--font-base); + background-color: var(--color-neutral-100); + border: 1px solid var(--color-neutral-300); + border-radius: 50%; } } + & .title { + margin-bottom: 12px; + font-family: var(--font-display); + font-size: var(--font-lg); + font-weight: 600; + text-align: center; + } + & .reasons { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); @@ -132,7 +146,7 @@ const reasons = [ justify-content: center; width: 40px; height: 40px; - margin-bottom: 12px; + margin: 0 auto 12px; font-size: var(--font-md); color: var(--color-foreground-subtle); background: linear-gradient(var(--color-neutral-100), transparent); @@ -144,11 +158,16 @@ const reasons = [ margin-bottom: 8px; font-family: var(--font-heading); font-weight: 600; + text-align: center; } & .body { + width: 100%; + max-width: 250px; + margin: 0 auto; line-height: 1.6; color: var(--color-foreground-subtle); + text-align: center; } & .link { @@ -157,6 +176,7 @@ const reasons = [ font-size: var(--font-sm); font-weight: 500; color: var(--color-foreground); + text-align: center; text-decoration: none; } }