Skip to content

Commit

Permalink
Merge pull request #41 from ufosc/mydev
Browse files Browse the repository at this point in the history
  • Loading branch information
mirdaki authored Oct 23, 2018
2 parents 984d34c + 126ab32 commit 3431d8e
Show file tree
Hide file tree
Showing 6 changed files with 222 additions and 0 deletions.
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

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%;
}
}

0 comments on commit 3431d8e

Please sign in to comment.