Skip to content

Commit

Permalink
feat: ThirdBanners component created
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriassuncx committed May 28, 2024
1 parent bb6021a commit 7c635e2
Show file tree
Hide file tree
Showing 3 changed files with 132 additions and 54 deletions.
75 changes: 75 additions & 0 deletions components/ui/ThirdBanners.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
import Image from "apps/website/components/Image.tsx";
import type { HTMLWidget, ImageWidget } from "apps/admin/widgets.ts";

/**
* @altBy title
*/
export interface Banner {
image: ImageWidget;
alt: string;
title: string;
description: HTMLWidget;
/**
* @default #
*/
link: string;
target?: "_blank" | "_self";
}

export interface Props {
title?: HTMLWidget;
/**
* @minItems 3
* @maxItems 3
*/
banners?: Banner[];
}

function BannerCard(
{ image, alt, title, description, link = "#", target = "_blank" }: Banner,
) {
return (
<div class="flex flex-col items-center justify-center gap-6 w-full h-full">
<a
href={link}
target={target}
>
<Image
src={image}
width={423}
height={321}
alt={alt}
loading="lazy"
fetchPriority="low"
/>
</a>

<div class="flex flex-col gap-2 items-center justify-center">
<h2 class="leading-5 font-bold text-center">{title}</h2>
{description && (
<div
class="text-center leading-4 text-sm max-w-[75%]"
dangerouslySetInnerHTML={{ __html: description }}
/>
)}
</div>
</div>
);
}

export default function ThirdBanners({ banners = [], title }: Props) {
return (
<div class="w-full container py-8 flex flex-col gap-10 lg:py-10 max-w-[95%] xl:max-w-[80%] 2xl:max-w-[1350px]">
{title && (
<div
class="leading-[18px] lg:text-[26px] lg:leading-[30px] text-nowrap"
dangerouslySetInnerHTML={{ __html: title }}
/>
)}

<div class="grid lg:grid-cols-3 gap-6 xl:gap-4 w-full">
{banners.map((banner) => <BannerCard {...banner} />)}
</div>
</div>
);
}
110 changes: 56 additions & 54 deletions manifest.gen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,33 +41,34 @@ import * as $$$$$$31 from "./sections/Images/CarouselBannerWithTitle.tsx";
import * as $$$$$$32 from "./sections/Images/DoubleBanners.tsx";
import * as $$$$$$33 from "./sections/Images/ImageGallery.tsx";
import * as $$$$$$34 from "./sections/Images/ShoppableBanner.tsx";
import * as $$$$$$35 from "./sections/Layout/Container.tsx";
import * as $$$$$$36 from "./sections/Layout/Flex.tsx";
import * as $$$$$$37 from "./sections/Layout/Grid.tsx";
import * as $$$$$$38 from "./sections/Layout/GridItem.tsx";
import * as $$$$$$39 from "./sections/Links/LinkTree.tsx";
import * as $$$$$$40 from "./sections/Links/Shortcuts.tsx";
import * as $$$$$$41 from "./sections/Miscellaneous/CampaignTimer.tsx";
import * as $$$$$$42 from "./sections/Miscellaneous/CookieConsent.tsx";
import * as $$$$$$43 from "./sections/Miscellaneous/RegionPopup.tsx";
import * as $$$$$$44 from "./sections/Miscellaneous/Slide.tsx";
import * as $$$$$$45 from "./sections/Newsletter/Newsletter.tsx";
import * as $$$$$$46 from "./sections/Product/BuyTogether.tsx";
import * as $$$$$$47 from "./sections/Product/ImageGalleryFrontBack.tsx";
import * as $$$$$$48 from "./sections/Product/ImageGallerySlider.tsx";
import * as $$$$$$49 from "./sections/Product/NotFound.tsx";
import * as $$$$$$50 from "./sections/Product/NotFoundChallenge.tsx";
import * as $$$$$$51 from "./sections/Product/ProductDescription.tsx";
import * as $$$$$$52 from "./sections/Product/ProductInfo.tsx";
import * as $$$$$$53 from "./sections/Product/ProductShelf.tsx";
import * as $$$$$$54 from "./sections/Product/ProductShelfTabbed.tsx";
import * as $$$$$$55 from "./sections/Product/SearchResult.tsx";
import * as $$$$$$56 from "./sections/Product/ShelfWithImage.tsx";
import * as $$$$$$57 from "./sections/Product/SimilarsProducts.tsx";
import * as $$$$$$58 from "./sections/Product/Wishlist.tsx";
import * as $$$$$$59 from "./sections/Social/InstagramPosts.tsx";
import * as $$$$$$60 from "./sections/Social/WhatsApp.tsx";
import * as $$$$$$61 from "./sections/Theme/Theme.tsx";
import * as $$$$$$35 from "./sections/Images/ThirdBanners.tsx";
import * as $$$$$$36 from "./sections/Layout/Container.tsx";
import * as $$$$$$37 from "./sections/Layout/Flex.tsx";
import * as $$$$$$38 from "./sections/Layout/Grid.tsx";
import * as $$$$$$39 from "./sections/Layout/GridItem.tsx";
import * as $$$$$$40 from "./sections/Links/LinkTree.tsx";
import * as $$$$$$41 from "./sections/Links/Shortcuts.tsx";
import * as $$$$$$42 from "./sections/Miscellaneous/CampaignTimer.tsx";
import * as $$$$$$43 from "./sections/Miscellaneous/CookieConsent.tsx";
import * as $$$$$$44 from "./sections/Miscellaneous/RegionPopup.tsx";
import * as $$$$$$45 from "./sections/Miscellaneous/Slide.tsx";
import * as $$$$$$46 from "./sections/Newsletter/Newsletter.tsx";
import * as $$$$$$47 from "./sections/Product/BuyTogether.tsx";
import * as $$$$$$48 from "./sections/Product/ImageGalleryFrontBack.tsx";
import * as $$$$$$49 from "./sections/Product/ImageGallerySlider.tsx";
import * as $$$$$$50 from "./sections/Product/NotFound.tsx";
import * as $$$$$$51 from "./sections/Product/NotFoundChallenge.tsx";
import * as $$$$$$52 from "./sections/Product/ProductDescription.tsx";
import * as $$$$$$53 from "./sections/Product/ProductInfo.tsx";
import * as $$$$$$54 from "./sections/Product/ProductShelf.tsx";
import * as $$$$$$55 from "./sections/Product/ProductShelfTabbed.tsx";
import * as $$$$$$56 from "./sections/Product/SearchResult.tsx";
import * as $$$$$$57 from "./sections/Product/ShelfWithImage.tsx";
import * as $$$$$$58 from "./sections/Product/SimilarsProducts.tsx";
import * as $$$$$$59 from "./sections/Product/Wishlist.tsx";
import * as $$$$$$60 from "./sections/Social/InstagramPosts.tsx";
import * as $$$$$$61 from "./sections/Social/WhatsApp.tsx";
import * as $$$$$$62 from "./sections/Theme/Theme.tsx";

