Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 19 additions & 21 deletions src/App.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,27 @@

import React from "react";
import { BrowserRouter, Navigate, Route, Routes } from "react-router-dom";
import Homepage from "./home/Homepage";
import Activity from "./activity/Activity";
import Events from './activity/Events';
import Projects from './activity/Projects';
import Activity from "./activity/Activity";
import Events from "./activity/Events";
import Projects from "./activity/Projects";
import Resources from "./resources/Resources";
import NavigationBar from "./navbar/NavigationBar";

const App = () => {
return (
<BrowserRouter>
<NavigationBar />
<Routes>
<Route path="/homepage" element={<Homepage />} />
<Route path="/activity" element={<Activity />} />
<Route path="/activity/events" element={<Events />} />
<Route path="/activity/projects" element={<Projects />} />
<Route path="/resources" element={<Resources />} />
<Route path="*" element={<Navigate to="/homepage" replace />} />
</Routes>
{/* Add Footer */}
</BrowserRouter>
);

};
function App() {
return (
<BrowserRouter>
<NavigationBar />
<Routes>
<Route path="/homepage" element={<Homepage />} />
<Route path="/activity" element={<Activity />} />
<Route path="/activity/events" element={<Events />} />
<Route path="/activity/projects" element={<Projects />} />
<Route path="/resources" element={<Resources />} />
<Route path="*" element={<Navigate to="/homepage" replace />} />
</Routes>
{/* Add Footer */}
</BrowserRouter>
);
}

export default App;
126 changes: 74 additions & 52 deletions src/activity/Activity.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React, { useState, useRef } from 'react';
import { Link } from 'react-router-dom';
import './activity.css';
import Events from './Events';
import Projects from './Projects';
import React, { useState, useRef } from "react";
import { Link } from "react-router-dom";
import "./activity.css";
import Events from "./Events";
import Projects from "./Projects";

/*
Create card tab Event | Project both underline + hover highlight box
Expand All @@ -21,63 +21,85 @@ Container inlcude:
Card: Image, title, Url, Description, update (except project)
*/



const Activity = () => {
function Activity() {
return (
<div className="activity-container">
<h1 className="activity-title">Activity</h1>
<Tab className="tab-components"/>
</div>);
};
<div className="activity-container">
<h1 className="activity-title">Activity</h1>
<Tab className="tab-components" />
</div>
);
}

export default Activity;

function Tab() {
const [tabState, setTab] = useState(1);

const [tabState, setTab] = useState(1)

const toggleTab = (index) => {
setTab(index)
}

const toggleTab = index => {
setTab(index);
};

return (
<>
<div className='tab-container'>
{/* <Link to='/activity/events' className='tab-button'>Events</Link>
<div className="tab-container">
{/* <Link to='/activity/events' className='tab-button'>Events</Link>
<Link to='activity/projects' className='tab-button'>Projects</Link> */}
<div className='tabs'>
<button type='button' onClick={() => toggleTab(1)} className={tabState == 1 ? 'tab-button active' : 'tab-button'}>Events</button>
<button type='button' onClick={() => toggleTab(2)} className={tabState == 2 ? 'tab-button active' : 'tab-button'}>Projects</button>
<div className="tabs">
<button
type="button"
onClick={() => toggleTab(1)}
className={tabState == 1 ? "tab-button active" : "tab-button"}
>
Events
</button>
<button
type="button"
onClick={() => toggleTab(2)}
className={tabState == 2 ? "tab-button active" : "tab-button"}
>
Projects
</button>
</div>
<div className="tab-contents">
<div
className={
tabState == 1 ? "tab-content active-content" : "tab-content"
}
>
<h2>Title 1</h2>
<img src="#" />
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat.
</p>
</div>
<div className="tab-contents">
<div className={tabState == 1 ? 'tab-content active-content': 'tab-content'}>
<h2>Title 1</h2>
<img src="#" />
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat.</p>
</div>
<div className={tabState == 2 ? 'tab-content active-content': 'tab-content'}>
<h2>Title 2</h2>
<img src="#" />

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris
nisi ut aliquip ex ea commodo consequat.</p>

<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit,
sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p>

</div>
<div
className={
tabState == 2 ? "tab-content active-content" : "tab-content"
}
>
<h2>Title 2</h2>
<img src="#" />

<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat.
</p>

<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do
eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim
ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut
aliquip ex ea commodo consequat. Duis aute irure dolor in
reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla
pariatur. Excepteur sint occaecat cupidatat non proident, sunt in
culpa qui officia deserunt mollit anim id est laborum.
</p>
</div>
</div>
</>
)
</div>
);
}
11 changes: 4 additions & 7 deletions src/activity/Events.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
import React from 'react';
import './activity.css';

