Skip to content

Commit

Permalink
Added Sign-Up and Login Pages (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
AkshitGarg24 authored May 29, 2024
1 parent 4455f7e commit 10844f2
Show file tree
Hide file tree
Showing 5 changed files with 137 additions and 16 deletions.
41 changes: 26 additions & 15 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,35 @@ const config = {
navbar: {
title: "30 Days of CPP",
logo: {
alt: "30 Days of CPP Programming Logo",
src: "img/logo.svg",
alt: "30 Days of CPP Programming Logo",
src: "img/logo.svg",
},
items: [
{
type: "docSidebar",
sidebarId: "tutorialSidebar",
position: "left",
label: "Tutorial",
},
{ to: "/blog", label: "Blog", position: "left" },
{
href: "https://github.com/subhadipbhowmik/30-Days-Of-CPP/",
label: "GitHub",
position: "right",
},
{
type: "docSidebar",
sidebarId: "tutorialSidebar",
position: "left",
label: "Tutorial",
},
{ to: "/blog", label: "Blog", position: "left" },
{
href: "https://github.com/subhadipbhowmik/30-Days-Of-CPP/",
label: "GitHub",
position: "right",
},
{
to: "/signup",
label: "Sign Up",
position: "right",
},
{
to: "/login",
label: "Login",
position: "right",
},
],
},
},

footer: {
style: "dark",
links: [
Expand Down
4 changes: 4 additions & 0 deletions siteConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,16 @@ new Crawler({
startUrls: [
"https://subhadipbhowmik.github.io/30-Days-Of-CPP/",
"https://subhadipbhowmik.github.io/30-Days-Of-CPP/docs/",
"https://subhadipbhowmik.github.io/30-Days-Of-CPP/signup",
"https://subhadipbhowmik.github.io/30-Days-Of-CPP/login",
],
renderJavaScript: false,
sitemaps: ["https://subhadipbhowmik.github.io/30-Days-Of-CPP/sitemap.xml"],
ignoreCanonicalTo: false,
discoveryPatterns: [
"https://subhadipbhowmik.github.io/30-Days-Of-CPP/docs/**",
"https://subhadipbhowmik.github.io/30-Days-Of-CPP/signup",
"https://subhadipbhowmik.github.io/30-Days-Of-CPP/login",
],
schedule: "at 19:12 on Tuesday",
actions: [
Expand Down
71 changes: 70 additions & 1 deletion src/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,73 @@
.footer .col {
--ifm-col-width: 33%;
}
}
}


body {
background-color: #f9f9f9;
}

.form-container {
max-width: 400px;
margin: 50px auto;
padding: 20px;
background: #f7f7f7;
border-radius: 10px;
box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

.form-container h1 {
text-align: center;
margin-bottom: 20px;
color: #333;
}

.form-container form {
margin-top: 20px;
}

.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"],
.form-container button {
width: 100%;
padding: 12px;
margin-bottom: 15px;
border: none;
border-radius: 5px;
box-sizing: border-box;
font-size: 16px;
}

.form-container input[type="text"],
.form-container input[type="email"],
.form-container input[type="password"] {
background: #f0f0f0;
}

.form-container button {
background: linear-gradient(45deg, #4CAF50, #2E8B57);
color: #f9f9f9;
cursor: pointer;
transition: all 0.3s ease;
}

.form-container button:hover {
background: linear-gradient(45deg, #2E8B57, #4CAF50);
}

.form-container p {
margin-top: 20px;
text-align: center;
}

.form-container a {
color: #007bff;
text-decoration: none;
}

.form-container a:hover {
text-decoration: underline;
}

17 changes: 17 additions & 0 deletions src/pages/login.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
id: login
title: Login
---

# Login

<link rel="stylesheet" type="text/css" href="/css/custom.css"></link>

<div class="form-container">
<form>
<input type="email" name="email" placeholder="Email" required></input>
<input type="password" name="password" placeholder="Password" required></input>
<button type="submit">Log In</button>
</form>
<p>Don't have an account yet? [Sign Up](signup)</p>
</div>
20 changes: 20 additions & 0 deletions src/pages/signup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
id: signup
title: Sign Up
---

# Sign Up

<link rel="stylesheet" type="text/css" href="/css/custom.css"></link>

<div class="form-container">
<form>
<input type="text" name="username" placeholder="Username" required></input>
<input type="email" name="email" placeholder="Email" required></input>
<input type="password" name="password" placeholder="Password" required></input>
<button type="submit">Sign Up</button>
</form>
<p>Already have an account? [Log In](login)</p>
</div>


0 comments on commit 10844f2

Please sign in to comment.