Get SPA working

This commit is contained in:
Daniel Mason 2021-03-25 21:52:06 +13:00
parent 2fe9516fc2
commit 66f900dee9
6 changed files with 39 additions and 18 deletions

View File

@ -24,6 +24,17 @@
color: white; color: white;
} }
.pageWrapper {
background-color: #282c34;
padding-top: 100px;
min-height: 100vh;
display: flex;
flex-direction: column;
align-items: center;
font-size: calc(10px + 2vmin);
color: white;
}
.App-link { .App-link {
color: #61dafb; color: #61dafb;
} }

View File

@ -0,0 +1,4 @@
.aboutBody {
padding-top: 20px;
font-size: 16pt;
}

View File

@ -1,21 +1,15 @@
import logo from '../../logo.svg';
import '../../App.css'; import '../../App.css';
import './About.css';
function About() { function About() {
return ( return (
<div> <div className="pageWrapper">
<img src={logo} className="App-logo" alt="logo" /> <h1>
<p> About GoScrobble.com
TEST!!! </h1>
<p className="aboutBody">
Go-Scrobble is an open source music scorbbling service written in Go and React.<br/>
</p> </p>
<a
className="App-link"
href="https://git.m2.nz/idanoo/go-scrobble"
target="_blank"
rel="noopener noreferrer"
>
TEST@!@@
</a>
</div> </div>
); );
} }

View File

@ -0,0 +1,9 @@
.navLink {
padding: 10px;
color: #CCCCCC;
}
.navLink:hover {
color: #666666;
text-decoration: none;
}

View File

@ -1,13 +1,15 @@
import React from 'react'; import React from 'react';
import { Navbar, NavbarBrand, NavLink } from 'reactstrap'; import { Navbar, NavbarBrand } from 'reactstrap';
import { Link } from 'react-router-dom';
import './Navigation.css';
const Navigation = () => { const Navigation = () => {
return ( return (
<div> <div>
<Navbar color="dark" dark fixed="top"> <Navbar color="dark" dark fixed="top">
<NavbarBrand exact href="/" className="mr-auto">GoScrobble</NavbarBrand> <NavbarBrand exact href="/" className="mr-auto">GoScrobble</NavbarBrand>
<NavLink exact href="/">Home</NavLink> <Link class="navLink" to="/">Home</Link>
<NavLink href="/about">About</NavLink> <Link class="navLink" to="/about">About</Link>
</Navbar> </Navbar>
</div> </div>
); );

View File

@ -2,10 +2,11 @@ import React from 'react';
import ReactDOM from 'react-dom'; import ReactDOM from 'react-dom';
import './index.css'; import './index.css';
import App from './App'; import App from './App';
import { BrowserRouter } from 'react-router-dom'
ReactDOM.render( ReactDOM.render(
<React.StrictMode> <BrowserRouter>
<App /> <App />
</React.StrictMode>, </BrowserRouter>,
document.getElementById('root') document.getElementById('root')
); );