Skip to content

Commit

Permalink
fix init params
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanvl01 committed May 8, 2023
1 parent 846ce13 commit 56b8c16
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 43 deletions.
8 changes: 4 additions & 4 deletions clip/clip.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
* {

--first-color: {{ initParams.colors[0] }};
--second-color: {{ initParams.colors[1] }};
--first-color: {{ initParams.backgroundColor }};
--second-color: {{ initParams.fontColor }};
--first-top: {{ initParams.firstImagePosition.top }}px;
--first-left: {{ initParams.firstImagePosition.left }}px;
--second-top: {{ initParams.secondImagePosition.top }}px;
Expand All @@ -19,9 +19,9 @@ justify-content: center;
flex-direction: column;
align-items: center;
height: 100%;
background: black;
background: var(--first-color);
font-family: 'Open Sans', sans-serif;
color: white;
color: var(--second-color);
}

.image-wrapper{
Expand Down
3 changes: 1 addition & 2 deletions clip/clip.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<a class="container"
href="https://www.e-tennis.gr/tennis-shoes/tennis-shoe/nike/shopby/show_onsales_products-sales_products-model-zoom_lite.html">
<a class="container" href="{{initParams.bannerLink}}">
<div class="smoke"></div>
<div class="title-wrapper">
<div class="row-wrapper first-row">
Expand Down
5 changes: 4 additions & 1 deletion clip/initParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ export default [
{
name: "Blue medium",
value: {
colors: ["#fff", "#161616"],
backgroundColor: "#161616",
fontColor: "#fff",
offer: "39.90€",
images: [
"https://donkeyclip.github.io/week-offer/server/white.png",
Expand All @@ -19,6 +20,8 @@ export default [
firstRow: "ΠΡΟΣΦΟΡΑ",
secondRow: "ΕΒΔΟΜΑΔΑΣ",
thirdRow: "Nike Zoom Lite 3",
bannerLink:
"https://www.e-tennis.gr/tennis-shoes/tennis-shoe/nike/shopby/show_onsales_products-sales_products-model-zoom_lite.html",
},
},
];
69 changes: 33 additions & 36 deletions clip/initParamsValidationRules.ts
Original file line number Diff line number Diff line change
@@ -1,42 +1,39 @@
export default {
colors: {
label: "Colors",
backgroundColor: { label: "Background Color", type: "color" },
fontColor: { label: "Font Color", type: "color" },
firstRow: {
label: "First Row",
type: "string",
},
secondRow: {
label: "Second Row",
type: "string",
},
offer: {
label: "Offer",
type: "string",
},
images: {
label: "Images",
type: "array",
items: {
type: "color",
},
firstRow: {
label: "First Row",
type: "string",
},
secondRow: {
label: "Second Row",
type: "string",
},
offer: {
label: "Offer",
type: "string",
},
images: {
label: "Images",
type: "array",
items: { type: "string" },
},
firstImagePosition: {
type: "object",
label: "First Image Position",
props: {
top: { type: "number" },
left: { type: "number" },
},
items: { type: "string" },
},
firstImagePosition: {
type: "object",
label: "First Image Position",
props: {
top: { type: "number" },
left: { type: "number" },
},
secondImagePosition: {
type: "object",
label: "Second Image Position",
props: {
top: { type: "number" },
left: { type: "number" },
},
},
secondImagePosition: {
type: "object",
label: "Second Image Position",
props: {
top: { type: "number" },
left: { type: "number" },
},
},
bannerLink: { type: "string", label: "Link" },
thirdRow: { type: "string", label: "Third Row" },
};

0 comments on commit 56b8c16

Please sign in to comment.