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 issues #65

Open
wants to merge 8 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
14 changes: 7 additions & 7 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@
id="hamburger-button"
onclick="toggleNav()"
title="Toggle Navigation Menu"
><i class="fa fa-bars"></i
></a>
><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 id="nav-logo" href="#header" class="bar-item button hide-small padding-large white">JobSimulator.Dev</a>
<a id="nav-challenges" href="#challenges" class="bar-item hide-small button padding-large hover-white">Browse Challenges</a>
<a id="nav-signup" href="#signup" class="bar-item button hide-small padding-large hover-white">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>
<a id="mobile-nav-challenges" href="#challenges" class="bar-item button padding-large">Browse Challenges</a>
<a id="mobile-nav-signup" href="#signup" class="bar-item button padding-large">Sign Up</a>
</div>
</nav>

Expand Down
11 changes: 11 additions & 0 deletions src/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ addEventListener("submit", (event) => {
// 2. empty email
// 3. taken email
// 4. repeat email
let user = usersTable.find((user) => user.username === email);
if(user){
renderEmailTakenError();
}
else if(email.length !== 0){
renderSuccess();
usersTable.push({username: `${email}`});
}
else {
renderEmailEmptyError();
}
});

let toggleNav = () => {
Expand Down
3 changes: 2 additions & 1 deletion src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -670,6 +670,7 @@ form > span {
#jumbo-image {
max-height: 20rem;
/* TODO: Invert banner colors using CSS */
filter: invert(1);
}

@media (max-width: 600px) {
Expand Down Expand Up @@ -877,7 +878,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