Skip to content

Commit

Permalink
Imagenes Cargadas
Browse files Browse the repository at this point in the history
  • Loading branch information
duvan29 committed Sep 12, 2023
1 parent 4bb1692 commit e6467f0
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 12 deletions.
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
28 changes: 17 additions & 11 deletions src/components/Banner.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,27 @@
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="absolute inset-0">
<img
src="/titulo.png" // Ruta de la imagen del título
alt="Título del Blog"
className="w-1920 transition-transform transform -translate-y-1/2" // Clases para el efecto de paralaje
/>
<div className="bg-blue-500 h-full"></div>
<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 flex items-center justify-center">
<img
src="/titulo.png" // Ruta de la imagen del título
<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/2" // Clases para el efecto de paralaje
className="w-1920 transition-transform transform -translate-y-1/5" // Clases para el efecto de paralaje
/>
</div>
</div>
Expand Down

0 comments on commit e6467f0

Please sign in to comment.