forked from pranjay-poddar/Dev-Geeks
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
34d4583
commit ad3d233
Showing
8 changed files
with
209 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# Product Preview Component | ||
|
||
Product Preview Component using HTML and CSS. It is responsive too. | ||
This component is reusable too. |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+44 KB
Frontend-Projects/ProductPreviewComponent/images/image-product-desktop.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+28.8 KB
Frontend-Projects/ProductPreviewComponent/images/image-product-mobile.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
|
||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<!-- displays site properly based on user's device --> | ||
|
||
|
||
<title>Product preview card component</title> | ||
<link rel="stylesheet" href="styles.css"> | ||
|
||
<!-- Feel free to remove these styles or customise in your own stylesheet --> | ||
<style> | ||
.attribution { | ||
font-size: 11px; | ||
text-align: center; | ||
} | ||
|
||
.attribution a { | ||
color: hsl(228, 45%, 44%); | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<main> | ||
<div class="container"> | ||
<div class="image"> | ||
<picture> | ||
<source media="(min-width:700px)" class="desktopImage" srcset="images/image-product-desktop.jpg"> | ||
<img src="images/image-product-mobile.jpg" alt=""> | ||
</picture> | ||
</div> | ||
<div class="text"> | ||
<span class="perfume">PERFUME</span> | ||
<h1> | ||
Gabrielle Essence Eau De Parfum | ||
</h1> | ||
<p> | ||
A floral, solar and voluptuous interpretation composed by Olivier Polge, | ||
Perfumer-Creator for the House of CHANEL. | ||
</p> | ||
<div class="price"> | ||
<span class="price">$149.99</span> | ||
<span class="smallPrice">$169.99</span> | ||
</div> | ||
<button> | ||
<img class="cart" src="images/icon-cart.svg" alt=""> | ||
Add to Cart | ||
</button> | ||
</div> | ||
</div> | ||
</main> | ||
|
||
<footer> | ||
<div class="attribution"> | ||
Coded by <a href="https://app.netlify.com/teams/mistermickey">Master Mickey</a>. | ||
</div> | ||
</footer> | ||
|
||
</body> | ||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,[email protected],700&family=Montserrat:wght@400;700&display=swap'); | ||
|
||
:root{ | ||
--dark-cyan: hsl(158, 36%, 37%); | ||
--cream: hsl(30, 38%, 92%); | ||
--very-dark-blue:hsl(212, 21%, 14%); | ||
--dark-grayish-blue:hsl(228, 12%, 48%); | ||
--white:hsl(0, 0%, 100%); | ||
} | ||
*{ | ||
margin: 0; | ||
padding: 0; | ||
} | ||
body{ | ||
background-color: var(--cream); | ||
height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: center; | ||
align-items: center; | ||
} | ||
|
||
picture{ | ||
max-width: 100%; | ||
} | ||
img{ | ||
max-width: 100%; | ||
border-top-left-radius: .625rem; | ||
border-top-right-radius: .625rem; | ||
} | ||
|
||
h1{ | ||
font-family: 'Fraunces',sans-serif; | ||
color: var(--very-dark-blue); | ||
margin: .8rem 0; | ||
font-size: 1.6rem; | ||
} | ||
|
||
p{ | ||
font-size: 11px; | ||
font-family: 'Montserrat', sans-serif; | ||
color: var(--dark-grayish-blue); | ||
font-weight: 600; | ||
margin: .5rem 0 1rem; | ||
line-height: 1.5; | ||
} | ||
|
||
button{ | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
padding: .8rem; | ||
background-color: var(--dark-cyan); | ||
border-radius: .625rem; | ||
border: 1px var(--dark-cyan); | ||
color: var(--white); | ||
font-family: 'Montserrat'; | ||
font-weight: 700; | ||
min-width: 100%; | ||
} | ||
|
||
button:hover{ | ||
cursor: pointer; | ||
background-color: hsl(157, 18%, 45%); | ||
} | ||
|
||
|
||
.container{ | ||
background-color: var(--white); | ||
border-radius: .625rem; | ||
display: flex; | ||
/* flex-direction: column; */ | ||
justify-content: center; | ||
align-items: center; | ||
margin: 1rem; | ||
} | ||
|
||
div.text{ | ||
padding: 1.5rem 2rem; | ||
} | ||
|
||
.perfume{ | ||
letter-spacing: .3rem; | ||
font-size: 70%; | ||
font-family: 'Montserrat', sans-serif; | ||
color: var(--dark-grayish-blue); | ||
font-weight: 700; | ||
} | ||
|
||
div.price{ | ||
display: flex; | ||
align-items: center; | ||
margin-bottom: 1.5rem; | ||
} | ||
|
||
span.price{ | ||
font-family: 'Fraunces', sans-serif; | ||
color: var(--dark-cyan); | ||
font-size: 1.7rem; | ||
} | ||
|
||
.smallPrice{ | ||
font-family: 'Montserrat', sans-serif; | ||
color: var(--dark-grayish-blue); | ||
font-size: .8rem; | ||
font-weight: 700; | ||
margin-left: 1rem; | ||
} | ||
|
||
img.cart{ | ||
margin-right: .5rem; | ||
} | ||
|
||
.attribution{ | ||
font-size: .6rem; | ||
font-weight: 700; | ||
font-family: 'Montserrat'; | ||
} | ||
|
||
@media screen and (max-width:700px) { | ||
.container{ | ||
max-width: 500px; | ||
flex-direction: column; | ||
} | ||
} | ||
|
||
@media screen and (min-width:700px){ | ||
.container{ | ||
max-width: 700px; | ||
} | ||
img{ | ||
border-bottom-left-radius: .625rem; | ||
border-top-right-radius: 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters