Skip to content

Commit cf43742

Browse files
committed
subBridge created and styled
1 parent 3dfdf6d commit cf43742

14 files changed

+224
-1
lines changed

debug.log

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
[1025/142900.327:WARNING:minidump_to_upload_parameters.cc(36)] duplicate key guid, discarding value e580bed1-34e2-41e2-8c81-7de2090ee2ea

package-lock.json

+102
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"react": "^16.10.2",
88
"react-dom": "^16.10.2",
99
"react-icons": "^3.7.0",
10+
"react-router-dom": "^5.1.2",
1011
"react-scripts": "3.2.0"
1112
},
1213
"scripts": {

src/Views/Homepage/Homepage.js

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import Carousel from './Carousel/Carousel'
44
import BridgeComponent from './Bridge/BridgeComponent'
55
import Products from '../../Commons/Products/Products'
66
import MidBanner from './MidBanner/MidBanner'
7+
import SubBridge from './SubBridge'
78

89

910

@@ -15,6 +16,7 @@ function Homepage() {
1516
<BridgeComponent />
1617
<Products />
1718
<MidBanner />
19+
<SubBridge />
1820

1921

2022
</div>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
.sub {
2+
display: flex;
3+
justify-content: space-between;
4+
width: 113rem;
5+
margin-top: 3rem;
6+
flex-wrap: wrap;
7+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import React from "react";
2+
import "./SubBridgePosts.scss";
3+
4+
export default function SubBridgePosts({ image, title, body }) {
5+
return (
6+
<div className="SubBridgePosts">
7+
<div className="img">
8+
<img src={require(`../../../assets/img/${image}`)} alt="avatar" />
9+
</div>
10+
<h3>{title}</h3>
11+
<p>{body}</p>
12+
</div>
13+
);
14+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
.SubBridgePosts {
2+
display: flex;
3+
flex-direction: column;
4+
justify-content: space-between;
5+
text-align: center;
6+
width: 33rem;
7+
height: 25.6rem;
8+
padding: 3rem;
9+
10+
.img {
11+
height: 45px;
12+
width: auto;
13+
14+
img {
15+
height: inherit;
16+
}
17+
}
18+
19+
p {
20+
line-height: 1.7;
21+
font-size: 1.2rem;
22+
}
23+
24+
h3 {
25+
font-size: 2rem;
26+
font-weight: normal;
27+
}
28+
29+
}

src/Views/Homepage/SubBridge/index.js

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import React from "react";
2+
import SubBridgePosts from "./SubBridgePosts";
3+
import { subBridge } from "../../../data/metadata.json";
4+
import './SubBridge.scss'
5+
6+
export default function index() {
7+
return (
8+
<div className="SubBridge">
9+
<div className="sub container">
10+
{subBridge.map((value, index) => (
11+
<SubBridgePosts
12+
key={index}
13+
image={value.image}
14+
title={value.title}
15+
body={value.body}
16+
/>
17+
))}
18+
</div>
19+
</div>
20+
);
21+
}

src/Views/Store/index.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import React from 'react'
2+
3+
export default function Store() {
4+
return (
5+
<div>
6+
7+
</div>
8+
)
9+
}

src/assets/img/refund.png

1.66 KB
Loading

src/assets/img/shipping.png

1.32 KB
Loading

src/assets/img/support.png

1.72 KB
Loading

src/data/metadata.json

+19-1
Original file line numberDiff line numberDiff line change
@@ -122,5 +122,23 @@
122122
"oldPrice": 344
123123
}
124124
]
125-
}
125+
},
126+
127+
"subBridge": [
128+
{
129+
"image": "shipping.png",
130+
"title": "FREE SHIPPING",
131+
"body" : "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor minim veniam, quis nostrud reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur"
132+
},
133+
{
134+
"image": "refund.png",
135+
"title": "100% REFUND",
136+
"body" : "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor minim veniam, quis nostrud reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur"
137+
},
138+
{
139+
"image": "support.png",
140+
"title": "SUPPORT 24/7",
141+
"body" : "Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor minim veniam, quis nostrud reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur"
142+
}
143+
]
126144
}

src/router.js

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import React from 'react'
2+
import { BrowserRouter as Router, Route } from 'react-router-dom';
3+
import Homepage from './Views/Homepage/Homepage';
4+
import Store from './Views/Store';
5+
import Header from './Commons/Header/Header'
6+
7+
8+
export default function AppRoutes() {
9+
10+
return (
11+
<Router>
12+
<Header />
13+
<Route exact path="/" component={Homepage} />
14+
<Route exact path="/store" component={Store} />
15+
16+
</Router>
17+
);
18+
19+
}

0 commit comments

Comments
 (0)