Skip to content

Commit

Permalink
Basic website structure
Browse files Browse the repository at this point in the history
  • Loading branch information
pizzalemon committed Jun 21, 2022
1 parent bc728c1 commit efde43c
Show file tree
Hide file tree
Showing 10 changed files with 166 additions and 45 deletions.
58 changes: 58 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
"@testing-library/user-event": "^13.5.0",
"react": "^18.1.0",
"react-dom": "^18.1.0",
"react-router-dom": "^6.3.0",
"react-scripts": "5.0.1",
"styled-components": "^5.3.5",
"web-vitals": "^2.1.4"
Expand Down
51 changes: 31 additions & 20 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,36 @@
import logo from './logo.svg';
import React from "react"
import { BrowserRouter as Router, Routes, Route } from "react-router-dom"
import './App.css';
import Header from "./Header.js"

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>
);
import Home from "./pages/Home"
import About from "./pages/About"
import Members from "./pages/Members"
import Resources from "./pages/Resources"

const App = () => {
return (
<Router>
<Header />
<Routes>
<Route path="/" element={
<Home />
} />

<Route path="/about" element={
<About />
} />

<Route path="/officers" element={
<Members />
} />

<Route path="/resources" element={
<Resources />
} />
</Routes>
</Router>
);
}

export default App;
29 changes: 29 additions & 0 deletions src/Header.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
import React from 'react';
import styled from "styled-components";
import { Link } from "react-router-dom";

const Header = () => {
return (
<StyledHeader>
TJHSST Quantum Computing Club
<Link to="/">Home</Link>
<Link to="/about">About</Link>
<Link to="/officers">Officers</Link>
<Link to="/resources">Resources</Link>
</StyledHeader>
)
}

const StyledHeader = styled.div`
font-size: 30px;
font-weight: bold;
text-align: center;
margin-top: 40px;
margin-left: 80px;
margin-right: 80px;
padding-top: 15px;
padding-bottom: 15px;
background: lightskyblue;
`

export default Header;
14 changes: 1 addition & 13 deletions src/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,4 @@ body {
code {
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
monospace;
}

.heading {
font-size: 30px;
font-weight: bold;
text-align: center;
margin-top: 40px;
margin-left: 80px;
margin-right: 80px;
padding-top: 15px;
padding-bottom: 15px;
background: lightskyblue;
}
}
14 changes: 2 additions & 12 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,12 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import './index.css';
// import App from './App';
import App from './App';
import reportWebVitals from './reportWebVitals';

class Heading extends React.Component {
render() {
return (
<div className = "heading">
TJHSST Quantum Computing Club
</div>
)
}
}

const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
<Heading />
<App />
);

// If you want to start measuring performance in your app, pass a function
Expand Down
11 changes: 11 additions & 0 deletions src/pages/About.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react"

const About = () => {
return (
<div>
About
</div>
)
}

export default About
11 changes: 11 additions & 0 deletions src/pages/Home.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react"

const Home = () => {
return (
<div>
Home
</div>
)
}

export default Home
11 changes: 11 additions & 0 deletions src/pages/Members.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react"

const Members = () => {
return (
<div>
Members
</div>
)
}

export default Members
11 changes: 11 additions & 0 deletions src/pages/Resources.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import React from "react"

const Resources = () => {
return (
<div>
Resources
</div>
)
}

export default Resources

0 comments on commit efde43c

Please sign in to comment.