rmcg.dev/projects/FrontendMentor/newbie/product-preview-card-component/index.html

87 lines
3.1 KiB
HTML

<!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 -->
<link rel="icon" type="image/png" sizes="32x32" href="./images/favicon-32x32.png">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Fraunces:wght@700&family=Montserrat:wght@500;700&display=swap"
rel="stylesheet">
<link rel="stylesheet" href="css/style.css">
<script src="js/script.js" defer></script>
<title>Frontend Mentor | Product preview card component</title>
<!-- 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>
<label id="switch" class="switch" aria-hidden="true">
<input type="checkbox" id="theme-toggle" aria-label="Light / Dark mode switcher">
<span class="slider round"></span>
</label>
<main>
<section class="product-card">
<picture class="product-card__image">
<source srcset="images/image-product-desktop.jpg" media="(min-width: 1000px)" />
<img src="images/image-product-mobile.jpg" aria-hidden="true" alt="" class="" />
</picture>
<div class="product-card__details">
<p class="product-card__category">
perfume
</p>
<!-- should probably be an h2, but to shut FEM validation up -->
<h1 class="product-card__name">
Gabrielle Essence Eau De Parfum
</h1>
<p class="product-card__description">
A floral, solar and voluptuous interpretation composed by Olivier Polge,
Perfumer-Creator for the House of CHANEL.
</p>
<p class="product-card__price-block">
<span class="product-card__price-current">
$149.99
</span>
<del class="product-card__price-old" aria-label="The old price was $169.99">
$169.99
</del>
</p>
<button class="product-card__button-buy">
<svg width="15" height="16" xmlns="http://www.w3.org/2000/svg" fill="currentColor">
<path
d="M14.383 10.388a2.397 2.397 0 0 0-1.518-2.222l1.494-5.593a.8.8 0 0 0-.144-.695.8.8 0 0 0-.631-.28H2.637L2.373.591A.8.8 0 0 0 1.598 0H0v1.598h.983l1.982 7.4a.8.8 0 0 0 .799.59h8.222a.8.8 0 0 1 0 1.599H1.598a.8.8 0 1 0 0 1.598h.943a2.397 2.397 0 1 0 4.507 0h1.885a2.397 2.397 0 1 0 4.331-.376 2.397 2.397 0 0 0 1.12-2.021ZM11.26 7.99H4.395L3.068 3.196h9.477L11.26 7.991Zm-6.465 6.392a.8.8 0 1 1 0-1.598.8.8 0 0 1 0 1.598Zm6.393 0a.8.8 0 1 1 0-1.598.8.8 0 0 1 0 1.598Z" />
</svg>
Add to Cart
</button>
</div>
</section>
</main>
<!-- <footer>
<div class="attribution">
Challenge by <a href="https://www.frontendmentor.io?ref=challenge" target="_blank">Frontend Mentor</a>.
Coded by <a href="#">Your Name Here</a>.
</div>
</footer> -->
</body>
</html>