diff --git a/src/components/about_page/header.tsx b/src/components/about_page/header.tsx new file mode 100644 index 0000000..ae29b1d --- /dev/null +++ b/src/components/about_page/header.tsx @@ -0,0 +1,11 @@ +function Header() { + return ( +
+
+

About Us

+
+
+ ) +} + +export default Header; \ No newline at end of file diff --git a/src/components/about_page/test_component.tsx b/src/components/about_page/test_component.tsx deleted file mode 100644 index 7f93408..0000000 --- a/src/components/about_page/test_component.tsx +++ /dev/null @@ -1,7 +0,0 @@ -function Test() { - return ( -

About Page

- ) -} - -export default Test; \ No newline at end of file diff --git a/src/components/home_page/content.tsx b/src/components/home_page/content.tsx index e0e5a19..255a5e5 100644 --- a/src/components/home_page/content.tsx +++ b/src/components/home_page/content.tsx @@ -9,11 +9,11 @@ function Content() { const image: string = Projects_Content[i][0][0]; const title: string = Projects_Content[i][0][1]; - const descritpion: string = Projects_Content[i][0][1]; + const description: string = Projects_Content[i][0][1]; content_list.push(
- + {title}
@@ -22,7 +22,7 @@ function Content() { {title} -

{descritpion}

+

{description}

); diff --git a/src/components/home_page/header.tsx b/src/components/home_page/header.tsx index 8db4726..3641ad5 100644 --- a/src/components/home_page/header.tsx +++ b/src/components/home_page/header.tsx @@ -1,8 +1,9 @@ function Header() { return (
-
-

Computer Science Club

+
+

Computer Science Club

+
); } diff --git a/src/components/nav_bar.tsx b/src/components/nav_bar.tsx index 34c5d88..9c17bff 100644 --- a/src/components/nav_bar.tsx +++ b/src/components/nav_bar.tsx @@ -1,18 +1,23 @@ import {Link} from "react-router-dom"; -function Navigation_Bar() { +interface Navigation_Bar_Props { + nav_bar_title: string; + onNavLinkClick: (new_title: string) => void; +} + +function Navigation_Bar({nav_bar_title, onNavLinkClick}: Navigation_Bar_Props) { return (
diff --git a/src/components/project_page/content.tsx b/src/components/project_page/content.tsx index 4c789a3..9b2af03 100644 --- a/src/components/project_page/content.tsx +++ b/src/components/project_page/content.tsx @@ -2,8 +2,7 @@ import Projects_Content from "../../content/projects_content"; function Content() { let url: string = window.location.pathname; - console.log(url); - + let content: string[] = []; for (let i = 0; i < Projects_Content.length; i++) { if ("/" + Projects_Content[i][1][1].replace(/\s/g, "-") == url) { diff --git a/src/content/about_content.tsx b/src/content/about_content.tsx new file mode 100644 index 0000000..e69de29 diff --git a/src/content/assets/club-group-picture.jpg b/src/content/assets/club-group-picture.jpg new file mode 100644 index 0000000..b9a46e2 Binary files /dev/null and b/src/content/assets/club-group-picture.jpg differ diff --git a/src/index.scss b/src/index.scss index 318da18..29e9c80 100644 --- a/src/index.scss +++ b/src/index.scss @@ -11,6 +11,10 @@ $max-width: 1230px; margin: 0; } +html { + overflow-y: scroll; +} + .nav-container { background-color: $clu-purple; display: flex; @@ -76,23 +80,22 @@ $max-width: 1230px; background-position: center center; height: 400px; width: 100vw; - display: flex; - align-items: center; - justify-content: center; .image-overlay { background-color: rgba(0,0,0,.5); width: 100%; height: 100%; - } - - h1 { - color: white; - font-family: "Raleway",Helvetica,Arial,sans-serif; - font-size: 3.5rem; - font-weight: 700; - line-height: normal; - position: absolute; + display: flex; + justify-content: center; + align-items: center; + + h1 { + color: white; + font-family: "Raleway",Helvetica,Arial,sans-serif; + font-size: 3.5rem; + font-weight: 700; + line-height: normal; + } } } @@ -167,7 +170,7 @@ $max-width: 1230px; width: 100%; display: flex; justify-content: center; - padding: $base-padding / 2; + padding: calc($base-padding / 2); iframe{ border: none; @@ -180,7 +183,7 @@ $max-width: 1230px; width: 100%; display: flex; justify-content: center; - padding: $base-padding / 2; + padding: calc($base-padding / 2); img { width: 66%; @@ -196,9 +199,33 @@ $max-width: 1230px; color: white; font-family: "Courier"; font-size: 1.3em; - padding: $base-padding / 2; + padding: calc($base-padding / 2); width: 80%; } } } +} + +.about-page { + .about-header { + background-image:url(https://www.mtu.edu/business/undergraduate/organizations/student-organizations/finance-club/images/finance-club-banner1200.jpg); + height: 400px; + + .image-overlay { + background-color: rgba(0,0,0,.5); + width: 100%; + height: 100%; + display: flex; + justify-content: center; + align-items: center; + + h1 { + color: white; + font-family: "Raleway",Helvetica,Arial,sans-serif; + font-size: 3.5rem; + font-weight: 700; + line-height: normal; + } + } + } } \ No newline at end of file diff --git a/src/index.tsx b/src/index.tsx index d41f7ca..83ad5ea 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -1,3 +1,4 @@ +import {SetStateAction, useState} from "react"; import {BrowserRouter as Router, Route, Routes} from "react-router-dom"; import Home from "./pages/home"; import Project from "./pages/project" @@ -7,20 +8,26 @@ import Navigation_Bar from "./components/nav_bar"; import Projects_Content from "./content/projects_content"; function App() { - // let project_path: string = ""; + const [nav_bar_title, setNavBarTitle] = useState("Club Projects and Activities"); + + const update_title = (new_title: string) => { + setNavBarTitle(new_title); + }; + + let project_path: string = ""; let project_routes: any[] = []; for (let i = 0; i < Projects_Content.length; i++) { // project_path = "/:" + Projects_Content[i][1][1].replace(/\s/g, "-"); // Replace spaces with dashes for url project_routes.push ( // Project_Content[i][1][1] gets first element after descriptor from project page (should probably be a title) - }> + } key={i}> ) } return (
- + }> {project_routes} diff --git a/src/pages/about.tsx b/src/pages/about.tsx index f14fbad..c0fe0d2 100644 --- a/src/pages/about.tsx +++ b/src/pages/about.tsx @@ -1,9 +1,9 @@ -import Test from '../components/about_page/test_component' +import Header from '../components/about_page/header' function About() { return (
- +
); }