Skip to content

Commit ea0d3ed

Browse files
authored
Merge pull request #36 from CS3219-AY2425S1/ben/improve-frontend-ui
Enhancement: New home page and Fix Ui
2 parents 408dbb8 + b752332 commit ea0d3ed

File tree

16 files changed

+1106
-931
lines changed

16 files changed

+1106
-931
lines changed

apps/frontend/.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,4 @@ node_modules
44
.gitignore
55
.next
66
out
7-
public
87
README.md

apps/frontend/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ RUN addgroup --system --gid 1001 nodejs
4141
RUN adduser --system --uid 1001 nextjs
4242

4343
# Include this when we want to include images in the future
44-
# COPY --from=builder /app/public ./public
44+
COPY --from=builder /app/public ./public
4545

4646
# Set the correct permission for prerender cache
4747
RUN mkdir .next
607 KB
Loading

apps/frontend/src/app/login/page.tsx

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@ import Link from "next/link";
88
import { loginUser } from "@/app/services/user";
99
import { setToken } from "@/app/services/login-store";
1010
import { useRouter } from "next/navigation";
11+
import NoAuthHeader from "@/components/NoAuthHeader/NoAuthHeader";
1112

1213
type InputFields = {
1314
email: string;
1415
password: string;
1516
};
1617

17-
export default function Home() {
18+
export default function LoginPage() {
1819
const [isLoginFailed, setIsLoginFailed] = useState(false);
1920
const router = useRouter();
2021
const [messageApi, contextHolder] = message.useMessage();
@@ -42,9 +43,9 @@ export default function Home() {
4243
return (
4344
<>
4445
{contextHolder}
45-
<Layout>
46-
<Header selectedKey={undefined} />
47-
<Content>
46+
<Layout className="layout">
47+
<NoAuthHeader />
48+
<Content className="content">
4849
<div className="login-card">
4950
<h1>Login</h1>
5051
<Form name="basic" onFinish={submitDetails}>
@@ -80,14 +81,23 @@ export default function Home() {
8081
</div>
8182

8283
<Form.Item>
83-
<Button type="primary" htmlType="submit">
84+
<Button
85+
type="primary"
86+
htmlType="submit"
87+
className="login-button"
88+
>
8489
Login
8590
</Button>
8691
</Form.Item>
8792
</Form>
88-
<p>
89-
Let me <Link href="/register">register</Link>
90-
</p>
93+
<div>
94+
<p className="registration-text">
95+
Not registered yet?{" "}
96+
<Link href="/register" className="create-account-link">
97+
Create an account
98+
</Link>
99+
</p>
100+
</div>
91101
</div>
92102
</Content>
93103
</Layout>

apps/frontend/src/app/login/styles.scss

Lines changed: 15 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -6,23 +6,14 @@
66
background: white;
77
}
88

9-
.content-card {
10-
margin: 4rem 8rem;
11-
padding: 2rem 4rem;
12-
background-color: white;
13-
min-height: 100vh;
14-
border-radius: 30px;
15-
box-shadow: 0px 10px 60px rgba(226, 236, 249, 0.5);
16-
}
17-
189
.login-card {
1910
/* Rectangle 6698 */
20-
margin: 4rem auto;
21-
padding: 2rem 4rem;
11+
margin: 8rem auto;
12+
padding: 2rem 3rem;
2213
box-sizing: border-box;
23-
max-width: 30rem;
24-
background: #FFFFFF;
25-
border: 2px solid #8A817C;
14+
max-width: 26rem;
15+
background: #ffffff;
16+
border: 2px solid #8a817c;
2617
box-shadow: 3px 4px 4px rgba(0, 0, 0, 0.25);
2718
border-radius: 15px;
2819
}
@@ -32,50 +23,20 @@
3223
font-size: 13px;
3324
}
3425

35-
.content-row-1 {
36-
display: flex;
37-
flex-direction: row;
38-
justify-content: space-between;
39-
}
40-
41-
.content-title {
42-
// font-family: "Poppins";
43-
// font-style: normal;
44-
font-weight: 600;
45-
font-size: 22px;
46-
line-height: 33px;
47-
letter-spacing: -0.01em;
48-
color: #000000;
49-
}
50-
51-
.content-filter {
52-
margin: 1.5rem 0;
53-
}
54-
55-
.edit-button {
56-
margin-right: 0.5rem;
26+
.login-button {
27+
width: 100%;
5728
}
5829

59-
.filter-button {
60-
margin-left: 8px;
61-
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02) !important;
30+
.registration-text {
31+
color: #bcb8b1;
32+
margin: auto;
33+
text-align: center;
6234
}
6335

64-
.clear-button {
65-
width: 100%;
36+
.create-account-link {
37+
color: #8a817c;
6638
}
6739

68-
.categories-multi-select,
69-
.difficulty-select,
70-
.order-select {
71-
width: 100%;
72-
}
73-
74-
.create-title,
75-
.new-problem-categories-multi-select,
76-
.new-problem-difficulty-select,
77-
.create-description,
78-
.create-problem-id {
79-
width: 100%;
80-
margin: 5px;
40+
.create-account-link:hover {
41+
color: #463f3a;
8142
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
"use client";
2+
3+
const MatchingPage = () => {
4+
return <div>Hello World! Replace with Matching Page</div>;
5+
};
6+
7+
export default MatchingPage;

0 commit comments

Comments
 (0)