Finish mobile layout
This commit is contained in:
parent
f468f40bf1
commit
705d37ca1f
6 changed files with 97 additions and 12 deletions
48
index.html
48
index.html
|
@ -12,20 +12,48 @@
|
|||
/>
|
||||
|
||||
<title>Product preview card component</title>
|
||||
<link rel="stylesheet" href="styles.css" />
|
||||
</head>
|
||||
<body>
|
||||
<p>Perfume</p>
|
||||
<body class="flex min-h-dvh items-center justify-center bg-cream p-4">
|
||||
<main
|
||||
class="overflow-hidden rounded-xl bg-white p-6 text-metal-400 sm:flex sm:p-8"
|
||||
>
|
||||
<picture>
|
||||
<source
|
||||
srcset="/images/image-product-desktop.jpg"
|
||||
media="(min-width: 640px)"
|
||||
/>
|
||||
<img
|
||||
class="-ml-6 -mt-6 w-[calc(100%+3rem)] max-w-none"
|
||||
src="/images/image-product-mobile.jpg"
|
||||
alt="Gabrielle Essence Eau De Parfum"
|
||||
/>
|
||||
</picture>
|
||||
|
||||
<h1>Gabrielle Essence Eau De Parfum</h1>
|
||||
<div>
|
||||
<p class="mt-6 text-category uppercase">Perfume</p>
|
||||
|
||||
<p>
|
||||
A floral, solar and voluptuous interpretation composed by Olivier Polge,
|
||||
Perfumer-Creator for the House of CHANEL.
|
||||
</p>
|
||||
<h1 class="mt-3 font-serif text-heading text-metal-700">
|
||||
Gabrielle Essence Eau De Parfum
|
||||
</h1>
|
||||
|
||||
<p>$149.99</p>
|
||||
<p>$169.99</p>
|
||||
<p class="mt-4 text-body">
|
||||
A floral, solar and voluptuous interpretation composed by Olivier
|
||||
Polge, Perfumer-Creator for the House of CHANEL.
|
||||
</p>
|
||||
|
||||
<p>Add to Cart</p>
|
||||
<div class="mt-6 flex items-center gap-5">
|
||||
<p class="font-serif text-heading text-aquamarine-400">$149.99</p>
|
||||
<p class="text-body line-through">$169.99</p>
|
||||
</div>
|
||||
|
||||
<button
|
||||
class="mt-5 flex w-full items-center justify-center gap-3 rounded-lg bg-aquamarine-400 p-4 hover:bg-aquamarine-700"
|
||||
>
|
||||
<img src="./public/images/icon-cart.svg" width="15" height="16" />
|
||||
<span class="text-body font-bold text-white"> Add to Cart </span>
|
||||
</button>
|
||||
</div>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
||||
|
|
BIN
public/fonts/Fraunces.ttf
Normal file
BIN
public/fonts/Fraunces.ttf
Normal file
Binary file not shown.
BIN
public/fonts/Montserrat.ttf
Normal file
BIN
public/fonts/Montserrat.ttf
Normal file
Binary file not shown.
17
styles.css
Normal file
17
styles.css
Normal file
|
@ -0,0 +1,17 @@
|
|||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@layer base {
|
||||
@font-face {
|
||||
font-weight: 100 900;
|
||||
src: url("/fonts/Montserrat.ttf") format("truetype");
|
||||
font-family: "Montserrat";
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-weight: 100 900;
|
||||
src: url("/fonts/Fraunces.ttf") format("truetype");
|
||||
font-family: "Fraunces";
|
||||
}
|
||||
}
|
|
@ -1,4 +1,44 @@
|
|||
export default {
|
||||
content: ["index.html"],
|
||||
theme: {},
|
||||
theme: {
|
||||
colors: {
|
||||
white: "#FFFFFF",
|
||||
cream: "#F2EAE2",
|
||||
metal: {
|
||||
400: "#6C7289",
|
||||
700: "#1C232B",
|
||||
},
|
||||
aquamarine: {
|
||||
400: "#3D8168",
|
||||
700: "#1A4032",
|
||||
},
|
||||
},
|
||||
fontFamily: {
|
||||
sans: ["Montserrat", "sans-serif"],
|
||||
serif: ["Fraunces", "serif"],
|
||||
},
|
||||
fontSize: {
|
||||
category: [
|
||||
"0.75rem",
|
||||
{
|
||||
fontWeight: 500,
|
||||
letterSpacing: "5px",
|
||||
},
|
||||
],
|
||||
heading: [
|
||||
"2rem",
|
||||
{
|
||||
fontWeight: 700,
|
||||
lineHeight: "2rem",
|
||||
},
|
||||
],
|
||||
body: [
|
||||
"0.875rem",
|
||||
{
|
||||
fontWeight: 500,
|
||||
lineHeight: "1.438rem",
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
Reference in a new issue