import React from "react";
import "./activity.css";

function Events() {
return (
<div>Events</div>
)
return <div>Events</div>;
}

export default Events;
export default Events;
10 changes: 4 additions & 6 deletions src/activity/Projects.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import React from 'react';
import './activity.css';
import React from "react";
import "./activity.css";

function Projects() {
return (
<div>Projects</div>
)
return <div>Projects</div>;
}

export default Projects;
export default Projects;
84 changes: 42 additions & 42 deletions src/activity/activity.css
Original file line number Diff line number Diff line change
@@ -1,81 +1,81 @@
.activity-container {
width: 100vw;
width: 100vw;
}

.tab-components {
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
display: flex;
flex-direction: row;
justify-content: center;
align-items: center;
}
/* TAB BUTTON */

.tab-container {
padding: 0 3rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
padding: 0 3rem;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}

.tabs {
width: 90%;
display: flex;
justify-content: center;
width: 90%;
display: flex;
justify-content: center;
}

.tab-button {
min-width: 150px;
height: 3rem;
font-size: 1rem;
cursor: pointer;
margin-right: 10px;
outline: 0;
border: 0;
color: #535353;
background-color: #ff9617;
text-decoration: none;
border-bottom: 5px solid black;
border-radius: 10px;
font-weight: bold;
text-align: center;
min-width: 150px;
height: 3rem;
font-size: 1rem;
cursor: pointer;
margin-right: 10px;
outline: 0;
border: 0;
color: #535353;
background-color: #ff9617;
text-decoration: none;
border-bottom: 5px solid black;
border-radius: 10px;
font-weight: bold;
text-align: center;
}

.tab-button.active {
border-bottom: 2px solid white;
opacity: 1;
transform: scale(1.1);
border-bottom: 2px solid white;
opacity: 1;
transform: scale(1.1);
}

.tab-button:hover {
color: #fff;
background-color: #535353;
transform: scale(1.1);
color: #fff;
background-color: #535353;
transform: scale(1.1);
}

/* TAB LINE SECLECT ANIMATION */

/* TAB CONTENT */
.tab-contents {
flex-grow: 1;
flex-grow: 1;
}

.tab-content {
background-color: black;
color: white; /* Will change due to switching tab*/
margin: 1rem;
padding: 30px;
border: 2px white outset;
display: none;
background-color: black;
color: white; /* Will change due to switching tab*/
margin: 1rem;
padding: 30px;
border: 2px white outset;
display: none;
}

.active-content {
display: block;
display: block;
}

/* Add expand for news */

/* tab-container */
.activity-title {
color: white;
color: white;
}
4 changes: 2 additions & 2 deletions src/app.css
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
html, body {
html,
body {
height: 100vh;
width: 100vw;
margin: 0;
Expand Down Expand Up @@ -40,4 +41,3 @@ a {
#active {
background-color: #b26910;
}

8 changes: 4 additions & 4 deletions src/home/Homepage.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React from 'react';
import React from "react";

const Home = () => {
return <div class>Home</div>;
};
function Home() {
return <div className>Home</div>;
}

export default Home;
12 changes: 6 additions & 6 deletions src/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import React from 'react';
import ReactDOM from 'react-dom/client';
import App from './App';
import './app.css';
import React from "react";
import ReactDOM from "react-dom/client";
import App from "./App";
import "./app.css";

const root = ReactDOM.createRoot(document.getElementById('root'));
const root = ReactDOM.createRoot(document.getElementById("root"));
root.render(
<React.StrictMode>
<App />
</React.StrictMode>
</React.StrictMode>,
);
Loading