From 6fe8a678ea9e945f6b877bcdb6503db30a245427 Mon Sep 17 00:00:00 2001 From: Tiago Ribeiro Date: Mon, 12 Jun 2023 09:31:20 +0100 Subject: [PATCH] Completed more of the home page of the new designs --- src/components/Low/ProgressBar.tsx | 10 +++- src/pages/index.tsx | 93 ++++++++++++++++++++++++++---- tailwind.config.js | 10 +++- 3 files changed, 99 insertions(+), 14 deletions(-) diff --git a/src/components/Low/ProgressBar.tsx b/src/components/Low/ProgressBar.tsx index 4e6d1886..54e1db02 100644 --- a/src/components/Low/ProgressBar.tsx +++ b/src/components/Low/ProgressBar.tsx @@ -8,9 +8,15 @@ interface Props { } export default function ProgressBar({label, percentage, color, className}: Props) { + const progressColorClass: {[key in typeof color]: string} = { + blue: "bg-mti-blue-light", + orange: "bg-mti-orange-light", + green: "bg-mti-green-light", + }; + return ( -
-
+
+
{label}
); diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 3d205ded..dc3208d2 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -3,7 +3,7 @@ import Head from "next/head"; import SingleDatasetChart from "@/components/UserResultChart"; import Navbar from "@/components/Navbar"; import ProfileCard from "@/components/ProfileCard"; -import {BsFileEarmarkText, BsPencil, BsStar} from "react-icons/bs"; +import {BsFileEarmarkText, BsPencil, BsStar, BsBook, BsHeadphones, BsPen, BsMegaphone} from "react-icons/bs"; import {withIronSessionSsr} from "iron-session/next"; import {sessionOptions} from "@/lib/session"; import {User} from "@/interfaces/user"; @@ -84,18 +84,18 @@ export default function Home() { {user && ( -
+
-
+
{user.name}

{user.name}

- {capitalize(user.type)} + {capitalize(user.type)}
- +
-
+
{totalExams(stats)} - Exams + Exams
-
+
{stats.length} - Exercises + Exercises
-
+
{averageScore(stats)}% - Average Score + Average Score
+
+ Bio + + Patricia Smith is a dedicated and enthusiastic student. Her passion for knowledge drives her to constantly seek + new academic challenges. She is recognized for her exemplary work ethic, active participation in the classroom, + and commitment to helping her peers. Her insatiable curiosity has led her to explore a wide range of areas of + study, making her a versatile and adaptable learner. Patricia is a true academic leader, inspiring other students + to pursue their own educational goals. + +
+
+ Score History +
+
+
+
+ +
+
+ Reading + 86% +
+
+
+ +
+
+
+
+
+ +
+
+ Writing + 91% +
+
+
+ +
+
+
+
+
+ +
+
+ Listening + 56% +
+
+
+ +
+
+
+
+
+ +
+
+ Speaking + 26% +
+
+
+ +
+
+
+
diff --git a/tailwind.config.js b/tailwind.config.js index 3e1f0897..8c049159 100644 --- a/tailwind.config.js +++ b/tailwind.config.js @@ -8,7 +8,15 @@ module.exports = { orange: {DEFAULT: "#FF6000", dark: "#cc4402", light: "#ff790a", ultralight: "#ffdaa5"}, green: {DEFAULT: "#307912", dark: "#2a6014", light: "#3d9f11", ultralight: "#c6edaf"}, blue: {DEFAULT: "#0696ff", dark: "#007ff8", light: "#1eb3ff", ultralight: "#b5edff"}, - gray: {light: "#F9F9F9", dark: "#E0E0E0"}, + gray: { + seasalt: "#F9F9F9", + smoke: "#F5F5F5", + taupe: "#898492", + dim: "#696F79", + cool: "8692A6", + platinum: "#DBDBDB", + "anti-flash": "#EAEBEC", + }, }, ielts: { reading: {DEFAULT: "#1EB3FF", transparent: "rgba(255, 99, 132, 0.5)"},