const manifest = {
"loaders": {
Expand Down Expand Up @@ -113,34 +114,35 @@ const manifest = {
"deco-sites/maconequiio/sections/Images/DoubleBanners.tsx": $$$$$$32,
"deco-sites/maconequiio/sections/Images/ImageGallery.tsx": $$$$$$33,
"deco-sites/maconequiio/sections/Images/ShoppableBanner.tsx": $$$$$$34,
"deco-sites/maconequiio/sections/Layout/Container.tsx": $$$$$$35,
"deco-sites/maconequiio/sections/Layout/Flex.tsx": $$$$$$36,
"deco-sites/maconequiio/sections/Layout/Grid.tsx": $$$$$$37,
"deco-sites/maconequiio/sections/Layout/GridItem.tsx": $$$$$$38,
"deco-sites/maconequiio/sections/Links/LinkTree.tsx": $$$$$$39,
"deco-sites/maconequiio/sections/Links/Shortcuts.tsx": $$$$$$40,
"deco-sites/maconequiio/sections/Miscellaneous/CampaignTimer.tsx": $$$$$$41,
"deco-sites/maconequiio/sections/Miscellaneous/CookieConsent.tsx": $$$$$$42,
"deco-sites/maconequiio/sections/Miscellaneous/RegionPopup.tsx": $$$$$$43,
"deco-sites/maconequiio/sections/Miscellaneous/Slide.tsx": $$$$$$44,
"deco-sites/maconequiio/sections/Newsletter/Newsletter.tsx": $$$$$$45,
"deco-sites/maconequiio/sections/Product/BuyTogether.tsx": $$$$$$46,
"deco-sites/maconequiio/sections/Images/ThirdBanners.tsx": $$$$$$35,
"deco-sites/maconequiio/sections/Layout/Container.tsx": $$$$$$36,
"deco-sites/maconequiio/sections/Layout/Flex.tsx": $$$$$$37,
"deco-sites/maconequiio/sections/Layout/Grid.tsx": $$$$$$38,
"deco-sites/maconequiio/sections/Layout/GridItem.tsx": $$$$$$39,
"deco-sites/maconequiio/sections/Links/LinkTree.tsx": $$$$$$40,
"deco-sites/maconequiio/sections/Links/Shortcuts.tsx": $$$$$$41,
"deco-sites/maconequiio/sections/Miscellaneous/CampaignTimer.tsx": $$$$$$42,
"deco-sites/maconequiio/sections/Miscellaneous/CookieConsent.tsx": $$$$$$43,
"deco-sites/maconequiio/sections/Miscellaneous/RegionPopup.tsx": $$$$$$44,
"deco-sites/maconequiio/sections/Miscellaneous/Slide.tsx": $$$$$$45,
"deco-sites/maconequiio/sections/Newsletter/Newsletter.tsx": $$$$$$46,
"deco-sites/maconequiio/sections/Product/BuyTogether.tsx": $$$$$$47,
"deco-sites/maconequiio/sections/Product/ImageGalleryFrontBack.tsx":
$$$$$$47,
"deco-sites/maconequiio/sections/Product/ImageGallerySlider.tsx": $$$$$$48,
"deco-sites/maconequiio/sections/Product/NotFound.tsx": $$$$$$49,
"deco-sites/maconequiio/sections/Product/NotFoundChallenge.tsx": $$$$$$50,
"deco-sites/maconequiio/sections/Product/ProductDescription.tsx": $$$$$$51,
"deco-sites/maconequiio/sections/Product/ProductInfo.tsx": $$$$$$52,
"deco-sites/maconequiio/sections/Product/ProductShelf.tsx": $$$$$$53,
"deco-sites/maconequiio/sections/Product/ProductShelfTabbed.tsx": $$$$$$54,
"deco-sites/maconequiio/sections/Product/SearchResult.tsx": $$$$$$55,
"deco-sites/maconequiio/sections/Product/ShelfWithImage.tsx": $$$$$$56,
"deco-sites/maconequiio/sections/Product/SimilarsProducts.tsx": $$$$$$57,
"deco-sites/maconequiio/sections/Product/Wishlist.tsx": $$$$$$58,
"deco-sites/maconequiio/sections/Social/InstagramPosts.tsx": $$$$$$59,
"deco-sites/maconequiio/sections/Social/WhatsApp.tsx": $$$$$$60,
"deco-sites/maconequiio/sections/Theme/Theme.tsx": $$$$$$61,
$$$$$$48,
"deco-sites/maconequiio/sections/Product/ImageGallerySlider.tsx": $$$$$$49,
"deco-sites/maconequiio/sections/Product/NotFound.tsx": $$$$$$50,
"deco-sites/maconequiio/sections/Product/NotFoundChallenge.tsx": $$$$$$51,
"deco-sites/maconequiio/sections/Product/ProductDescription.tsx": $$$$$$52,
"deco-sites/maconequiio/sections/Product/ProductInfo.tsx": $$$$$$53,
"deco-sites/maconequiio/sections/Product/ProductShelf.tsx": $$$$$$54,
"deco-sites/maconequiio/sections/Product/ProductShelfTabbed.tsx": $$$$$$55,
"deco-sites/maconequiio/sections/Product/SearchResult.tsx": $$$$$$56,
"deco-sites/maconequiio/sections/Product/ShelfWithImage.tsx": $$$$$$57,
"deco-sites/maconequiio/sections/Product/SimilarsProducts.tsx": $$$$$$58,
"deco-sites/maconequiio/sections/Product/Wishlist.tsx": $$$$$$59,
"deco-sites/maconequiio/sections/Social/InstagramPosts.tsx": $$$$$$60,
"deco-sites/maconequiio/sections/Social/WhatsApp.tsx": $$$$$$61,
"deco-sites/maconequiio/sections/Theme/Theme.tsx": $$$$$$62,
},
"apps": {
"deco-sites/maconequiio/apps/decohub.ts": $$$$$$$$$$$0,
Expand Down
1 change: 1 addition & 0 deletions sections/Images/ThirdBanners.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default } from "$store/components/ui/ThirdBanners.tsx";

0 comments on commit 7c635e2

Please sign in to comment.