Skip to content

Commit

Permalink
housekeeping
Browse files Browse the repository at this point in the history
  • Loading branch information
Vercin-G committed Oct 1, 2023
1 parent 11f2e8d commit 3d509d4
Show file tree
Hide file tree
Showing 11 changed files with 321 additions and 295 deletions.
14 changes: 10 additions & 4 deletions client/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import reportWebVitals from "./reportWebVitals";

import Layout from "./pages/Layout";
import CavApps from "./pages/Cavapps";
import ActiveDutyRoster from "./pages/Activedutyroster"
import ActiveDutyRoster from "./pages/Activedutyroster";
import Statisticspage from "./pages/Rosterstatistics";
import NoPage from "./pages/NoPage";

Expand All @@ -15,9 +15,15 @@ export default function App() {
<BrowserRouter>
<Routes>
<Route path="/" element={<Layout />}>
<Route index element={<CavApps title="7th Cavalry Apps"/>} />
<Route path="adr" element={<ActiveDutyRoster title="7th Cavalry ADR"/>} />
<Route path="rosterstatistics" element={<Statisticspage title="7th Cavalry Statistics"/>} />
<Route index element={<CavApps title="7th Cavalry Apps" />} />
<Route
path="adr"
element={<ActiveDutyRoster title="7th Cavalry ADR" />}
/>
<Route
path="rosterstatistics"
element={<Statisticspage title="7th Cavalry Statistics" />}
/>
<Route path="*" element={<NoPage />} />
</Route>
</Routes>
Expand Down
12 changes: 8 additions & 4 deletions client/src/pages/Activedutyroster.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,17 @@
border: 0.5em solid #f3f3f3;
border-top: 0.5em solid #ebc729;
border-radius: 50%;
width: 8em; /* Make this larger than the GIF */
height: 8em; /* Make this larger than the GIF */
width: 8em;
/* Make this larger than the GIF */
height: 8em;
/* Make this larger than the GIF */
animation: spin 2s linear infinite;
position: absolute;
top: 50%;
left: 50%;
z-index: 1;
margin: -4em 0 0 -4.5em; /* Half of width and height */
margin: -4em 0 0 -4.5em;
/* Half of width and height */
}

.p-loading-png {
Expand All @@ -70,6 +73,7 @@
0% {
transform: rotate(0deg);
}

100% {
transform: rotate(360deg);
}
Expand Down Expand Up @@ -235,4 +239,4 @@ a:hover {

/* No idea why i have to do this stupidity. For some reason if I dont do this, this shit becomes off centered */
transform-origin: 67% 67%;
}
}
18 changes: 9 additions & 9 deletions client/src/pages/Activedutyroster.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ function ActiveDutyRoster(props) {
</script>`;

// Change Page Title
document.title = props.title
document.title = props.title;

// Reusable API fetching function
async function fetchData(url, setFunction) {
Expand Down Expand Up @@ -90,13 +90,13 @@ function ActiveDutyRoster(props) {
<div className="p-nav-inner">
<div className="p-nav-scroller">
<div className="p-nav-logo">
<Link to='/'>
<Logo
alt="ADR Logo"
title="Return to CavApps"
width="17em"
height="3em"
/>
<Link to="/">
<Logo
alt="ADR Logo"
title="Return to CavApps"
width="17em"
height="3em"
/>
</Link>
</div>
{/* Data Age Warning */}
Expand Down Expand Up @@ -155,4 +155,4 @@ function ActiveDutyRoster(props) {
);
}

export default ActiveDutyRoster;
export default ActiveDutyRoster;
15 changes: 10 additions & 5 deletions client/src/pages/CavApps.css
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,15 @@
}



@keyframes logoboxanim {
50% {transform: translateY(20px);}
100% {transform: translateY(0px);}
50% {
transform: translateY(20px);
}

100% {
transform: translateY(0px);
}
}


Expand All @@ -32,13 +37,13 @@
color: black;
text-align: center;
display: inline-block;
font-family: "Roboto","Segoe UI","Times New Roman";
font-family: "Roboto", "Segoe UI", "Times New Roman";
font-weight: bold;
font-size: 12px;
cursor: pointer;
border-radius: 0.5em;
padding: 1em;
margin-right: 0.25em;
margin-left: 0.25em;

}
29 changes: 14 additions & 15 deletions client/src/pages/CavApps.js
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
import { Link } from "react-router-dom";
import Logo from '../style/themes/7cav/appsLogo'
import './CavApps.css';
import Logo from "../style/themes/7cav/appsLogo";
import "./CavApps.css";

function CavApps(props) {

// Change Page Title
document.title = props.title
document.title = props.title;

return (
<div className='masterbox'>
<div className='logobox'>
<Logo
width = '50em'
height = '15em'
/>
<div className="masterbox">
<div className="logobox">
<Logo width="50em" height="15em" />
</div>
<div className='buttonbox'>
<Link to='/adr'><button className="button">Active Duty Roster</button></Link>
<Link to='/rosterstatistics'><button className="button">Roster Statistics</button></Link>
<div className="buttonbox">
<Link to="/adr">
<button className="button">Active Duty Roster</button>
</Link>
<Link to="/rosterstatistics">
<button className="button">Roster Statistics</button>
</Link>
</div>
</div>
);
};
}

export default CavApps;

4 changes: 2 additions & 2 deletions client/src/pages/Layout.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ import { Outlet } from "react-router-dom";
const Layout = () => {
return (
<>
<Outlet/>
<Outlet />
</>
)
);
};

export default Layout;
27 changes: 17 additions & 10 deletions client/src/pages/NoPage.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,22 @@
import '../index.css';
import "../index.css";

const NoPage = () => {
return (
return (
<div>
<h1>404 Error</h1>
<h2>Oh no! you have encountered a page that does not exist!</h2>
<h3>If you believe this is in error, please submit a <a href='https://7cav.us/tickets/categories/2/create'>ticket</a> to S6. Otherwise, please enjoy this sick music!</h3>
<iframe width="420" height="315" src="https://www.youtube.com/embed/4vkR1G_DUVc"/>
</div>
)
<h1>404 Error</h1>
<h2>Oh no! you have encountered a page that does not exist!</h2>
<h3>
If you believe this is in error, please submit a{" "}
<a href="https://7cav.us/tickets/categories/2/create">ticket</a> to S6.
Otherwise, please enjoy this sick music!
</h3>
<iframe
width="420"
height="315"
src="https://www.youtube.com/embed/4vkR1G_DUVc"
/>
</div>
);
};

export default NoPage;

Loading

0 comments on commit 3d509d4

Please sign in to comment.