Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homepage student + landing page #194

Merged
merged 39 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 29 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
5b684e7
start homepage
warreprovoost Mar 29, 2024
326a82a
added calender functions and titlecard
warreprovoost Apr 2, 2024
2a4df69
merge with development
warreprovoost Apr 4, 2024
4bcad68
Merge branch 'development' into frontend/feature/homepage
warreprovoost Apr 4, 2024
7455a33
homepage changes
warreprovoost Apr 7, 2024
1ff6295
homepage changes
warreprovoost Apr 7, 2024
252ed38
Added: Homepage and Student Homepage
warreprovoost Apr 7, 2024
34ed7cb
Merge remote-tracking branch 'origin/frontend/feature/homepage' into …
warreprovoost Apr 8, 2024
a9b96ae
Merge branch 'development' into frontend/feature/homepage
warreprovoost Apr 8, 2024
5a973dc
Merge branch 'development' into frontend/feature/homepage
warreprovoost Apr 10, 2024
01b878f
homepage changes
warreprovoost Apr 12, 2024
e2a548a
Merge branch 'development' into frontend/feature/homepage
warreprovoost Apr 12, 2024
bacf393
project projects parser
Gerwoud Apr 12, 2024
cc58511
test passed
Gerwoud Apr 12, 2024
32991c7
linter
Gerwoud Apr 12, 2024
0dcb46e
pr review
Gerwoud Apr 12, 2024
e5451b6
Project card refactor
warreprovoost Apr 13, 2024
645443a
Merge remote-tracking branch 'origin/backend/projectendpoint-fix' int…
warreprovoost Apr 13, 2024
b634374
homepage change fix
warreprovoost Apr 13, 2024
bc59766
Revert "Merge remote-tracking branch 'origin/backend/projectendpoint-…
warreprovoost Apr 13, 2024
77ed924
Merge remote-tracking branch 'origin/development' into frontend/featu…
warreprovoost Apr 13, 2024
b76dec9
homepage changes
warreprovoost Apr 13, 2024
7b0e99c
rm comment
warreprovoost Apr 13, 2024
96b4f65
pr changes
warreprovoost Apr 13, 2024
48956fa
pr changes
warreprovoost Apr 14, 2024
4e2d4f6
added support for no deadline projects
warreprovoost Apr 14, 2024
2c2654f
link changed
warreprovoost Apr 14, 2024
18bce9d
link changed
warreprovoost Apr 14, 2024
0df208b
Merge branch 'development' into frontend/feature/homepage
warreprovoost Apr 15, 2024
6fdf715
pr changes
warreprovoost Apr 16, 2024
4f07f24
homepage change
warreprovoost Apr 17, 2024
b4f46f3
homepage change
warreprovoost Apr 17, 2024
77f56f4
API URL to API_HOST
warreprovoost Apr 18, 2024
b249b52
Merge branch 'development' into frontend/feature/homepage
warreprovoost Apr 18, 2024
cf23151
end point with /me
warreprovoost Apr 18, 2024
03d3fbe
home
warreprovoost Apr 18, 2024
94ef7cb
deadline fix
warreprovoost Apr 18, 2024
3a686a5
deadline fix
warreprovoost Apr 18, 2024
36fa3d3
deadline fix
warreprovoost Apr 18, 2024
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
41 changes: 41 additions & 0 deletions frontend/package-lock.json

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

