Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.

Project cards #65

Merged
merged 5 commits into from
Mar 11, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
19 changes: 19 additions & 0 deletions frontend/src/assets/styles/students_components.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.student-main {
width: 60vw;
flex-wrap: wrap;
overflow-y: scroll;
}

.project-card {
background-color: #9c9afd !important;
width: 25vw;
height: 25vh;
}

.p-negative {
color: red;
}

.p-positive {
color: green;
}
2 changes: 1 addition & 1 deletion frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ export function Header(): JSX.Element {
return (
<nav className={"main-nav is-flex is-flex-direction-row is-justify-content-space-between is-align-items-center"}>
<img src={"/delphi_favicon_circle.png"} alt={"image"}/>
<p className={"is-align-self-center"}><p>Project</p></p>
<p className={"is-align-self-center"}><p>Home</p></p>
<button className={"button mx-2 is-transparent"}>
<div className={"icon-text"}>
<p>Username</p>
Expand Down
16 changes: 14 additions & 2 deletions frontend/src/pages/student/HomeStudent.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import {JSX} from "react";
import {Header} from "../../components/Header.tsx";
import {Sidebar} from "../../components/Sidebar.tsx";
import ProjectCardStudent from "./ProjectCardStudent.tsx";
import '../../assets/styles/students_components.css'

export default function HomeStudent(): JSX.Element {
return (
Expand All @@ -12,8 +14,18 @@ export default function HomeStudent(): JSX.Element {
<div className={"side-bar is-flex is-justify-content-center"}>
<Sidebar/>
</div>
<div>
<>Homescreen for a student</>
<div className={"student-main px-5 py-5 mx-5 my-5 is-flex is-justify-content-space-evenly"}>
<ProjectCardStudent/>
<ProjectCardStudent/>
<ProjectCardStudent/>
<ProjectCardStudent/>
<ProjectCardStudent/>
<ProjectCardStudent/>
<ProjectCardStudent/>
<ProjectCardStudent/>
<ProjectCardStudent/>
<ProjectCardStudent/>
<ProjectCardStudent/>
</div>
</div>
</>
Expand Down
31 changes: 31 additions & 0 deletions frontend/src/pages/student/ProjectCardStudent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import {JSX} from "react";


export default function ProjectCardStudent(): JSX.Element {
// as for now I'm not sure how the info will come in, so using
// static values for now (change to true and true/false to see how they'll look like):
const has_submission: boolean = false;
const isSuccess: boolean = true;

return (
<div
className={"card project-card px-5 py-5 my-5 is-flex is-flex-direction-column is-justify-content-space-between"}>
<p className={"title is-5"}>Markov Decision Diagram</p>
<div className={"is-flex is-flex-direction-row"}>
<p className={"pr-2"}>vak: </p>
<p>Computationele Biologie</p>
</div>
<div className={"is-flex is-flex-direction-row is-align-items-center py-5"}>
<p className={"pr-2"}>status: </p>
{!has_submission && <p className={"px-2 py-1"}>—</p>}
{has_submission && isSuccess &&
<div className={"card"}><p className={"p-positive px-2 py-1"}>Success</p></div>}
{has_submission && !isSuccess &&
<div className={"card"}><p className={"p-negative px-2 py-1"}>Failed</p></div>}
</div>
</div>
)
}