Skip to content

Commit f54fe1a

Browse files
authored
Merge pull request #14 from AlokTakshak/development
updated the home page
2 parents 3221d0f + d945184 commit f54fe1a

File tree

7 files changed

+102
-34
lines changed

7 files changed

+102
-34
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "create-react-webpack",
3-
"version": "0.1.1",
3+
"version": "0.1.2",
44
"description": "create-react-webpack ",
55
"main": "scripts/create.js",
66
"bin": {

scripts/dependencies.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ const DEV_DEPENDENCIES = [
1313
"css-loader",
1414
"eslint",
1515
"eslint-plugin-react",
16+
"file-loader",
1617
"html-webpack-plugin",
1718
"husky",
1819
"jest",

template/logo/border.svg

Lines changed: 8 additions & 0 deletions
Loading

template/logo/logo.svg

Lines changed: 6 additions & 0 deletions
Loading

template/src/App.css

Lines changed: 58 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,68 @@ html {
1010
box-sizing: inherit;
1111
}
1212

13-
.app {
14-
background-color: antiquewhite;
15-
display: flex;
16-
flex-direction: column;
17-
align-items: center;
18-
justify-content: center;
19-
height: 98vh;
13+
.App {
14+
font-family: sans-serif;
15+
text-align: center;
16+
width: 100%;
17+
height: 100vh;
18+
}
19+
20+
.black {
21+
background-color: rgb(46, 43, 43);
2022
width: 100%;
23+
height: 30%;
2124
}
2225

2326
.button {
24-
background-color: red;
25-
border-radius: 20px;
26-
color: white;
27-
font-size: 20px;
28-
font-weight: bold;
27+
border-radius: 50%;
28+
font-size: 30px;
2929
margin: 10px;
30+
width: 40px;
31+
height: 40px;
3032
outline: none;
31-
padding-left: 20px;
32-
padding-right: 20px;
33+
}
34+
.loaderContainer {
35+
position: relative;
36+
display: flex;
37+
justify-content: center;
38+
align-items: center;
39+
background-position: center;
40+
background-size: 160px;
41+
background-repeat: no-repeat;
42+
height: 180px;
43+
top: -90px;
44+
animation: counterClock 3s linear infinite;
45+
filter: brightness(0.93);
46+
}
47+
48+
.loader {
49+
width: 100px;
50+
height: 100px;
51+
animation: clock 2s linear infinite;
52+
background-size: 150%;
53+
background-position: center;
54+
}
55+
56+
.text {
57+
font-size: 24px;
58+
padding: 10px;
59+
}
60+
61+
@keyframes clock {
62+
0% {
63+
transform: rotate(0deg);
64+
}
65+
100% {
66+
transform: rotate(360deg);
67+
}
68+
}
69+
70+
@keyframes counterClock {
71+
0% {
72+
transform: rotate(360deg);
73+
}
74+
100% {
75+
transform: rotate(0deg);
76+
}
3377
}

template/src/App.js

Lines changed: 24 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import React, { Component } from "react";
22
import { hot } from "react-hot-loader";
33
import "./App.css";
4+
import logo from "../logo/logo.svg";
5+
import border from "../logo/border.svg";
46

57
class App extends Component {
68
constructor(props) {
@@ -10,28 +12,31 @@ class App extends Component {
1012
};
1113
}
1214

15+
handleCount(input) {
16+
this.setState(prevState => ({ count: prevState.count + input }));
17+
}
18+
1319
render() {
1420
return (
15-
<div className="app">
16-
<h1>Hello World!</h1>
17-
<h2>{`Count : ${this.state.count}`}</h2>
18-
<div>
19-
<button
20-
className="button"
21-
onClick={() => {
22-
this.setState(state => ({ count: state.count + 1 }));
23-
}}
24-
>
25-
+
26-
</button>
27-
<button
28-
className="button"
29-
onClick={() => {
30-
this.setState(state => ({ count: state.count - 1 }));
31-
}}
21+
<div>
22+
<div className="App">
23+
<div className="black" />
24+
<div
25+
className="loaderContainer"
26+
style={{ backgroundImage: `url(${border})` }}
3227
>
33-
-
34-
</button>
28+
<img className="loader" src={logo} width={100} height={100} />
29+
</div>
30+
<div className="text">Hello World!</div>
31+
<div className="text">{this.state.count}</div>
32+
<div className="buttons">
33+
<button className="button" onClick={() => this.handleCount(1)}>
34+
+
35+
</button>
36+
<button className="button" onClick={() => this.handleCount(-1)}>
37+
-
38+
</button>
39+
</div>
3540
</div>
3641
</div>
3742
);

template/webpack.config.base.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ module.exports = {
2020
test: /\.css$/,
2121
use: ["style-loader", "css-loader"],
2222
exclude: /node_modules/
23+
},
24+
{
25+
test: /\.svg$/,
26+
use: "file-loader"
2327
}
2428
]
2529
},

0 commit comments

Comments
 (0)