1 change: 1 addition & 0 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"@emotion/react": "^11.11.3",
"@emotion/styled": "^11.11.0",
"@mui/icons-material": "^5.15.10",
"@mui/lab": "^5.0.0-alpha.169",
"@mui/material": "^5.15.10",
"@mui/styled-engine-sc": "^6.0.0-alpha.16",
"@mui/x-data-grid": "^7.1.1",
Expand Down
24 changes: 20 additions & 4 deletions frontend/public/locales/en/translation.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"home": {
"title": "Homepage"
},
"header": {
"myProjects": "My Projects",
"myCourses": "My Courses",
Expand All @@ -10,6 +7,11 @@
"tag": "en",
"homepage": "Homepage"
},
"home": {
"homepage": "Homepage",
"welcomeDescription": "Welcome to Peristerónas, the online submission platform of UGent",
"login": "Login"
},
"courseForm": {
"courseName": "Course Name",
"submit": "Submit",
Expand Down Expand Up @@ -37,5 +39,19 @@
"hoursAgo": "hours ago",
"minutesAgo": "minutes ago",
"justNow": "just now"
},
"student" : {
"myProjects": "My Projects",
"myCourses": "My Courses",
"deadlines": "Past deadlines",
"last_submission" : "Last submission",
"course": "Course",
"SUCCESS": "Success",
"FAIL": "Fail",
"deadlinesOnDay": "Deadlines on: ",
"noDeadline": "No deadlines",
"no_submission_yet" : "No submission yet",
"loading": "Loading...",
"no_projects": "There are no projects here."
}
}
}
23 changes: 20 additions & 3 deletions frontend/public/locales/nl/translation.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
{
"home": {
"title": "Homepagina"
},
"header": {
"myProjects": "Mijn Projecten",
"myCourses": "Mijn Vakken",
Expand All @@ -10,11 +7,31 @@
"tag": "nl",
"homepage": "Homepage"
},
"home": {
"homepage": "Homepagina",
"welcomeDescription": "Welkom bij Peristerónas, het online indieningsplatform van UGent",
"login": "Aanmelden"
},
"courseForm": {
"courseName": "Vak Naam",
"submit": "Opslaan",
"emptyCourseNameError": "Vak naam mag niet leeg zijn"
},
"student": {
"myProjects": "Mijn Projecten",
"myCourses": "Mijn Vakken",
"deadlines": "Verlopen Deadlines",
"course": "Vak",
"last_submission": "Laatste indiening",
"SUCCESS": "Geslaagd",
"FAIL": "Gefaald",
"deadlinesOnDay": "Deadlines op: ",
"noDeadline": "Geen deadlines",
"no_submission_yet" : "Nog geen indiening",
"loading": "Laden...",
"no_projects": "Er zijn hier geen projecten."

},
"projectView": {
"submitNetworkError": "Er is iets mislopen bij het opslaan van uw indiening. Probeer het later opnieuw.",
"selected": "Geselecteerd",
Expand Down
Binary file added frontend/public/logo_app.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion frontend/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { Route,RouterProvider, createBrowserRouter, createRoutesFromElements } from "react-router-dom";
import Layout from "./components/Header/Layout";
import Home from "./pages/home/Home";
import HomeStudent from "./pages/home/HomeStudent.tsx";
import LanguagePath from "./components/LanguagePath";
import ProjectView from "./pages/project/projectView/ProjectView";

Expand All @@ -13,13 +14,14 @@ const router = createBrowserRouter(
<Route path="project" >
<Route path=":projectId" element={<ProjectView />}/>
</Route>
<Route path="student" element={<HomeStudent />} />
</Route>
</Route>
)
);

/**
* This component is the main application component that will be rendered by the ReactDOM.
* This component is the main application component that will be rendered by the ReactDOM.
* @returns - The main application component
*/
export default function App(): React.JSX.Element {
Expand Down
50 changes: 42 additions & 8 deletions frontend/src/pages/home/Home.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,50 @@
import { useTranslation } from "react-i18next";
import { Title } from "../../components/Header/Title";
import { Button, Container, Typography, Box } from "@mui/material";
import {Link } from "react-router-dom";

/**
* This component is the home page component that will be rendered when on the index route.
* @returns - The home page component
*/
export default function Home() {
const { t } = useTranslation("translation", { keyPrefix: "home" });
const { t } = useTranslation('translation', { keyPrefix: 'home' });
const login_redirect:string =import.meta.env.VITE_LOGIN_LINK
return (
<>
<Title title={t('title')} />
<div>
</div>
</>
);
<Container maxWidth="sm">
<Box
sx={{
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
height: '100vh',
textAlign: 'center',
gap: 3,
}}
>
<Box component="img"src="/logo_ugent.png" alt="University Logo"
sx={{ width: 100, height: 100 }} />

<Typography variant="h2" component="h1" gutterBottom >
<Box
warreprovoost marked this conversation as resolved.
Show resolved Hide resolved
component="img"
src="/logo_app.png"
alt="University Logo"
sx={{
position: 'relative',
top: '14px',
width: 90,
height: 90,
}}
/>
Peristerónas
</Typography>
<Typography variant="h6" component="p" >
{t('welcomeDescription', 'Welcome to Peristeronas.')}
</Typography>
<Button variant="contained" color="primary" size="large" component={Link} to={login_redirect}>
{t('login', 'Login')}
</Button>
</Box>
</Container> );
}
Loading