Skip to content

Commit

Permalink
home page
Browse files Browse the repository at this point in the history
  • Loading branch information
miliPaoletti committed Aug 28, 2021
1 parent 9b36a92 commit ec07d76
Show file tree
Hide file tree
Showing 24 changed files with 693 additions and 92 deletions.
9 changes: 9 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"editor.formatOnSave": true,
"[javascript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode"
},
"prettier.tabWidth": 4,
"prettier.printWidth": 160

}
6 changes: 6 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,18 @@
"version": "0.1.0",
"private": true,
"dependencies": {
"@reduxjs/toolkit": "^1.6.1",
"@testing-library/jest-dom": "^5.11.4",
"@testing-library/react": "^11.1.0",
"@testing-library/user-event": "^12.1.10",
"bootstrap": "^5.1.0",
"react": "^17.0.2",
"react-bootstrap": "^1.6.1",
"react-dom": "^17.0.2",
"react-redux": "^7.2.4",
"react-scripts": "4.0.3",
"redux": "^4.1.1",
"styled-components": "^5.3.1",
"web-vitals": "^1.0.1"
},
"scripts": {
Expand Down
Binary file added public/NunitoSans-Bold.ttf
Binary file not shown.
Binary file modified public/favicon.ico
Binary file not shown.
11 changes: 10 additions & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,16 @@
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>React App</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css"
integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l"
crossorigin="anonymous"
/>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:ital,wght@0,400;1,200&display=swap" rel="stylesheet">
<title>Ethermint Faucet</title>
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
Expand Down
38 changes: 0 additions & 38 deletions src/App.css

This file was deleted.

22 changes: 2 additions & 20 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,7 @@
import logo from './logo.svg';
import './App.css';
import { Main } from "./components/Main";

function App() {
return (
<div className="App">
<header className="App-header">
<img src={logo} className="App-logo" alt="logo" />
<p>
Edit <code>src/App.js</code> and save to reload.
</p>
<a
className="App-link"
href="https://reactjs.org"
target="_blank"
rel="noopener noreferrer"
>
Learn React
</a>
</header>
</div>
);
return <Main />;
}

export default App;
8 changes: 0 additions & 8 deletions src/App.test.js

This file was deleted.

Binary file added src/NunitoSans-Bold.ttf
Binary file not shown.
10 changes: 10 additions & 0 deletions src/components/Header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import styled from "styled-components";
import { NavbarBase } from "./NavbarBase";

export const Header = () => {
return (
<header>
<NavbarBase />
</header>
);
};
25 changes: 25 additions & 0 deletions src/components/Home.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import styled from "styled-components";
import { Search } from "./generics/Inputs/Search";
import { TitlePrimary } from "./generics/Titles/TitlePrimary";

const StyledContainer = styled.div`
{
align-items: center;
display: flex;
height: 80%;
justify-content: center;
padding: 1em;
text-align: center;
}
`;

export const Home = () => {
return (
<StyledContainer>
<div>
<TitlePrimary />
<Search />
</div>
</StyledContainer>
);
};
56 changes: 56 additions & 0 deletions src/components/Main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
import { Header } from "./Header";
import { Home } from "./Home";
import styled from "styled-components";

const StyledMain = styled.div`
{
// background: rgb(232, 243, 255);
// background: -moz-linear-gradient(180deg, rgba(232, 243, 255, 1) 0%, rgba(255, 255, 255, 1) 100%);
// background: -webkit-linear-gradient(180deg, rgba(232, 243, 255, 1) 0%, rgba(255, 255, 255, 1) 100%);
// background: linear-gradient(180deg, rgba(232, 243, 255, 1) 0%, rgba(255, 255, 255, 1) 100%);
// filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#e8f3ff",endColorstr="#ffffff",GradientType=1);
background: rgb(204, 218, 255);
background: -moz-linear-gradient(
164deg,
rgba(204, 218, 255, 1) 0%,
rgba(143, 207, 250, 1) 14%,
rgba(83, 182, 233, 1) 36%,
rgba(22, 159, 200, 1) 64%,
rgba(50, 82, 147, 1) 100%
);
background: -webkit-linear-gradient(
164deg,
rgba(204, 218, 255, 1) 0%,
rgba(143, 207, 250, 1) 14%,
rgba(83, 182, 233, 1) 36%,
rgba(22, 159, 200, 1) 64%,
rgba(50, 82, 147, 1) 100%
);
background: linear-gradient(
164deg,
rgba(204, 218, 255, 1) 0%,
rgba(143, 207, 250, 1) 14%,
rgba(83, 182, 233, 1) 36%,
rgba(22, 159, 200, 1) 64%,
rgba(50, 82, 147, 1) 100%
);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#ccdaff",endColorstr="#325293",GradientType=1);
height: 100vh;
}
`;

export const Main = () => {
return (
<StyledMain>
<Header />
<Home />
</StyledMain>
);
};

// background: rgb(96, 163, 224);
// background: -moz-linear-gradient(180deg, rgba(96, 163, 224, 1) 0%, rgba(163, 191, 233, 1) 48%, rgba(231, 243, 255, 1) 100%);
// background: -webkit-linear-gradient(180deg, rgba(96, 163, 224, 1) 0%, rgba(163, 191, 233, 1) 48%, rgba(231, 243, 255, 1) 100%);
// background: linear-gradient(180deg, rgba(96, 163, 224, 1) 0%, rgba(163, 191, 233, 1) 48%, rgba(231, 243, 255, 1) 100%);
// filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#60a3e0",endColorstr="#e7f3ff",GradientType=1);
36 changes: 36 additions & 0 deletions src/components/NavbarBase.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
import Navbar from "react-bootstrap/Navbar";
import Container from "react-bootstrap/Container";
import Nav from "react-bootstrap/Nav";

import Image from "react-bootstrap/Image";
import { ButtonPrimary } from "./generics/Buttons/ButtonPrimary";
import { ButtonPrimaryOutline } from "./generics/Buttons/ButtonPrimaryOutline";
import ethermint from "../img/ethermint.png";
import styled from "styled-components";

const StyledNav = styled(Nav)`
{
button {
margin-left: 1em;
}
}
`;

export const NavbarBase = () => {
return (
<Navbar expand="lg">
<Container>
<Navbar.Brand href="#">
<Image alt="Ethermint logo" src={ethermint} width="30" height="30" /> Ethermint
</Navbar.Brand>
<Navbar.Toggle aria-controls="ethermint-nav" />
<Navbar.Collapse id="ethermint-nav" className="justify-content-end">
<StyledNav>
<ButtonPrimaryOutline text="Login" />
<ButtonPrimary text="Request refunds" />
</StyledNav>
</Navbar.Collapse>
</Container>
</Navbar>
);
};
5 changes: 5 additions & 0 deletions src/components/generics/Buttons/ButtonPrimary.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { StyledButtonPrimary } from "./StyleButtonPrimary";

export const ButtonPrimary = (props) => {
return <StyledButtonPrimary>{props.text}</StyledButtonPrimary>;
};
5 changes: 5 additions & 0 deletions src/components/generics/Buttons/ButtonPrimaryOutline.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { StyledButtonPrimaryOutline } from "./StyleButtonPrimaryOutline";

export const ButtonPrimaryOutline = (props) => {
return <StyledButtonPrimaryOutline>{props.text}</StyledButtonPrimaryOutline>;
};
31 changes: 31 additions & 0 deletions src/components/generics/Buttons/StyleButtonPrimary.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import Button from "react-bootstrap/Button";
import styled from "styled-components";

const style = `{
background: rgb(61,107,153);
background: -moz-linear-gradient(221deg, rgba(61,107,153,1) -1.08%, rgba(51,102,153,1) 95.88%);
background: -webkit-linear-gradient(221deg, rgba(61,107,153,1) -1.08%, rgba(51,102,153,1) 95.88%);
background: linear-gradient(221deg, rgba(61,107,153,1) -1.08%, rgba(51,102,153,1) 95.88%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3d6b99",endColorstr="#336699",GradientType=1);
border: 0;
}`;

export const StyledButtonPrimary = styled(Button)`
{
${style};
box-shadow: 0 0 0 0;
&:focus,
.focus,
:not(:disabled):not(.disabled):active,
:not(:disabled):not(.disabled).active,
show > .dropdown-toggle {
box-shadow: 0 0 0 0;
}
&:not(:disabled):not(.disabled):active:focus,
:not(:disabled):not(.disabled).active:focus,
show > .dropdown-toggle:focus {
box-shadow: 0 0 0 0rem rgba(0, 0, 0, 0);
}
}
`;
31 changes: 31 additions & 0 deletions src/components/generics/Buttons/StyleButtonPrimaryOutline.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import Button from "react-bootstrap/Button";
import styled from "styled-components";

const style = `{
background: white;
border: 1px solid rgb(61,107,153);
color: rgb(61,107,153);
}`;

export const StyledButtonPrimaryOutline = styled(Button)`
{
${style};
box-shadow: 0 0 0 0;
&:focus,
.focus,
:hover,
:not(:disabled):not(.disabled):active,
:not(:disabled):not(.disabled).active,
show > .dropdown-toggle {
box-shadow: 0 0 0 0;
${style};
}
&:not(:disabled):not(.disabled):active:focus,
:not(:disabled):not(.disabled).active:focus,
show > .dropdown-toggle:focus {
box-shadow: 0 0 0 0rem rgba(0, 0, 0, 0);
${style};
}
}
`;
20 changes: 20 additions & 0 deletions src/components/generics/Inputs/Search.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import styled from "styled-components";
import FormControl from "react-bootstrap/FormControl";

const StyledFormControl = styled(FormControl)`
{
border-radius: 2rem;
padding-left: 2rem;
&:focus {
color: unset;
border: 1px solid #ced4da;
outline: 0;
box-shadow: none;
}
}
`;

export const Search = () => {
return <StyledFormControl type="text" placeholder="Ethermint Address" aria-label="Username" aria-describedby="basic-addon1" />;
};
12 changes: 12 additions & 0 deletions src/components/generics/Titles/TitlePrimary.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import styled from "styled-components";

const StyledTitle = styled.p`
{
font-size: 3rem;
color: white;
}
`;

export const TitlePrimary = () => {
return <StyledTitle>Ethermint testnet faucet</StyledTitle>;
};
Binary file added src/img/ethermint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 6 additions & 10 deletions src/index.css
Original file line number Diff line number Diff line change
@@ -1,13 +1,9 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
font-family: 'Nunito Sans', sans-serif;
}
@font-face {
font-family: 'Nunito Sans', sans-serif;
src: url("./NunitoSans-Bold.ttf") format("opentype");

}
Loading

0 comments on commit ec07d76

Please sign in to comment.