Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

126 bannerblog #131

Merged
merged 4 commits into from
Sep 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,18 @@ import BrandCategory from '~/components/containerCards/containerCardsBrands';
import PaymentMethodsList from '~/components/paymentMethod/paymentMethodsList';
import ReviewsContainer from '~/components/containerCards/containerCardsReviews';
import reviews from '~/mockData/mockReviwes';
import Banner from '~/components/Banner';

export default function Home() {
createIconsTypes();
return (
<ContainerPage header={<MainCarousel />}>
<CategoryCategory category={category} />
<TopSellers />
<PaymentMethodsList />
<BrandCategory brand={brands} />
<Banner/>
<ReviewsContainer reviwes={reviews}/>
<PaymentMethodsList />
</ContainerPage>
);
}
Binary file added src/assets/img/banners/BannerBg.webp
Binary file not shown.
Binary file added src/assets/img/banners/BannerTitle.webp
Binary file not shown.
4 changes: 4 additions & 0 deletions src/assets/img/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ import BannerWomenAndCar from './banners/BannerWomenAndCar.webp';
import CategoryFarolas from './banners/CategoryFarolas.webp';
import FlyerCategores from './banners/FlyerCategories.webp';
import LogoCardBanner from './banners/LogoCardBanner.webp';
import BannerBg from './banners/BannerBg.webp'
import BannerTitle from './banners/BannerTitle.webp'

// Importa las imágenes de la carpeta 'categories'
import Cat01 from './categories/Cat01.png';
Expand Down Expand Up @@ -77,6 +79,8 @@ export const Images = {
CategoryFarolas,
FlyerCategores,
LogoCardBanner,
BannerBg,
BannerTitle
},
categories: {
Cat01,
Expand Down
32 changes: 32 additions & 0 deletions src/components/Banner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
import Image from 'next/image';
import React from 'react';
import { Images } from '~/assets/img';

const Banner: React.FC = () => {
return (
<div className="relative h-360">
<div className=" inset-0">
{/* Fondo del banner (imagen) */}
<div className="h-full bg-no-repeat bg-bottom">
<Image
src={Images.banners.BannerBg}
alt="Fondo del Blog"
layout="fill" // Ocupar todo el espacio disponible
objectFit="cover" // Ajustar la imagen sin distorsionarla
/>
</div>
</div>
<div className="absolute inset-0 bg-background-dm opacity-50"></div>
<div className="inset-0 flex items-center justify-center">
{/* Imagen del título con efecto de paralaje */}
<Image
src={Images.banners.BannerTitle}
alt="Título del Blog"
className="w-1920 transition-transform transform -translate-y-1/5" // Clases para el efecto de paralaje
/>
</div>
</div>
);
};

export default Banner;