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

Completes fixes for issues 1-5 on landing page. #32

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 @@ -11,7 +11,7 @@

<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
Expand All @@ -22,16 +22,16 @@
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>
<!-- DONE: Fix Issue, Desktop Nav Is Visible on Mobile -->
<a id="nav-logo" class="bar-item button padding-large white" href="#header">JobSimulator.Dev</a>
<a id="nav-challenges" class="bar-item button padding-large hover-white hide-small" href="#challenges">Browse Challenges</a>
<a id="nav-signup" class="bar-item button padding-large hover-white hide-small" href="#signup">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" class="bar-item button padding-large" href="#challenges">Browse Challenges</a>
<a id="mobile-nav-signup" class="bar-item button padding-large" href="#signup">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 @@ -25,11 +25,28 @@ addEventListener("submit", (event) => {

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

// 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
// 4. repeat email
function isNewEmail(username) {
return username.username === email;
}

if (!email) {
return renderEmailEmptyError();
}

const user = usersTable.find(isNewEmail);

if (usersTable.indexOf(user) !== -1) {
return renderEmailTakenError()
}

usersTable.push({"username": email})
return renderSuccess();

});

let toggleNav = () => {
Expand Down
7 changes: 4 additions & 3 deletions src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,8 @@ form > span {

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

@media (max-width: 600px) {
Expand Down Expand Up @@ -876,8 +877,8 @@ form > span {

#challenge-grid {
display: grid;
/* TODO: Fix Issue, Tiles Need to be 2x2 Grid. Change only grid-template-columns */
grid-template-columns: none;
/* DONE: Fix Issue, Tiles Need to be 2x2 Grid. Change only grid-template-columns */
grid-template-columns: 1fr 1fr;
grid-auto-rows: 10rem;
gap: 1rem;
padding-top: 2rem;
Expand Down