Skip to content

Commit

Permalink
fix: add outro slide and fix title at the first one
Browse files Browse the repository at this point in the history
  • Loading branch information
ElisavetAmpatzidou committed Apr 3, 2023
1 parent 95a55dd commit 5408c93
Show file tree
Hide file tree
Showing 8 changed files with 114 additions and 63 deletions.
70 changes: 52 additions & 18 deletions clip/clip.css
Original file line number Diff line number Diff line change
Expand Up @@ -65,14 +65,9 @@ background-color: var(--backgroundColor);
background-color: var(--primaryColor);
color: var(--fontColor);
border-radius: 30px;
}

.description-content{
margin: 33px 35px;
display: flex;
flex-direction: column;
gap: 10px;
opacity: 0;
justify-content: center;
align-items: center;
}

.description-title{
Expand All @@ -81,15 +76,11 @@ background-color: var(--backgroundColor);
font-weight: 900;
font-size: 32px;
line-height: 39px;
opacity: 0;
margin: 33px 35px;
text-align: center;
}

.description-subtitle{
font-family: 'Inter';
font-style: normal;
font-weight: 500;
font-size: 19px;
line-height: 23px;
}

.images-container{
display: flex;
Expand Down Expand Up @@ -119,15 +110,18 @@ background-color: var(--backgroundColor);
}

.product-image{
position: absolute;
width: 439px;
height: 606px;
left: 91px;
top: 71px;
border-radius: 30px;
opacity: 0;
}

.left-container .product-image{
position: absolute;
left: 91px;
top: 71px;
}

.products-images{
display: flex;
flex-direction: column;
Expand Down Expand Up @@ -205,4 +199,44 @@ background-color: var(--backgroundColor);
padding: 19px 30px;
border-radius: 15px;
transform: scale(0);
}
}

.outro {
position: absolute;
width: 1434px;
height: 749px;
left: 243px;
display: flex;
flex-direction: row;
justify-content: space-around;
align-items: center;
}

.outro .product-image{
position: relative;
}

.link-button{
background-color: var(--primaryColor);
color: var(--fontColor);
border: none;
font-weight: bold;
font-size: 40px;
height: 70px;
padding: 0px 20px;
text-decoration: none;
display: flex;
justify-content: center;
align-items: center;
top: 50%;
left: 50%;
transform: translate(-50%,-50%);
position: absolute;
opacity: 0.8;
border-radius: 15px;
}

.link-button:hover{
color: var(--primaryColor);
background-color: var(--fontColor);
}
16 changes: 13 additions & 3 deletions clip/clip.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,7 @@
</div>

<div class="description-container">
<div class="description-content">
<div class="description-title">{{initParams.title}}</div>
<div class="description-subtitle">{{initParams.subtitle}}</div>
</div>
</div>

<div class="images-container">
Expand Down Expand Up @@ -64,4 +61,17 @@

</div>

<div class="outro">
<div class="product-image" mc-for="key,item" mc-of="initParams.products" style="background-image: url({{item.image}});
background-size: cover;
background-repeat: no-repeat;
background-position: center;">
<div class="button-wrapper">
<a class="link-button tr-center" href={{item.url}} target="_blank">
View info
</a>
</div></div>
</div>


</div>
50 changes: 27 additions & 23 deletions clip/clip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,53 +32,57 @@ const clip = new HTMLClip({
});

