-
Notifications
You must be signed in to change notification settings - Fork 14
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
jperitz-dev #41
Merged
jperitz-dev #41
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
17a1076
skeleton of the login page + added login page to the header
jperitz 6b16f67
small changes to login.html
jperitz ee1ceb3
Implemented the requested changes to the login page
jperitz 126ab32
Merge branch 'dev' of https://github.com/ufosc/club-website into mydev
jperitz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,115 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Open Source Club</title> | ||
<meta charset="utf-8"/> | ||
<link rel="stylesheet" type="text/css" href="styles/login.css"> | ||
</head> | ||
<!-- TODO: Give license credit to all fonts --> | ||
|
||
<body> | ||
|
||
<!-- The header bar --> | ||
<div class="topnav"> | ||
|
||
<!-- Logo --> | ||
<a id="logo-link" href="index.html"> | ||
<img class="topnav-logo" src="assets/images/small-logo.png" alt="Open Source Club Logo"> | ||
</a> | ||
|
||
<!-- Page links --> | ||
<div class="topnav-right"> | ||
<div class="topnav-placeholder"></div> | ||
<a class="topnav-link" href="login.html">Sign in</a> | ||
<a class="topnav-link" href="projects.html">Projects</a> | ||
<a class="topnav-link" href="https://calendar.google.com/calendar/embed?src=toln76hk72u3v4vhu4hblu8s88%40group.calendar.google.com&ctz=America%2FNew_York"> | ||
Events | ||
<i class="fas fa-external-link-alt external-link" data-fa-transform="up-6"></i> | ||
</a> | ||
<a class="topnav-link" href="https://github.com/ufosc/resources"> | ||
Resources | ||
<i class="fas fa-external-link-alt external-link" data-fa-transform="up-6 right-4"></i> | ||
</a> | ||
<!-- TODO: Make a contact page (This may not be necessary) --> | ||
<!-- <a class="topnav-link" href="contact.html">Contact</a> --> | ||
<a class="topnav-link" href="about.html">About</a> | ||
</div> | ||
|
||
<!-- Drop down menu --> | ||
<a href="javascript:void(0);" class="topnav-link topnav-menu-icon" onclick="dropDownMenu()"> | ||
☰ | ||
</a> | ||
|
||
</div> | ||
<!-- End of header bar --> | ||
<!-- Page content --> | ||
<div class="content"> | ||
<div class="ui sign-in form"> | ||
<form id = "sign-in form"> | ||
<!-- TODO: create request handler that connects to backend on submit--> | ||
<div class="field"> <!-- Email field --> | ||
<label> Email</label> | ||
<input type="email" id="email" placeholder="[email protected]" required> | ||
</div> | ||
|
||
<div class="hiddenField"> <!-- First name field --> | ||
<label> First Name</label> | ||
<input type="text" id="fname" placeholder="Jane"> | ||
</div> | ||
|
||
<div class="hiddenField"> <!-- Last name field --> | ||
<label> Last Name</label> | ||
<input type="text" id="lname" placeholder="Doe"> | ||
</div> | ||
|
||
<div class="hiddenField"> <!-- GitHub field --> | ||
<label> GitHub Handle</label> | ||
<input type="link" id="gname" placeholder="github.com/yourname"> | ||
</div> | ||
|
||
<div class="hiddenField"> <!-- TODO: add styling to checkboxes --> | ||
<label> Join Our Email list?</label> | ||
<input type="checkbox" id="emailList"> | ||
</div> | ||
|
||
<div class="hiddenField"> | ||
<label> Share Info With ACM?</label> | ||
<input type="checkbox" id="acmShare"> | ||
</div> | ||
|
||
<!-- sign in button --> | ||
<!-- TODO: switch type to submit --> | ||
<div class="field"> | ||
<button id ="sign-in" onclick="loginHandler()" type="button">Sign in</button> | ||
</div> | ||
</form> | ||
|
||
<!-- temporary script to handle requests --> | ||
<script> | ||
var expandedForm; | ||
function loginHandler() { | ||
var uemail = document.getElementById("email").value; | ||
//eventually this line should replace "Jonathan" with a reference to the name the person signed up with. | ||
//TODO: actually count the sign-in | ||
if(uemail == "[email protected]" || Boolean(expandedForm)) { | ||
document.getElementById("sign-in form").reset(); | ||
alert("Thanks Jonathan, your sign-in was successful!"); | ||
} | ||
//if the email doesn't match the DB, unhide the extra fields | ||
else if(uemail != "[email protected]") { | ||
var x = document.getElementsByClassName("hiddenField"); | ||
expandedForm = true; | ||
for (var i =0; i < x.length; i++) { | ||
x[i].style.display = "block"; | ||
} | ||
} | ||
//the following line should only get executed if some error occurred. | ||
else { | ||
alert("Oops! Something went wrong. Please try again."); | ||
} | ||
} | ||
</script> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
@import "unified.css"; | ||
|
||
/* Bordered form */ | ||
form { | ||
border: 3px solid #f1f1f1; | ||
} | ||
|
||
/* low-width inputs */ | ||
input[type=email], [type=text], [type=link] { | ||
width: 20%; | ||
padding: 12px 20px; | ||
margin: 8px 0; | ||
display: inline-block; | ||
border: 1px solid #ccc; | ||
box-sizing: border-box; | ||
} | ||
|
||
/* hidden inputs | ||
input[type=text] { | ||
width: 20%; | ||
padding: 12px 20px; | ||
margin: 8px 0; | ||
display: none; | ||
border: 1px solid #ccc; | ||
box-sizing: border-box; | ||
} */ | ||
|
||
.hiddenField { | ||
display: none; | ||
} | ||
|
||
/* Set a style for all buttons */ | ||
button { | ||
/*background-color: rgb(76, 119, 175);*/ | ||
background-color: var(--primary-color); | ||
color: white; | ||
padding: 14px 20px; | ||
margin: 8px 0; | ||
border: none; | ||
cursor: pointer; | ||
width: 20%; | ||
} | ||
|
||
/* Add a hover effect for buttons */ | ||
button:hover { | ||
opacity: 0.8; | ||
} | ||
|
||
/* Extra style for the cancel button (red) */ | ||
.cancelbtn { | ||
width: auto; | ||
padding: 10px 18px; | ||
background-color: #f44336; | ||
} | ||
|
||
/* Add padding to containers */ | ||
.container { | ||
padding: 16px; | ||
} | ||
|
||
/* The "Forgot password" text */ | ||
span.psw { | ||
float: right; | ||
padding-top: 16px; | ||
} | ||
|
||
/* Change styles for span and cancel button on extra small screens */ | ||
@media screen and (max-width: 300px) { | ||
span.psw { | ||
display: block; | ||
float: none; | ||
} | ||
.cancelbtn { | ||
width: 100%; | ||
} | ||
} | ||
|
||
/* For mobile phones */ | ||
@media only screen and (max-width: 600px) { | ||
|
||
/* Full-width inputs */ | ||
input[type=email], input[type=text] { | ||
width: 100%; | ||
padding: 12px 20px; | ||
margin: 8px 0; | ||
display: inline-block; | ||
border: 1px solid #ccc; | ||
box-sizing: border-box; | ||
} | ||
|
||
button { | ||
/*background-color: rgb(76, 119, 175);*/ | ||
background-color: var(--primary-color); | ||
color: white; | ||
padding: 14px 20px; | ||
margin: 8px 0; | ||
border: none; | ||
cursor: pointer; | ||
width: 100%; | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is something I need to change about the other pages. The plan with the scripts folder is to treat it like the styles folder (so there will be a unified script for the header functions, and then each page would make it's own script if it needs it). I'll make those changes soon, just wanted to let you know.