Skip to content

Commit

Permalink
updateit
Browse files Browse the repository at this point in the history
  • Loading branch information
summerhasuna committed Aug 26, 2024
1 parent f3aa360 commit 6eb1574
Show file tree
Hide file tree
Showing 16 changed files with 2,397 additions and 274 deletions.
42 changes: 42 additions & 0 deletions src/app/competents/editorCtp/PreviewBanner.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
.imageCtpbanner {
object-fit: cover;
margin: auto;
width: 100%
}

.mobileStyle {
.imageCtpbanner {
width: 375px;
height: 200px;
margin: auto;
display: block;
}
}

.desktopStyle {
.imageCtpbanner {
margin: auto;
display: block;
height: 266px;
}
}

.strip {
align-items: center;
border-bottom: 1px solid rgba(0, 0, 0, .1);
color: #0f0f0f;
display: flex;
font: 400 16px / 18px Roboto, Arial, sans-serif;
height: 46px;
justify-content: center;
width: 100%;
margin-bottom: 4px;
}

.dark {
background-color: #010523;
}

.light {
background-color: #f4f9ff;
}
130 changes: 130 additions & 0 deletions src/app/competents/editorCtp/PreviewBanner.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
// PreviewBanner.tsx
import React from "react";
import Image from "next/image";
interface PreviewBannerProps {
device: string;
selectCampaign: string;
campaign: string;
campaignTime: string;
ImageLink: string;
themeMode: string;
backgroundColorStrip: string;
height: string;
trustpilot: string;
headline: string;
textcolorheadline: string;
subheadline: string;
textcolorsubheadline: string;
linetext: string;
code: string;
mdHeadline: string;
mdContent: string;
generalDisclamier: string;
linetexttwo: string;
codeTwo: string;
mdHeadlineTwo: string;
mdContentTwo: string;
linetextthree: string;
codeThree: string;
mdHeadlineThree: string;
mdContentThree: string;
select: string;
mdsaleName: string;
selectDsicountType: string;
discountValue: string;
selectDsicountTypeTwo: string;
discountValueTwo: string;
selectDsicountTypeThree: string;
discountValueThree: string;
txtColorCounter: string;
date: string;
backgroundColorCounter: string;
checkactive: string;
txtColorCountertwo: string;
datetwo: string;
backgroundColorCountertwo: string;
checkactivetwo: string;
txtColorCounterthree: string;
datethree: string;
backgroundColorCounterthree: string;
checkactivethree: string;
}

const PreviewBannerCtp: React.FC<PreviewBannerProps> = ({
device,
selectCampaign,
campaign,
campaignTime,
ImageLink,
themeMode = "Light",
backgroundColorStrip,
height,
trustpilot,
headline,
textcolorheadline,
subheadline,
textcolorsubheadline,
linetext,
code,
mdHeadline,
mdContent,
generalDisclamier,
linetexttwo,
codeTwo,
mdHeadlineTwo,
mdContentTwo,
linetextthree,
codeThree,
mdHeadlineThree,
mdContentThree,
select,
mdsaleName,
selectDsicountType,
discountValue,
selectDsicountTypeTwo,
discountValueTwo,
selectDsicountTypeThree,
discountValueThree,
txtColorCounter,
date,
backgroundColorCounter,
checkactive,
txtColorCountertwo,
datetwo,
backgroundColorCountertwo,
checkactivetwo,
txtColorCounterthree,
datethree,
backgroundColorCounterthree,
checkactivethree,
}) => {
return (
<>
<div
className={`${device === "Desktop" ? "desktopStyle" : "mobileStyle"}`}
>
<div
className={`strip ${themeMode === "Dark" ? "dark" : "light"}`}
style={{ backgroundColor: backgroundColorStrip }}
></div>
<Image
src={
device === "Desktop"
? ImageLink
? ImageLink
: "https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/hp24/map-hp-d-new.png"
: ImageLink
? ImageLink
: "https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto:eco/media/wysiwyg/lp23/main-desktopmobile.png"
}
alt={"image"}
width={1024}
height={100}
className={`imageCtpbanner ${height == "Small" ? "large" : "Large"}`}
/>
</div>
</>
);
};

export default PreviewBannerCtp;
Loading

0 comments on commit 6eb1574

Please sign in to comment.