clip.addIncident(
widthHeight("236px", "148px", ".title-wrapper", 200, "@stagger(0,200)",[1,0,0.17,0.92]),
widthHeight("236px", "148px", ".title-wrapper", 300, "@stagger(0,200)",[0.77,0,0.18,1]),
0
);
clip.addIncident(
opacity(1, ".title", 10, "@stagger(0,200)",[1,0,0.17,0.92]),
200
opacity(1, ".title", 10, "@stagger(0,200)",[0.77,0,0.18,1]),
400
);
clip.addIncident(
widthHeight("511px", "286px", ".description-container", 200,0,[1,0,0.17,0.92]),
600
widthHeight("511px", "286px", ".description-container", 300,0,[0.77,0,0.18,1]),
1000
);
clip.addIncident(
opacity(1, ".description-content", 10,0,[1,0,0.17,0.92]),
800
opacity(1, ".description-title", 10,0,[0.77,0,0.18,1]),
1350
);
clip.addIncident(
widthHeight("218px", "218px", ".image", 200, "@stagger(0,200)",[1,0,0.17,0.92]),
900
widthHeight("218px", "218px", ".image", 300, "@stagger(0,350)",[0.77,0,0.18,1]),
1700
);

clip.addIncident(top("280px", ".right-container", 100,0,[1,0,0.17,0.92]), 500);
clip.addIncident(top("167px", ".right-container", 100,0,[1,0,0.17,0.92]), 800);
clip.addIncident(top("280px", ".right-container", 100,0,[0.77,0,0.18,1]), 900);
clip.addIncident(top("167px", ".right-container", 100,0,[0.77,0,0.18,1]), 1410);

clip.addIncident(left("1017px", ".right-container", 300,0,[1,0,0.17,0.92]), 1400);
clip.addIncident(widthHeight("429px", "749px", ".left-container", 400,0,[1,0,0.17,0.92]), 1700);
clip.addIncident(left("1017px", ".right-container", 200,0,[0.77,0,0.18,1]), 2400);
clip.addIncident(widthHeight("429px", "749px", ".left-container", 400,0,[0.77,0,0.18,1]), 2800);

clip.addIncident(width("1434px", ".left-container", 300,0,[1,0,0.17,0.92]), 2700);
clip.addIncident(left("243px", ".left-container", 300,0,[1,0,0.17,0.92]), 2700);
clip.addIncident(width("1434px", ".left-container", 300,0,[0.77,0,0.18,1]), 4200);
clip.addIncident(left("243px", ".left-container", 300,0,[0.77,0,0.18,1]), 4200);

clip.addIncident(opacity(0, ".center-image,.right-container", 200,0,[1,0,0.17,0.92]), 3400);
clip.addIncident(opacity(0, ".center-image,.right-container", 200,0,[0.77,0,0.18,1]), 4900);

clip.addIncident(itemsCombo(".item-image"), 4000);
clip.addIncident(productInfoCombo(".product-info"), 4000);
clip.addIncident(itemsCombo(".item-image"), 5500);
clip.addIncident(productInfoCombo(".product-info"), 5500);
clip.addIncident(
productImageCombo(".product-image"),
4000
productImageCombo(".left-container .product-image"),
5500
);

clip.addIncident(
opacity(1, ".item-image", 200,0,[1,0,0.17,0.92]),3600
opacity(1, ".item-image", 200,0,[0.77,0,0.18,1]),5100
);


clip.addIncident(
scale(0, 1,".left-container", 200,"@expression(initParams.products.length*3000)",[1,0,0.17,0.92]),3800
opacity(0,".products-images", 200,"@expression(initParams.products.length*4000)",[0.77,0,0.18,1]),5500
);


export { clip };
clip.addIncident(
opacity(1,".outro .product-image", 300,"@expression(initParams.products.length*4000)",[0.77,0,0.18,1]),5800
);

export { clip };

8 changes: 4 additions & 4 deletions clip/effects/itemsCombo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const itemsCombo = (selector) =>
},
},
props: {
duration: 200,
duration: 300,
},
position: 0,
},
Expand All @@ -29,14 +29,14 @@ export const itemsCombo = (selector) =>
},
},
props: {
duration: 200,
duration: 300,
},
position: 3000,
position: 4000,
},
],
},
{
selector,
delay: "@expression(index *3000)",
delay: "@expression(index *4000)",
}
);
6 changes: 3 additions & 3 deletions clip/effects/productImageCombo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const productImageCombo = (selector) =>
},
},
props: {
duration: 200,
duration: 300,
},

