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;
}
.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 {
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 './About.css';
function About() {
return (
<div>
<img src={logo} className="App-logo" alt="logo" />
<p>
TEST!!!
<div className="pageWrapper">
<h1>
About GoScrobble.com
</h1>
<p className="aboutBody">
Go-Scrobble is an open source music scorbbling service written in Go and React.<br/>
</p>
<a
className="App-link"
href="https://git.m2.nz/idanoo/go-scrobble"
target="_blank"
rel="noopener noreferrer"
>
TEST@!@@
</a>
</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 { Navbar, NavbarBrand, NavLink } from 'reactstrap';
import { Navbar, NavbarBrand } from 'reactstrap';
import { Link } from 'react-router-dom';
import './Navigation.css';
const Navigation = () => {
return (
<div>
<Navbar color="dark" dark fixed="top">
<NavbarBrand exact href="/" className="mr-auto">GoScrobble</NavbarBrand>
<NavLink exact href="/">Home</NavLink>
<NavLink href="/about">About</NavLink>
<Link class="navLink" to="/">Home</Link>
<Link class="navLink" to="/about">About</Link>
</Navbar>
</div>
);

View File

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