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

Enhancement: New home page and Fix Ui #36

Merged
merged 6 commits into from
Oct 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion apps/frontend/.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@ node_modules
.gitignore
.next
out
public
README.md
2 changes: 1 addition & 1 deletion apps/frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs

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

# Set the correct permission for prerender cache
RUN mkdir .next
Expand Down
Binary file added apps/frontend/public/assets/coding.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 18 additions & 8 deletions apps/frontend/src/app/login/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,14 @@ import Link from "next/link";
import { loginUser } from "@/app/services/user";
import { setToken } from "@/app/services/login-store";
import { useRouter } from "next/navigation";
import NoAuthHeader from "@/components/NoAuthHeader/NoAuthHeader";

type InputFields = {
email: string;
password: string;
};

export default function Home() {
export default function LoginPage() {
const [isLoginFailed, setIsLoginFailed] = useState(false);
const router = useRouter();
const [messageApi, contextHolder] = message.useMessage();
Expand Down Expand Up @@ -42,9 +43,9 @@ export default function Home() {
return (
<>
{contextHolder}
<Layout>
<Header selectedKey={undefined} />
<Content>
<Layout className="layout">
<NoAuthHeader />
<Content className="content">
<div className="login-card">
<h1>Login</h1>
<Form name="basic" onFinish={submitDetails}>
Expand Down Expand Up @@ -80,14 +81,23 @@ export default function Home() {
</div>

<Form.Item>
<Button type="primary" htmlType="submit">
<Button
type="primary"
htmlType="submit"
className="login-button"
>
Login
</Button>
</Form.Item>
</Form>
<p>
Let me <Link href="/register">register</Link>
</p>
<div>
<p className="registration-text">
Not registered yet?{" "}
<Link href="/register" className="create-account-link">
Create an account
</Link>
</p>
</div>
</div>
</Content>
</Layout>
Expand Down
69 changes: 15 additions & 54 deletions apps/frontend/src/app/login/styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,23 +6,14 @@
background: white;
}

.content-card {
margin: 4rem 8rem;
padding: 2rem 4rem;
background-color: white;
min-height: 100vh;
border-radius: 30px;
box-shadow: 0px 10px 60px rgba(226, 236, 249, 0.5);
}

.login-card {
/* Rectangle 6698 */
margin: 4rem auto;
padding: 2rem 4rem;
margin: 8rem auto;
padding: 2rem 3rem;
box-sizing: border-box;
max-width: 30rem;
background: #FFFFFF;
border: 2px solid #8A817C;
max-width: 26rem;
background: #ffffff;
border: 2px solid #8a817c;
box-shadow: 3px 4px 4px rgba(0, 0, 0, 0.25);
border-radius: 15px;
}
Expand All @@ -32,50 +23,20 @@
font-size: 13px;
}

.content-row-1 {
display: flex;
flex-direction: row;
justify-content: space-between;
}

.content-title {
// font-family: "Poppins";
// font-style: normal;
font-weight: 600;
font-size: 22px;
line-height: 33px;
letter-spacing: -0.01em;
color: #000000;
}

.content-filter {
margin: 1.5rem 0;
}

.edit-button {
margin-right: 0.5rem;
.login-button {
width: 100%;
}

.filter-button {
margin-left: 8px;
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.02) !important;
.registration-text {
color: #bcb8b1;
margin: auto;
text-align: center;
}

.clear-button {
width: 100%;
.create-account-link {
color: #8a817c;
}

.categories-multi-select,
.difficulty-select,
.order-select {
width: 100%;
}

.create-title,
.new-problem-categories-multi-select,
.new-problem-difficulty-select,
.create-description,
.create-problem-id {
width: 100%;
margin: 5px;
.create-account-link:hover {
color: #463f3a;
}
7 changes: 7 additions & 0 deletions apps/frontend/src/app/matching/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
"use client";

const MatchingPage = () => {
return <div>Hello World! Replace with Matching Page</div>;
};

export default MatchingPage;
Loading