From d9451849a401aafed463367689ac375949bad2b3 Mon Sep 17 00:00:00 2001 From: alok Date: Fri, 4 Oct 2019 12:19:41 +0530 Subject: [PATCH] updated the home page --- package.json | 2 +- scripts/dependencies.js | 1 + template/logo/border.svg | 8 ++++ template/logo/logo.svg | 6 +++ template/src/App.css | 72 ++++++++++++++++++++++++++------- template/src/App.js | 43 +++++++++++--------- template/webpack.config.base.js | 4 ++ 7 files changed, 102 insertions(+), 34 deletions(-) create mode 100644 template/logo/border.svg create mode 100644 template/logo/logo.svg diff --git a/package.json b/package.json index 6605028..243ae9a 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "create-react-webpack", - "version": "0.1.1", + "version": "0.1.2", "description": "create-react-webpack ", "main": "scripts/create.js", "bin": { diff --git a/scripts/dependencies.js b/scripts/dependencies.js index e6e7c0b..e49ee5e 100644 --- a/scripts/dependencies.js +++ b/scripts/dependencies.js @@ -13,6 +13,7 @@ const DEV_DEPENDENCIES = [ "css-loader", "eslint", "eslint-plugin-react", + "file-loader", "html-webpack-plugin", "husky", "jest", diff --git a/template/logo/border.svg b/template/logo/border.svg new file mode 100644 index 0000000..f968e62 --- /dev/null +++ b/template/logo/border.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/template/logo/logo.svg b/template/logo/logo.svg new file mode 100644 index 0000000..c4ed392 --- /dev/null +++ b/template/logo/logo.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/template/src/App.css b/template/src/App.css index 4a7393f..b274d11 100644 --- a/template/src/App.css +++ b/template/src/App.css @@ -10,24 +10,68 @@ html { box-sizing: inherit; } -.app { - background-color: antiquewhite; - display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - height: 98vh; +.App { + font-family: sans-serif; + text-align: center; + width: 100%; + height: 100vh; +} + +.black { + background-color: rgb(46, 43, 43); width: 100%; + height: 30%; } .button { - background-color: red; - border-radius: 20px; - color: white; - font-size: 20px; - font-weight: bold; + border-radius: 50%; + font-size: 30px; margin: 10px; + width: 40px; + height: 40px; outline: none; - padding-left: 20px; - padding-right: 20px; +} +.loaderContainer { + position: relative; + display: flex; + justify-content: center; + align-items: center; + background-position: center; + background-size: 160px; + background-repeat: no-repeat; + height: 180px; + top: -90px; + animation: counterClock 3s linear infinite; + filter: brightness(0.93); +} + +.loader { + width: 100px; + height: 100px; + animation: clock 2s linear infinite; + background-size: 150%; + background-position: center; +} + +.text { + font-size: 24px; + padding: 10px; +} + +@keyframes clock { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(360deg); + } +} + +@keyframes counterClock { + 0% { + transform: rotate(360deg); + } + 100% { + transform: rotate(0deg); + } } diff --git a/template/src/App.js b/template/src/App.js index a390b49..c34d1ff 100644 --- a/template/src/App.js +++ b/template/src/App.js @@ -1,6 +1,8 @@ import React, { Component } from "react"; import { hot } from "react-hot-loader"; import "./App.css"; +import logo from "../logo/logo.svg"; +import border from "../logo/border.svg"; class App extends Component { constructor(props) { @@ -10,28 +12,31 @@ class App extends Component { }; } + handleCount(input) { + this.setState(prevState => ({ count: prevState.count + input })); + } + render() { return ( -
-

Hello World!

-

{`Count : ${this.state.count}`}

-
- - + +
+
Hello World!
+
{this.state.count}
+
+ + +
); diff --git a/template/webpack.config.base.js b/template/webpack.config.base.js index 8f1062f..9eaa9df 100644 --- a/template/webpack.config.base.js +++ b/template/webpack.config.base.js @@ -20,6 +20,10 @@ module.exports = { test: /\.css$/, use: ["style-loader", "css-loader"], exclude: /node_modules/ + }, + { + test: /\.svg$/, + use: "file-loader" } ] },