position: 0,
Expand All @@ -33,13 +33,13 @@ export const productImageCombo = (selector) =>
duration: 90,
},

position: 3010,
position: 4010,
},

],
},
{
selector,
delay: "@expression(index *3000)",
delay: "@expression(index *4000)",
}
);
22 changes: 11 additions & 11 deletions clip/effects/productInfoCombo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ export const productInfoCombo = (selector) =>
},
props: {
selector:".product-description",
duration: 200,
duration: 300,
},

position: 100,
position: 300,
},
{
incidentClass: CSSEffect,
Expand All @@ -32,10 +32,10 @@ export const productInfoCombo = (selector) =>
},
props: {
selector:".product-title",
duration: 200,
duration: 300,
},

position: 100,
position: 300,
},
{
incidentClass: CSSEffect,
Expand All @@ -52,7 +52,7 @@ export const productInfoCombo = (selector) =>
delay:"@stagger(0,300)",
duration: 100,
},
position: 100,
position: 500,
},
{
incidentClass: CSSEffect,
Expand All @@ -69,7 +69,7 @@ export const productInfoCombo = (selector) =>
delay:"@stagger(0,300)",
duration: 100,
},
position: 100,
position: 500,
},
{
incidentClass: CSSEffect,
Expand All @@ -90,7 +90,7 @@ export const productInfoCombo = (selector) =>
duration: 100,
},

position: 500,
position: 900,
},
{
incidentClass: CSSEffect,
Expand All @@ -107,7 +107,7 @@ export const productInfoCombo = (selector) =>
duration: 200,
},

position: 2500,
position: 3500,
},
{
incidentClass: CSSEffect,
Expand All @@ -124,7 +124,7 @@ export const productInfoCombo = (selector) =>
duration: 100,
},

position: 2500,
position: 3500,
},
{
incidentClass: CSSEffect,
Expand All @@ -141,12 +141,12 @@ export const productInfoCombo = (selector) =>
duration: 100,
},

position: 2500,
position: 3500,
},
],
},
{
selector,//product-info
delay: "@expression(index *3000)",
delay: "@expression(index *4000)",
}
);
4 changes: 3 additions & 1 deletion clip/initParams.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ export default [
secondaryColor:"#171717",
fontColor:"#1B1B1B",
title:"Fashion Fusion: A Blend of Style and Comfort",
subtitle:"A Blend of Style & Comfort. Upgrade your wardrobe with our new clothing line, combining fashion and function for the ultimate comfort and style.",
image1:"https://donkeyclip.github.io/sportswear-clip/server/assets/image1.jpg",
products: [
{
Expand All @@ -18,6 +17,7 @@ export default [
"Take a Step in the Right Direction. Walk in style with our latest collection of fashionable shoes, designed to keep you ahead of the fashion curve.",
variants: ["127, 190, 170","204, 125, 53", "233, 229, 223"],
price: "159€",
url:"https://donkeyclip.com/"
},
{
image:
Expand All @@ -27,6 +27,7 @@ export default [
"This shoe is a classic with a runway inspired look. It has been designed by one of our most famous designers and brings back the shape that defined the era. ",
variants: ["235, 100, 52","52, 235, 174", "52, 131, 235"],
price: "95€",
url:"https://donkeyclip.com/"
},
{
image:
Expand All @@ -36,6 +37,7 @@ export default [
"A modern classic: Our stylish shoe that has been a bestseller for years is now back in a new version with an updated material mix and a current design language.",
variants: ["21,54,69","87,127,146", "228,109,7"],
price: "86€",
url:"https://donkeyclip.com/"
},
],
},
Expand Down
1 change: 1 addition & 0 deletions clip/initParamsValidationRules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export default {
},
},
price: { type: "string" },
url: { type: "string" },
},
},
},
Expand Down

0 comments on commit 5408c93

Please sign in to comment.