Skip to content

Commit

Permalink
updateit
Browse files Browse the repository at this point in the history
  • Loading branch information
summerhasuna committed Jul 15, 2024
1 parent d2f779e commit f3aa360
Show file tree
Hide file tree
Showing 2 changed files with 181 additions and 13 deletions.
180 changes: 168 additions & 12 deletions src/app/competents/layout/PreviewBanner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,14 @@ const PreviewBanner: React.FC<PreviewBannerProps> = ({
<source src={VideoLink} type="video/mp4" />
</video>
) : (
""
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/v1669122489/banner-poster-d.png"
alt={"image"}
width={1024}
height={800}
className="imagePreview"
style={{ objectPosition: backgroundPostion }}
/>
)
) : ImageLink ? (
<Image
Expand All @@ -158,7 +165,14 @@ const PreviewBanner: React.FC<PreviewBannerProps> = ({
style={{ objectPosition: backgroundPostion }}
/>
) : (
""
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/v1669122489/banner-poster-d.png"
alt={"image"}
width={1024}
height={800}
className="imagePreview"
style={{ objectPosition: backgroundPostion }}
/>
)}
</>
) : (
Expand Down Expand Up @@ -316,7 +330,14 @@ const PreviewBanner: React.FC<PreviewBannerProps> = ({
<source src={VideoLink} type="video/mp4" />
</video>
) : (
""
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp24/desktop-image-d-hp.png"
alt={"image"}
width={1024}
height={256}
className="imagePreviewHalf"
style={{ objectPosition: backgroundPostion }}
/>
)
) : ImageLink ? (
<Image
Expand All @@ -328,7 +349,14 @@ const PreviewBanner: React.FC<PreviewBannerProps> = ({
style={{ objectPosition: backgroundPostion }}
/>
) : (
""
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp24/desktop-image-d-hp.png"
alt={"image"}
width={1024}
height={256}
className="imagePreviewHalf"
style={{ objectPosition: backgroundPostion }}
/>
)}
</div>
{disclaimerleftTxt ? (
Expand Down Expand Up @@ -398,7 +426,14 @@ const PreviewBanner: React.FC<PreviewBannerProps> = ({
<source src={VideoLink} type="video/mp4" />
</video>
) : (
""
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp24/desktop-image-d-hp.png"
alt={"image"}
width={1024}
height={256}
className="imagePreviewHalf"
style={{ objectPosition: backgroundPostion }}
/>
)
) : ImageLink ? (
<Image
Expand All @@ -410,7 +445,14 @@ const PreviewBanner: React.FC<PreviewBannerProps> = ({
style={{ objectPosition: backgroundPostion }}
/>
) : (
""
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp24/desktop-image-d-hp.png"
alt={"image"}
width={1024}
height={256}
className="imagePreviewHalf"
style={{ objectPosition: backgroundPostion }}
/>
)}
</div>
<div
Expand Down Expand Up @@ -620,8 +662,42 @@ const PreviewBanner: React.FC<PreviewBannerProps> = ({
>
<source src={VideoLink} type="video/mp4" />
</video>
) : templateD == "3" ? (
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp23/Winter_Sale_-_HP_Desktop_Banner.png"
alt={"image"}
width={1024}
height={800}
className="imagePreview"
style={{ objectPosition: backgroundPostion }}
/>
) : templateD == "2" ? (
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp23/spring-fever-d-hp-banner.png"
alt={"image"}
width={1024}
height={800}
className="imagePreview"
style={{ objectPosition: backgroundPostion }}
/>
) : templateD == "1" ? (
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp23/hp-new-banner-d-sale-new.png"
alt={"image"}
width={1024}
height={800}
className="imagePreview"
style={{ objectPosition: backgroundPostion }}
/>
) : (
""
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp23/Winter_Sale_-_HP_Desktop_Banner.png"
alt={"image"}
width={1024}
height={800}
className="imagePreview"
style={{ objectPosition: backgroundPostion }}
/>
)
) : ImageLink ? (
<Image
Expand All @@ -632,8 +708,42 @@ const PreviewBanner: React.FC<PreviewBannerProps> = ({
className="imagePreview"
style={{ objectPosition: backgroundPostion }}
/>
) : templateD == "3" ? (
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp23/Winter_Sale_-_HP_Desktop_Banner.png"
alt={"image"}
width={1024}
height={800}
className="imagePreview"
style={{ objectPosition: backgroundPostion }}
/>
) : templateD == "2" ? (
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp23/spring-fever-d-hp-banner.png"
alt={"image"}
width={1024}
height={800}
className="imagePreview"
style={{ objectPosition: backgroundPostion }}
/>
) : templateD == "1" ? (
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp23/hp-new-banner-d-sale-new.png"
alt={"image"}
width={1024}
height={800}
className="imagePreview"
style={{ objectPosition: backgroundPostion }}
/>
) : (
""
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp23/Winter_Sale_-_HP_Desktop_Banner.png"
alt={"image"}
width={1024}
height={800}
className="imagePreview"
style={{ objectPosition: backgroundPostion }}
/>
)}
<div
className={`contentPostion ${
Expand Down Expand Up @@ -844,7 +954,14 @@ const PreviewBanner: React.FC<PreviewBannerProps> = ({
<source src={VideoLink} type="video/mp4" />
</video>
) : (
""
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp24/mobile-image-d-hp.png"
alt={"image"}
width={375}
height={180}
className="imagePreviewHalfMobile"
style={{ objectPosition: backgroundPostion }}
/>
)
) : ImageLink ? (
<Image
Expand All @@ -856,7 +973,14 @@ const PreviewBanner: React.FC<PreviewBannerProps> = ({
style={{ objectPosition: backgroundPostion }}
/>
) : (
""
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp24/mobile-image-d-hp.png"
alt={"image"}
width={375}
height={180}
className="imagePreviewHalfMobile"
style={{ objectPosition: backgroundPostion }}
/>
)}
</div>
<div
Expand Down Expand Up @@ -976,8 +1100,24 @@ const PreviewBanner: React.FC<PreviewBannerProps> = ({
>
<source src={VideoLink} type="video/mp4" />
</video>
) : templateM == "0" ? (
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/v1669122489/banner-poster-m.png"
alt={"image"}
width={375}
height={360}
className="imagePreviewFullimage"
style={{ objectPosition: backgroundPostion }}
/>
) : (
""
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp23/spring-fever-m-hp-banner.png"
alt={"image"}
width={375}
height={360}
className="imagePreviewFullimage"
style={{ objectPosition: backgroundPostion }}
/>
)
) : ImageLink ? (
<Image
Expand All @@ -988,8 +1128,24 @@ const PreviewBanner: React.FC<PreviewBannerProps> = ({
className="imagePreviewFullimage"
style={{ objectPosition: backgroundPostion }}
/>
) : templateM == "0" ? (
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/v1669122489/banner-poster-m.png"
alt={"image"}
width={375}
height={360}
className="imagePreviewFullimage"
style={{ objectPosition: backgroundPostion }}
/>
) : (
""
<Image
src="https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp23/spring-fever-m-hp-banner.png"
alt={"image"}
width={375}
height={360}
className="imagePreviewFullimage"
style={{ objectPosition: backgroundPostion }}
/>
)}
<div
className={`contentPostion ${
Expand Down
14 changes: 13 additions & 1 deletion src/app/competents/layout/PreviewCode.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,19 @@ const PreviewCode: React.FC<PreviewCodeProps> = ({
const jsonString = `{
"value": [
{
"image": "${ImageLink}",
"image": "${
ImageLink
? ImageLink
: templateD == "4" || templateD == "5"
? "https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp24/desktop-image-d-hp.png"
: templateD == "1"
? "https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp23/hp-new-banner-d-sale-new.png"
: templateD == "2"
? "https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp23/spring-fever-d-hp-banner.png"
: templateD == "3"
? "https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/media/wysiwyg/lp23/Winter_Sale_-_HP_Desktop_Banner.png"
: "https://optimaxweb.glassesusa.com/image/upload/f_auto,q_auto/v1669122489/banner-poster-d.png"
}",
${
formatType === "video" && VideoLink
? `"video": [{ "source": "${VideoLink}", "type": "video/mp4" }],`
Expand Down

0 comments on commit f3aa360

Please sign in to comment.