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

Commit

Permalink
feat: projectcards for student first look done
Browse files Browse the repository at this point in the history
  • Loading branch information
EmmaVandewalle committed Mar 8, 2024
1 parent e6a2987 commit b50717c
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 3 deletions.
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 !important;
}

.p-positive {
color: green !important;
}
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
29 changes: 29 additions & 0 deletions frontend/src/pages/student/ProjectCardStudent.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
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):
let has_submission: boolean = false;
let isSuccess: boolean = false;

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 && <p className={"card p-positive px-2 py-1"}>Success</p>}
{has_submission && !isSuccess && <p className={"card p-negative px-2 py-1"}>Failed</p>}
</div>
</div>
)
}



0 comments on commit b50717c

Please sign in to comment.