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

jperitz-dev #41

Merged
merged 4 commits into from
Oct 23, 2018
Merged
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
1 change: 1 addition & 0 deletions website/about.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
<!-- 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://www.facebook.com/groups/ufosc/events/?source=4&action_history=null&filter=calendar">
Events
Expand Down
1 change: 1 addition & 0 deletions website/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
<!-- 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://www.facebook.com/groups/ufosc/events/?source=4&action_history=null&filter=calendar">
Events
Expand Down
115 changes: 115 additions & 0 deletions website/login.html
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()">
&#9776;
</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>
1 change: 1 addition & 0 deletions website/projects.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
<!-- 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://www.facebook.com/groups/ufosc/events/?source=4&action_history=null&filter=calendar">
Events
Expand Down
3 changes: 3 additions & 0 deletions website/scripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,6 @@ function showSlides(n) {
dots[slideIndex-1].className += " active";
timeOut = setTimeout(() => plusSlides(1), 5000); //Increments slide every 5 seconds automatically, timer is reset whenever a slide is manually selected
}

//Functions for the login page

Copy link
Member

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.

101 changes: 101 additions & 0 deletions website/styles/login.css
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%;
}
}