Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
66 changes: 32 additions & 34 deletions product-preview/index.html
Original file line number Diff line number Diff line change
@@ -1,39 +1,37 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Product Preview</title>
<link href="style.css" rel="stylesheet" />
<link rel="icon" href="images/favicon-32x32.png" />
</head>

<body>
<article class="card">
<img
src="images/image-product-desktop.jpg"
alt="Image of the product"
class="product-image"
/>
<img src="images/image-product-mobile.jpg" alt="Image of the product" class="product-image-mobile">
<section class="product-text">
<h2 class="product-description">perfume</h2>
<h1 class="product-title">Gabrielle Essence Eau De Parfum</h1>
<p class="product-long-text">
A floral, solar and voluptuos interpretation composed by Oliver Polge,
Perfume-Creator for the House of CHANEL.
</p>
<section class="product-price">
<h1 class="price-reduced">$149.99</h1>
<p class="price-full">$169.99</p>
</section>
<section class="product-add">
<img class="product-cart" src="images/icon-cart.svg" alt="Cart Icon">
<a href="https://github.com/wotanut" class="product-add"
>Add to cart</a
>
</section>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Product Preview</title>
<link href="style.css" rel="stylesheet" />
<link rel="icon" href="images/favicon-32x32.png" />
</head>

<body>
<article class="card">
<div class="image-div">
<img src="images/image-product-desktop.jpg" alt="Image of the product" class="product-image" />
<img src="images/image-product-mobile.jpg" alt="Image of the product" class="product-image-mobile" />
</div>
<section class="product-text">
<h2 class="product-description">perfume</h2>
<h1 class="product-title">Gabrielle Essence Eau De Parfum</h1>
<p class="product-long-text">
A floral, solar and voluptuos interpretation composed by Oliver Polge,
Perfume-Creator for the House of CHANEL.
</p>
<section class="product-price">
<h1 class="price-reduced">$149.99</h1>
<p class="price-full">$169.99</p>
</section>
<section class="product-add">
<img class="product-cart" src="images/icon-cart.svg" alt="Cart Icon" />
<a href="https://github.com/wotanut" class="product-add">Add to cart</a>
</section>
</article>
</body>
</section>
</article>
</body>

</html>
22 changes: 14 additions & 8 deletions product-preview/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ a:visited {
display: grid;
border-radius: 10px;
grid-template-areas: "one two";
grid-auto-columns: min-content;
background-color: var(--White);
}

Expand Down Expand Up @@ -103,22 +102,27 @@ h1 {
}

.product-image {
height: 60vh;
object-fit: contain;
grid-area: one;
max-width: 100%;
border-top-left-radius: 10px;
border-bottom-left-radius: 10px;
}

.image-div {
grid-area: one;
border-top-left-radius: 10px;
}

.price-full {
margin-left: 30px;
color: grey;
}

.product-text {
grid-area: two;
width: 27vw;
padding: 20px;
/* width: 500px; */
display: flex;
flex-direction: column;
}

@media screen and (max-width: 900px) {
Expand All @@ -135,10 +139,12 @@ h1 {
width: auto;
}

.product-image-mobile {
display: block;
.image-div {
grid-area: one;
width: 50vw;
}

.product-image-mobile {
display: inline;
border-top-right-radius: 20px;
border-top-left-radius: 20px;
}
Expand Down