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

Commit

Permalink
Merge pull request #51 from SELab-2/sidebar-header
Browse files Browse the repository at this point in the history
Sidebar + header + logo's
  • Loading branch information
ALBERICLOOS authored Mar 7, 2024
2 parents 314d6b2 + 4122074 commit 2783ace
Show file tree
Hide file tree
Showing 17 changed files with 116 additions and 116 deletions.
3 changes: 1 addition & 2 deletions frontend/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Vite + React + TS</title>
<title>Delphi</title>
</head>
<body>
<div id="root"></div>
Expand Down
15 changes: 15 additions & 0 deletions frontend/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
"preview": "vite preview"
},
"dependencies": {
"bulma": "^0.9.4",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-icons": "^5.0.1",
"react-router-dom": "^6.22.2"
},
"devDependencies": {
Expand Down
Binary file added frontend/public/delphi_favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/delphi_favicon_circle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/delphi_favicon_nobg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/delphi_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/delphi_full_circle.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added frontend/public/delphi_full_nobg.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 0 additions & 1 deletion frontend/public/vite.svg

This file was deleted.

42 changes: 0 additions & 42 deletions frontend/src/App.css

This file was deleted.

41 changes: 41 additions & 0 deletions frontend/src/assets/styles/mainpage.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
.main-header {
width: 100vw;
height: 8vh;
background-color: #9c9afd;
}

.main-nav {
height: 100%;

img {
background-color: #5f63c8;
height: 100%;
}
}

.main-content {
width: 100vw;
height: 92vh;
}

.side-bar {
width: 4.15vw;
background-color: #6a74ce;

li {
height: 10vh;
display: flex;
justify-content: center;
align-items: center;
padding: 5%;
}
}

.icon {
height: 50%;
}

img {
max-width: 100%;
height: auto;
}
17 changes: 17 additions & 0 deletions frontend/src/components/Header.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import {JSX} from "react";
import {RiAccountPinBoxLine} from "react-icons/ri";

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>
<button className={"button mx-2 is-transparent"}>
<div className={"icon-text"}>
<p>Username</p>
<RiAccountPinBoxLine className={"icon"}/>
</div>
</button>
</nav>
)
}
16 changes: 16 additions & 0 deletions frontend/src/components/Sidebar.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import {JSX} from "react";
import { IoHomeSharp } from "react-icons/io5";
import { PiProjectorScreen, PiFolder } from "react-icons/pi";

export function Sidebar(): JSX.Element {
return (
<aside className={"menu"}>
<ul className={"menu-list"}>
<li><a className={"is-transparent"}><IoHomeSharp size={30}/></a></li>
<li><a className={"is-transparent"}><PiProjectorScreen size={30}/></a></li>
<li><a className={"is-transparent"}><PiFolder size={30}/></a></li>
</ul>
</aside>
)
}

71 changes: 4 additions & 67 deletions frontend/src/index.css
Original file line number Diff line number Diff line change
@@ -1,68 +1,5 @@
:root {
font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;

color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;

font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}

a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}

body {
* {
padding: 0;
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
}

h1 {
font-size: 3.2em;
line-height: 1.1;
}

button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}

@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}
box-sizing: border-box;
}
8 changes: 5 additions & 3 deletions frontend/src/main.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import LoginScreen from "./pages/login/LoginScreen.tsx";
import HomeAdmin from "./pages/admin/HomeAdmin.tsx";
import HomeStudent from "./pages/student/HomeStudent.tsx";
import HomeTeacher from "./pages/teacher/HomeTeacher.tsx";
import 'bulma/css/bulma.min.css';
import './assets/styles/mainpage.css'

const router = createBrowserRouter([
{
Expand All @@ -33,7 +35,7 @@ const router = createBrowserRouter([
}
]);
ReactDOM.createRoot(document.getElementById('root')!).render(
<React.StrictMode>
<RouterProvider router={router}/>
</React.StrictMode>,
<React.StrictMode>
<RouterProvider router={router}/>
</React.StrictMode>,
)
16 changes: 15 additions & 1 deletion frontend/src/pages/student/HomeStudent.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
import {JSX} from "react";
import {Header} from "../../components/Header.tsx";
import {Sidebar} from "../../components/Sidebar.tsx";

export default function HomeStudent(): JSX.Element {
return (
<>Homescreen for a student</>
<>
<div className={"main-header"}>
<Header/>
</div>
<div className={"main-content is-flex is-flex-direction-row"}>
<div className={"side-bar"}>
<Sidebar/>
</div>
<div>
<>Homescreen for a student</>
</div>
</div>
</>
)
}

0 comments on commit 2783ace

Please sign in to comment.