-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from hytech-racing/checkpoint
Checkpoint
- Loading branch information
Showing
9 changed files
with
260 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,39 @@ | ||
import "@mantine/core/styles.css"; | ||
import { MantineProvider } from "@mantine/core"; | ||
import { theme } from "@/theme"; | ||
import PreviewCard from "./components/PreviewCard"; | ||
import { data } from "@/data/sampledata"; | ||
import { useState } from "react"; | ||
import Navbar from "@/components/Navbar"; | ||
import SearchBar from "@/components/SearchBar"; | ||
import "@/css/App.css"; | ||
import DataTable from "@/components/DataTable"; | ||
import PreviewCard from "@/components/PreviewCard"; | ||
|
||
export default function App() { | ||
const [filteredData, setFilteredData] = useState<MCAPFileInformation[]>(data); | ||
|
||
return ( | ||
<MantineProvider theme={theme}> | ||
<PreviewCard /> | ||
<div className="app-container"> | ||
<header className="navbar"> | ||
<Navbar /> | ||
</header> | ||
|
||
<div className="main-content"> | ||
<div className="results-container"> | ||
<div className="table-contain-result"> | ||
<DataTable data={filteredData} /> | ||
</div> | ||
|
||
<SearchBar setFilteredData={setFilteredData} /> | ||
</div> | ||
<div className="preview-contain-result"> | ||
<PreviewCard /> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
{/* <PreviewCard /> */} | ||
</MantineProvider> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import "@mantine/core/styles.css"; | ||
import {} from "@mantine/core"; | ||
import "@/css/Navbar.css"; | ||
import { useState } from "react"; | ||
|
||
const mainLinksData = [ | ||
{ name: "Files", url: "https://hytechracing.gatech.edu/" }, | ||
{ name: "Documentation", url: "https://hytechracing.gatech.edu/" }, | ||
{ name: "Changelog", url: "https://hytechracing.gatech.edu/" }, | ||
]; | ||
|
||
export default function Navbar() { | ||
const hytechName = "HyTech Racing Checkpoint 1"; | ||
const [activeLink, setActiveLink] = useState(); | ||
const links = mainLinksData.map(({ name, url }) => ( | ||
<a | ||
key={name} | ||
className={`nav-link ${activeLink === name ? "active" : ""}`} | ||
// style={linkStyle(activeLink === link)} | ||
// data-active={activeLink === link || undefined} | ||
href={url} | ||
onClick={() => { | ||
setActiveLink(name); | ||
}} | ||
> | ||
{name} | ||
</a> | ||
)); | ||
|
||
return ( | ||
<nav> | ||
<img src="/favicon.ico" alt="Logo" className="navbar-icon" /> | ||
{links} | ||
{/* Optionally render active link or other content here */} | ||
<h3 className="hytechName">{hytechName}</h3> | ||
</nav> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import PreviewCard from "./PreviewCard"; | ||
|
||
const meta = { | ||
component: PreviewCard, | ||
} satisfies Meta<typeof PreviewCard>; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof meta>; | ||
|
||
export const Default: Story = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
.app-container { | ||
height: 100vh; | ||
display: flex; | ||
flex-direction: column; | ||
} | ||
|
||
.navbar { | ||
background-color: #f0f0f0; | ||
width: 100%; | ||
position: fixed; | ||
/*so table doesn't cover it - make sure it stays on top of other elements*/ | ||
z-index: 1000; | ||
} | ||
|
||
.search-bar { | ||
background-color: #e0e0e0; | ||
border-radius: 0; | ||
} | ||
|
||
.main-content { | ||
display: flex; | ||
flex: 1; | ||
height: 500px; | ||
padding-top: 50px; | ||
flex-direction: column; | ||
} | ||
|
||
.results-container { | ||
display: flex; | ||
flex-direction: row; | ||
} | ||
|
||
.footer { | ||
text-align: center; | ||
background: #9b8b5de5; | ||
color: white; | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap'); | ||
|
||
nav { | ||
padding: 15px 0; | ||
background: linear-gradient(90deg, #b8b5aa, #907d48); | ||
display: flex; | ||
height: 50px; | ||
align-items: center; | ||
} | ||
|
||
.nav-link { | ||
padding: 10px 20px; | ||
text-decoration: none; | ||
color: #495057; | ||
background-color: transparent; | ||
border-radius: 8px; | ||
font-weight: bold; | ||
cursor: pointer; | ||
transition: all 0.2s ease-in-out; | ||
display: inline-block; | ||
margin-right: 10px; | ||
font-family: 'Roboto', sans-serif; | ||
} | ||
|
||
.nav-link.active { | ||
background-color: #FFBF00; | ||
font-weight: bold; | ||
} | ||
|
||
.nav-link:hover { | ||
color: white; | ||
background-color: #FFD700; | ||
font-style: oblique; | ||
} | ||
|
||
.navbar-icon { | ||
height: 30px; | ||
margin-right: 20px; | ||
margin-left: 20px; | ||
} | ||
|
||
.hytechName { | ||
margin-left: auto; | ||
margin-right: 10px; | ||
border-radius: 5px; | ||
color: white; | ||
font-weight: 900; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.