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

fix : all mentioned issues #39

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
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
16 changes: 8 additions & 8 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,27 @@

<body>
<!-- Navbar -->
<!-- TODO: Fix Issue, Nav Buttons Don't Work (Desktop & Mobile) -->
<!-- Done: Fix Issue, Nav Buttons Don't Work (Desktop & Mobile) -->
<nav class="top">
<div class="bar blue card left-align large">
<a
class="bar-item button hide-medium hide-large right padding-large hover-white large blue"
class="bar-item button hide-large right padding-large hover-white large blue"
href="javascript:void(0);"
id="hamburger-button"
onclick="toggleNav()"
title="Toggle Navigation Menu"
><i class="fa fa-bars"></i
></a>
<!-- TODO: Fix Issue, Desktop Nav Is Visible on Mobile -->
<a id="nav-logo" class="bar-item button padding-large white">JobSimulator.Dev</a>
<a id="nav-challenges" class="bar-item button padding-large hover-white">Browse Challenges</a>
<a id="nav-signup" class="bar-item button padding-large hover-white">Sign Up</a>
<a href="#header" id="nav-logo" class="bar-item button padding-large white" >JobSimulator.Dev</a>
<a href="#challenges" id="nav-challenges" class="bar-item button padding-large hover-white hide-small" >Browse Challenges</a>
<a href="#signup" id="nav-signup" class="bar-item button padding-large hover-white hide-small" >Sign Up</a>
</div>

<!-- Navbar on small screens -->
<div id="mobile-nav" class="bar-block white hide hide-large hide-medium large">
<a id="mobile-nav-challenges" class="bar-item button padding-large">Browse Challenges</a>
<a id="mobile-nav-signup" class="bar-item button padding-large">Sign Up</a>
<div id="mobile-nav" class="bar-block white hide hide-large large">
<a href="#challenges" id="mobile-nav-challenges" class="bar-item button padding-large mobile">Browse Challenges</a>
<a href="#signup" id="mobile-nav-signup" class="bar-item button padding-large mobile">Sign Up</a>
</div>
</nav>

Expand Down
19 changes: 18 additions & 1 deletion src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,25 @@ addEventListener("submit", (event) => {
resetMessage();

let email = document.getElementById("email").value;

// if empty give error
if (email.length === 0){
renderEmailEmptyError();
return null;
}

const user = usersTable.find(user => user.username === email);

if (user){
// if taken already taken, repeat also same case
renderEmailTakenError();
}else{
// succesful signup where email doesnt exist and is correct, add user
renderSuccess();
usersTable.push({username: email});
}

// TODO: Show Correct Status Messages on Signup Form
// Done: Show Correct Status Messages on Signup Form
// 1. successful signup
// 2. empty email
// 3. taken email
Expand Down
6 changes: 4 additions & 2 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -665,11 +665,13 @@ form > span {
.auto {
max-width: 95%;
}

}

#jumbo-image {
max-height: 20rem;
/* TODO: Invert banner colors using CSS */
filter: invert(1);
}

@media (max-width: 600px) {
Expand Down Expand Up @@ -725,7 +727,7 @@ form > span {
}
}
@media (max-width: 992px) and (min-width: 601px) {
.hide-medium {
.hide-small {
display: none !important;
}
}
Expand Down Expand Up @@ -877,7 +879,7 @@ form > span {
#challenge-grid {
display: grid;
/* TODO: Fix Issue, Tiles Need to be 2x2 Grid. Change only grid-template-columns */
grid-template-columns: none;
grid-template-columns: 1fr 1fr;
grid-auto-rows: 10rem;
gap: 1rem;
padding-top: 2rem;
Expand Down