From 6ff06237620f1b16d9f3efe94f81faa1a60a7cf5 Mon Sep 17 00:00:00 2001 From: Amritanshu Date: Mon, 30 Sep 2024 22:06:25 +0530 Subject: [PATCH] Category slider responsive. New Typography based on: https://www.wix.com/studio/blog/font-size --- src/app/(static)/about-us/page.tsx | 25 +++++------- src/app/(static)/festival/page.tsx | 40 +++++++++---------- src/app/(static)/page.tsx | 20 +++++----- .../products/[handle]/ProductDetails.tsx | 2 +- src/app/(storefront)/products/page.tsx | 2 +- src/app/globals.css | 21 ++++++++++ src/components/category-slider.module.css | 15 +++++++ src/components/category-slider.tsx | 32 ++++++++------- src/components/footer.tsx | 4 +- src/components/navbar.module.css | 16 ++++---- src/components/navbar.tsx | 14 +++---- src/components/our-collection.tsx | 4 +- 12 files changed, 116 insertions(+), 79 deletions(-) create mode 100644 src/components/category-slider.module.css diff --git a/src/app/(static)/about-us/page.tsx b/src/app/(static)/about-us/page.tsx index 5bb5df4..02c98a0 100644 --- a/src/app/(static)/about-us/page.tsx +++ b/src/app/(static)/about-us/page.tsx @@ -12,10 +12,10 @@ export default function AboutUsPage() {
{/* Left Column - Text with Header */} -
+
Welcome to the World of Mozimo Magic
-
+
Indulge in the Luxurious. Immerse in the Captivating. Savor the Fresh. At Mozimo, we curate a chocolate experience that transports you to a world of opulence, captivates your senses with mesmerizing aromas and @@ -48,13 +48,10 @@ export default function AboutUsPage() { {/* Right Column - Text with Header */}
-

- Our Founders +

+ Our Founders Priyanka and Amritanshu

-

- Priyanka and Amritanshu, -

-

+

are the proud founders of Mozimo, a bean-to-bar chocolate shop that celebrates the rich and distinctive flavors of single origin cocoa beans. Their journey with Mozimo has been a passionate @@ -68,13 +65,13 @@ export default function AboutUsPage() {

-

+

Capturing the essence of

-

+

Italian Chocolate

-

+

With over 15 years of hospitality experience, these avid travelers scoured the globe for the finest cocoa beans and techniques. Deep in remote cocoa farms, they cultivated relationships with farmers @@ -115,7 +112,7 @@ export default function AboutUsPage() {

-
+
Under the mentorship of the master chocolatier Gabriele Rinaudo, Priyanka and Amritanshu dedicated themselves to mastering the intricate art of chocolate making. With unwavering determination and a @@ -124,7 +121,7 @@ export default function AboutUsPage() { the delicate techniques that transform raw beans into exquisite chocolate creations.
-
+
In addition to their training under Gabriele Rinaudo, they embarked on a transformative journey to Italy to further enrich their understanding of the art of chocolate making. This immersive @@ -141,7 +138,7 @@ export default function AboutUsPage() { sizes='100vw' />
-
+
Passionate about chocolate as a medium for creativity and exploration, they view it not just as a confection but as a canvas for artistic expression. Constantly seeking inspiration, they push the boundaries diff --git a/src/app/(static)/festival/page.tsx b/src/app/(static)/festival/page.tsx index b4993b2..15b88e3 100644 --- a/src/app/(static)/festival/page.tsx +++ b/src/app/(static)/festival/page.tsx @@ -21,12 +21,12 @@ export default function AboutUsPage() { />
-

+

Sweet Moments with Mozimo

-
+
“Transforming cacao beans sourced straight from the pod into rich, velvety smooth chocolate is pure magic. This is why we take great pride in being called the 'Alchemists of the Chocolate @@ -51,7 +51,7 @@ export default function AboutUsPage() { startClass='translate-y-8' finishClass='translate-y-0' > -

+

Our journey at Mozimo has been a passionate pursuit of creating exceptional chocolate that tantalizes the taste buds and tells the unique story of each cocoa bean's origin. We traversed @@ -65,7 +65,7 @@ export default function AboutUsPage() { startClass='translate-y-8' finishClass='translate-y-0' > -

+

Beholding our vision, we started the meticulous process of crafting rich, exquisite, delectable chocolates, ultimately perfecting the art. As we continue our journey at Mozimo, we are @@ -76,11 +76,11 @@ export default function AboutUsPage() {

-
+
-

+

Aritsan Craftmanship

@@ -88,7 +88,7 @@ export default function AboutUsPage() { startClass='translate-y-8' finishClass='translate-y-0' > -

+

We are an atelier crafting chocolate from the finest single-source beans. Our commitment to the art of making chocolate ensures that each piece epitomizes supreme taste & @@ -96,7 +96,7 @@ export default function AboutUsPage() {

-

+

Ethics and Sustainability

@@ -104,7 +104,7 @@ export default function AboutUsPage() { startClass='translate-y-8' finishClass='translate-y-0' > -

+

We are committed to sustainability and being ethical in all that we do. From selecting ingredients from remote farmers to our production practices, we prioritize sustainability and ethical @@ -112,7 +112,7 @@ export default function AboutUsPage() {

-

+

Commitment to Excellence

@@ -120,7 +120,7 @@ export default function AboutUsPage() { startClass='translate-y-8' finishClass='translate-y-0' > -

+

We are inspired to create the best-quality chocolate in our pursuit of excellence. This involves refining ingredients, updating processes, and continuously striving to become the best @@ -142,14 +142,14 @@ export default function AboutUsPage() {

- Specimens of{' '} - + Specimens of{' '} + Exquisite Craftsmanship
-
+
Every creation of Mozimo's chocolate is a specimen of craftsmanship of the highest quality by the finest chocolatiers.
@@ -176,16 +176,16 @@ export default function AboutUsPage() {

- + Immerse yourself in the {' '} - + Italian Chocolate Experience

-

+

Indulge in the authentic artistry of the Cioccolaterias of Italy with handcrafted artisanal chocolates by Mozimo.

@@ -196,12 +196,12 @@ export default function AboutUsPage() { className='w-full h-auto' /> -

+

Experience the art of gifting this Diwali

-

+

It’s time to celebrate the joy of togetherness, love, and the luxury of Mozimo’s chocolates. This Diwali, let’s embrace the sweetness of life with our exquisite single-origin handcrafted chocolates, @@ -209,7 +209,7 @@ export default function AboutUsPage() {

-

+

Let our handcrafted chocolates be a part of your Diwali rituals. Whether you’re enjoying them during family gatherings, using them as a centerpiece for your celebrations, or gifting them to friends or diff --git a/src/app/(static)/page.tsx b/src/app/(static)/page.tsx index 5a77326..9e512df 100644 --- a/src/app/(static)/page.tsx +++ b/src/app/(static)/page.tsx @@ -18,7 +18,7 @@ export default function HomePage() {

-

+

Brand Story

@@ -26,16 +26,16 @@ export default function HomePage() { startClass='translate-y-8' finishClass='translate-y-0' > -

+

Mozimo's journey is a passionate pursuit of crafting exceptional chocolate that celebrates the origin of each cocoa bean.

-

+

We meticulously roast, crack, winnow, and refine beans in-house, using modern techniques to highlight their natural flavors.

-

+

Each chocolate is a masterpiece, capturing the essence of cocoa in its purest form.

@@ -67,10 +67,10 @@ export default function HomePage() {
-

+

Discover the delicate art of our

-

+

Chocolate Tempering

@@ -78,7 +78,7 @@ export default function HomePage() { startClass='translate-y-8' finishClass='translate-y-0' > -

+

Crafted to perfection Mozimo delivers a sublime sensory experience with every bite. Experience the epitome of indulgence with our perfectly tempered chocolate: velvety smooth, @@ -91,7 +91,7 @@ export default function HomePage() {

{/* Fourth Three-Column Layout (Collections) */}
-
+
Our Collections
@@ -100,13 +100,13 @@ export default function HomePage() { {/* Sixth Layout (Instagram) */}
-
+
Follow us on Instagram
-
+
In the Spotlight
diff --git a/src/app/(storefront)/products/[handle]/ProductDetails.tsx b/src/app/(storefront)/products/[handle]/ProductDetails.tsx index b4e6238..7569e92 100644 --- a/src/app/(storefront)/products/[handle]/ProductDetails.tsx +++ b/src/app/(storefront)/products/[handle]/ProductDetails.tsx @@ -48,7 +48,7 @@ const ProductDetails: FC = ({ handle }) => { } return ( -
+

{product.title}

{/* Product Images */} diff --git a/src/app/(storefront)/products/page.tsx b/src/app/(storefront)/products/page.tsx index 8eb8a91..e9a17af 100644 --- a/src/app/(storefront)/products/page.tsx +++ b/src/app/(storefront)/products/page.tsx @@ -13,7 +13,7 @@ export default function ProductsPage() { if (error) return

Error: {error.message}

; return ( -
+

Handbags Collection

{products?.map((product) => ( diff --git a/src/app/globals.css b/src/app/globals.css index 9d64a99..abc0df4 100644 --- a/src/app/globals.css +++ b/src/app/globals.css @@ -5,6 +5,10 @@ :root { --background: #f8f6f5; --foreground: #703133; + --normal-font: 2rem; + --title-font: 5rem; + --headline-font: 8rem; + --items-font: 10rem; } @media (prefers-color-scheme: dark) { @@ -14,6 +18,10 @@ } } +html { + font-size: 62.5%; +} + body { margin: 0; padding: 0; @@ -21,6 +29,19 @@ body { background-color: var(--background); font-family: Renner, sans-serif; font-weight: 300; + font-size: var(--normal-font); +} + +.text-s-normal { + font-size: var(--normal-font); +} + +.text-s-title { + font-size: var(--title-font); +} + +.text-s-headline { + font-size: var(--headline-font); } @layer utilities { diff --git a/src/components/category-slider.module.css b/src/components/category-slider.module.css new file mode 100644 index 0000000..59810cd --- /dev/null +++ b/src/components/category-slider.module.css @@ -0,0 +1,15 @@ + .productImage { + width: 8rem; /* Set the width of the image */ + aspect-ratio: 1; + border-radius: 50%; /* Make the image circular */ + object-fit: cover; /* Ensure the image covers the container */ + margin-right: 1.5rem; /* Space between image and product name */ + display: inline-block; + box-shadow: .5rem .5rem 1rem rgba(0,0,0,.1); + } + + @media screen and (width >= 768px) { + .productImage { + display: none; + } + } diff --git a/src/components/category-slider.tsx b/src/components/category-slider.tsx index ce2e785..f234391 100644 --- a/src/components/category-slider.tsx +++ b/src/components/category-slider.tsx @@ -1,6 +1,7 @@ 'use client'; import { useState } from 'react'; import Image from 'next/image'; +import styles from './category-slider.module.css'; const categories = [ { name: 'Bars', image: '/images/categories/bars.jpg' }, @@ -16,22 +17,25 @@ export function ChocolateCategories() { return (
-
-
    - {categories.map((category) => ( -
  • setCurrentImage(category.image)} - className='hover:text-[#c19a6b] cursor-pointer font-montera font-normal text-9xl' - > - {category.name} -
  • - ))} -
-
+
    + {categories.map((category) => ( +
  • setCurrentImage(category.image)} + className='hover:text-[#c19a6b] cursor-pointer font-montera font-normal text-s-headline' + > + {category.name} + {category.name} +
  • + ))} +
{/* Right Side: Image */} -
+