a bit of refactoring

This commit is contained in:
Collin M. Barrett 2019-07-28 17:31:24 -05:00
parent e2290c120a
commit 2e24548deb
5 changed files with 61 additions and 54 deletions

View file

@ -1,3 +1,4 @@
/* use consistent and smaller font size globally */
body,
h2,
h3,
@ -7,6 +8,7 @@ blockquote {
font-size: 16px;
}
/* leave a bit of horizontal padding around the app for cleanliness */
.container {
max-width: 90vw;
}

View file

@ -1,12 +1,14 @@
import React from 'react';
import '../node_modules/bootstrap/dist/css/bootstrap.min.css'
import './App.css';
import { BrowserRouter } from "react-router-dom";
import * as RoutesModule from "./Routes";
import { Layout } from "./Layout";
import { Router } from "./Router";
const App: React.FC = () => {
return (
<BrowserRouter children={RoutesModule.Routes} />
<Layout>
<Router />
</Layout>
);
}

View file

@ -1,13 +1,14 @@
import * as React from "react";
import { Layout } from "./Layout";
import { Route, Redirect, Switch } from "react-router-dom";
import { Home } from "./modules";
import { BrowserRouter } from "react-router-dom";
export const Routes = <Layout>
const Routes =
<Switch>
<Route exact path="/" component={Home} />
<Route>
<Redirect to="/" />
</Route>
</Switch>
</Layout>;
</Switch>;
export const Router = () => <BrowserRouter children={Routes} />

View file

@ -1,13 +1,13 @@
body {
margin: 0;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
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',
font-family: source-code-pro, Menlo, Monaco, Consolas, "Courier New",
monospace;
}

View file

@ -3,66 +3,68 @@
.loader,
.loader:before,
.loader:after {
-ms-animation: load1 1s infinite ease-in-out;
-webkit-animation: load1 1s infinite ease-in-out;
animation: load1 1s infinite ease-in-out;
background: #000000;
height: 4em;
width: 1em;
-ms-animation: load1 1s infinite ease-in-out;
-webkit-animation: load1 1s infinite ease-in-out;
animation: load1 1s infinite ease-in-out;
background: #000000;
height: 4em;
width: 1em;
}
.loader {
-ms-transform: translateZ(0);
-webkit-animation-delay: -0.16s;
-webkit-transform: translateZ(0);
animation-delay: -0.16s;
color: #000000;
font-size: 11px;
margin: 88px auto;
position: relative;
text-indent: -9999em;
transform: translateZ(0);
-ms-transform: translateZ(0);
-webkit-animation-delay: -0.16s;
-webkit-transform: translateZ(0);
animation-delay: -0.16s;
color: #000000;
font-size: 11px;
margin: 88px auto;
position: relative;
text-indent: -9999em;
transform: translateZ(0);
}
.loader:before,
.loader:after {
content: '';
position: absolute;
top: 0;
content: "";
position: absolute;
top: 0;
}
.loader:before {
-webkit-animation-delay: -0.32s;
animation-delay: -0.32s;
left: -1.5em;
-webkit-animation-delay: -0.32s;
animation-delay: -0.32s;
left: -1.5em;
}
.loader:after { left: 1.5em; }
.loader:after {
left: 1.5em;
}
@-webkit-keyframes load1 {
0%,
80%,
100% {
box-shadow: 0 0;
height: 4em;
}
0%,
80%,
100% {
box-shadow: 0 0;
height: 4em;
}
40% {
box-shadow: 0 -2em;
height: 5em;
}
40% {
box-shadow: 0 -2em;
height: 5em;
}
}
@keyframes load1 {
0%,
80%,
100% {
box-shadow: 0 0;
height: 4em;
}
0%,
80%,
100% {
box-shadow: 0 0;
height: 4em;
}
40% {
box-shadow: 0 -2em;
height: 5em;
}
}
40% {
box-shadow: 0 -2em;
height: 5em;
}
}