We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9fa2175 commit 2adc5eeCopy full SHA for 2adc5ee
src/App.js
@@ -62,6 +62,7 @@ AOS.init({
62
<Route path='/components/multi-step-form' element={<MultiStepForm></MultiStepForm>}/>
63
<Route path='/components/todo' element={<ToDo></ToDo>}/>
64
<Route path='/components/static-jobs' element={<StaticJobs></StaticJobs>}/>
65
+ <Route path='/components/product-page' element={<ProductPage></ProductPage>}/>
66
67
{/* Pages */}
68
<Route path='/pages' element={<Pages></Pages>}/>
src/components/data.js
@@ -8,6 +8,15 @@ export const componentCardData = [
8
type: "component",
9
link:"/components/multi-step-form",
10
},
11
+ {
12
+ id:"18",
13
+ title: "E-commerce product page",
14
+ desc: "Lightbox Desktop Image Gallery & Slider Images Gallery for mobile, Functions to add items to cart. Smooth mobile Nav",
15
+ img: "https://res.cloudinary.com/dz209s6jk/image/upload/f_auto,q_auto,w_475/Challenges/fhzpdnabrek50hvhftnl.jpg",
16
+ category:"intermediate",
17
+ type: "component",
18
+ link:"/components/product-page",
19
+ },
20
{
21
id:"9",
22
title: "News homepage",
src/components/intermediate/ProductPage/Cart.css
@@ -13,12 +13,31 @@
grid-template-rows: auto 1fr;
}
-.product-page-cart-title {
+.product-page-cart-top {
padding: 20px;
border-bottom: 0.5px solid hsl(220, 14%, 75%);
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+}
23
+.product-page-cart-title {
24
font-weight: 700;
25
26
27
+.product-page-cart-top > button {
28
+ background-color: transparent;
29
+ border: none;
30
+ cursor: pointer;
31
32
+
33
+.product-page-cart-top > button > svg > path {
34
+ transition: all 0.2s ease;
35
36
37
+.product-page-cart-top > button:hover > svg > path {
38
+ fill: hsl(26, 100%, 55%);
39
40
41
.product-page-empty-cart {
42
display: grid;
43
place-items: center;
src/components/intermediate/ProductPage/Cart.jsx
@@ -3,10 +3,17 @@ import './Cart.css'
3
import deleteIcon from './assets/ecommerce-product-page-main/images/icon-delete.svg'
4
import {product} from './data.js'
5
6
7
const Cart = ({cartItems, setCartItems, setShowCart}) => {
return (
<div className="product-page-cart-container">
- <h5 className="product-page-cart-title">Cart</h5>
+ <div className="product-page-cart-top">
+ <h5 className="product-page-cart-title">Cart
+ </h5>
+ <button onClick={()=>setShowCart(false)}>
+ <svg width="14" height="15" xmlns="http://www.w3.org/2000/svg"><path d="m11.596.782 2.122 2.122L9.12 7.499l4.597 4.597-2.122 2.122L7 9.62l-4.595 4.597-2.122-2.122L4.878 7.5.282 2.904 2.404.782l4.595 4.596L11.596.782Z" fill="#69707D" fillRule="evenodd"/></svg>
+ </button>
+ </div>
cartItems === '' ?
src/components/intermediate/ProductPage/ProductPage.jsx
@@ -5,11 +5,15 @@ import './ProductPage.css'
const ProductPage = () => {
- const [amount, setAmount] = useState(0)
+ const [amount, setAmount] = useState(1)
const [cartItems, setCartItems] = useState('')
- <div className='product-page'>
+ <div className='product-page'
+ data-aos="fade-in"
+ data-aos-delay="200"
+ data-aos-duration="600"
+ >
<Nav amount={amount} cartItems={cartItems} setCartItems={setCartItems}></Nav>
<Product amount={amount} setAmount={setAmount} setCartItems={setCartItems} cartItems={cartItems}></Product>
</div>
src/pages/data.js
@@ -8,6 +8,15 @@ export const pagesData = [
type: "multi",
link:"https://archstudios.netlify.app/",
+ id:"4",
+ title: "Planets fact site",
+ desc: "Each planet from our solar system has a dedicated page with three subsections. Smooth Mobile Nav Menu.",
+ img: "https://res.cloudinary.com/dz209s6jk/image/upload/f_auto,q_auto,w_475/Challenges/wrljilk72cxhipdjyhpa.jpg",
+ category:"junior",
+ type: "multi",
+ link:"/pages/planet-facts",
id:"2",
title: "Easybank landing page",
@@ -26,13 +35,4 @@ export const pagesData = [
link:"/pages/sunnyside",
- {
- id:"4",
- title: "Planets fact site",
- desc: "8-page Site",
- img: "https://res.cloudinary.com/dz209s6jk/image/upload/f_auto,q_auto,w_475/Challenges/wrljilk72cxhipdjyhpa.jpg",
- category:"junior",
- type: "multi",
- link:"/pages/planet-facts",
- },
]
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments