Commit 5644ed25 by Galen Frechette

Merge branch 'prototype' into dormsbee/multicourse

parents f8ae7dc0 915810d4
$(document).ready(function () {
$('a.login').click(function() {
$('.modal-wrapper').addClass("visible");
$('a#login').click(function() {
$('.modal.login-modal').addClass("visible");
$('.modal-overlay').addClass("visible");
});
$('div.close-modal').click(function() {
$('.modal-wrapper').removeClass("visible");
$('.modal.login-modal').removeClass("visible");
$('.modal-overlay').removeClass("visible");
});
$('a#signup').click(function() {
$('.modal.signup-modal').addClass("visible");
$('.modal-overlay').addClass("visible");
});
$('div.close-modal').click(function() {
$('.modal.signup-modal').removeClass("visible");
$('.modal-overlay').removeClass("visible");
});
});
.faded-hr-divider {
@include background-image(linear-gradient(180deg, rgba(255,255,255, 0) 0%, rgba(200,200,200, 0.8) 15%, rgb(200,200,200) 50%, rgba(200,200,200, 0.8) 85%, rgba(255,255,255, 0)));
@include background-image(linear-gradient(180deg, rgba(200,200,200, 0) 0%,
rgba(200,200,200, 1) 50%,
rgba(200,200,200, 0)));
height: 1px;
width: 100%;
}
.faded-hr-divider-light {
@include background-image(linear-gradient(180deg, rgba(255,255,255, 0) 0%,
rgba(255,255,255, 0.8) 50%,
rgba(255,255,255, 0)));
height: 1px;
width: 100%;
}
.faded-vertical-divider {
@include background-image(linear-gradient(90deg, rgba(255,255,255, 0) 0%, rgba(200,200,200, 0.6) 25%, rgb(200,200,200) 50%, rgba(200,200,200, 0.6) 75%, rgba(255,255,255, 0)));
@include background-image(linear-gradient(90deg, rgba(200,200,200, 0) 0%,
rgba(200,200,200, 1) 50%,
rgba(200,200,200, 0)));
height: 100%;
width: 1px;
}
.faded-vertical-divider-light {
@include background-image(linear-gradient(90deg, rgba(255,255,255, 0) 0%,
rgba(255,255,255, 0.6) 50%,
rgba(255,255,255, 0)));
height: 100%;
width: 1px;
}
.vertical-divider {
@extend .faded-vertical-divider;
position: relative;
&::after {
@extend .faded-vertical-divider-light;
content: "";
display: block;
position: absolute;
left: 1px;
}
}
.horizontal-divider {
@extend .faded-hr-divider;
position: relative;
&::after {
@extend .faded-hr-divider-light;
content: "";
display: block;
position: absolute;
top: 1px;
}
}
@mixin vertically-and-horizontally-centered ( $height, $width ) {
left: 50%;
margin-left: -$width / 2;
margin-top: -$height / 2;
//margin-top: -$height / 2;
min-height: $height;
min-width: $width;
position: fixed;
top: 35%;
position: absolute;
top: 150px;
}
......@@ -87,7 +87,7 @@
}
a {
@include button(shiny, $pink);
@include button(shiny, $blue);
@include box-sizing(border-box);
@include border-radius(3px);
@include inline-block;
......@@ -95,20 +95,7 @@
padding: 15px 0px;
text-transform: uppercase;
text-align: center;
width: flex-grid(6);
&:first-child {
margin-right: flex-gutter();
}
&.find-courses {
@include button(shiny, $blue);
@include box-sizing(border-box);
@include border-radius(3px);
@include inline-block;
font: normal italic 1.2rem/1.6rem $serif;
padding: 15px 0px;
}
width: flex-grid(12);
}
form {
......
......@@ -34,7 +34,7 @@ form {
}
input[type="submit"] {
@include button(shiny, $pink);
@include button(shiny, $blue);
@include border-radius(3px);
font: normal italic 1.2rem/1.6rem $serif;
height: 35px;
......
.modal-wrapper {
@include background-image(radial-gradient(50% 50%, circle cover, rgba(0,0,0, 0.3), rgba(0,0,0, 0.7)));
.modal-overlay {
//background: rgba(255,255,255, 0.7);
@include background-image(radial-gradient(50% 30%, circle cover, rgba(0,0,0, 0.3), rgba(0,0,0, 0.8)));
bottom: 0;
content: "";
display: none;
......@@ -12,43 +13,60 @@
&.visible {
display: block;
}
}
.modal {
background: rgba(0,0,0, 0.6);
border: 1px solid rgba(0, 0, 0, 0.9);
@include border-radius(0px);
@include box-shadow(0 15px 80px 15px rgba(0,0,0, 0.5));
color: #fff;
display: none;
left: 50%;
margin-left: -(grid-width(6)) / 2;
padding: 8px;
position: absolute;
top: 170px;
width: grid-width(6);
z-index: 10;
&.visible {
display: block;
}
.login-modal {
background: rgba(0,0,0, 0.6);
.inner-wrapper {
background: rgb(240,240,240);
@include border-radius(0px);
border: 1px solid rgba(0, 0, 0, 0.9);
@include border-radius(4px);
@include box-shadow(0 10px 60px 10px rgba(0,0,0, 0.5));
color: #fff;
padding: 10px;
width: grid-width(7);
@include vertically-and-horizontally-centered(400px, grid-width(7));
z-index: 10;
.inner-wrapper {
@include background-image(linear-gradient(-90deg, rgb(245,245,245), rgb(225,225,225)));
@include border-radius(4px);
border: 1px solid rgba(0, 0, 0, 0.9);
@include box-shadow(inset 0 1px 0 0 rgba(255, 255, 255, 0.7));
height: 380px;
@include box-shadow(inset 0 1px 0 0 rgba(255, 255, 255, 0.7));
overflow: hidden;
padding-bottom: 30px;
position: relative;
header {
margin-bottom: 30px;
overflow: hidden;
padding: 30px;
padding: 28px 20px 0px;
position: relative;
z-index: 2;
&::before {
@include background-image(radial-gradient(50% 50%, circle closest-side, rgba(255,255,255, 1) 0%, rgba(255,255,255, 0) 100%));
@include background-image(radial-gradient(50% 50%, circle closest-side, rgba(255,255,255, 0.8) 0%, rgba(255,255,255, 0) 100%));
content: "";
display: block;
height: 400px;
left: 0px;
margin: 0 auto;
position: absolute;
bottom: -140px;
top: -140px;
width: 100%;
z-index: 1;
}
header {
margin-bottom: 30px;
padding-top: 5px;
hr {
@extend .faded-hr-divider-light;
border: none;
margin: 0px;
position: relative;
z-index: 2;
......@@ -58,120 +76,177 @@
content: "";
display: block;
position: absolute;
top: -1px;
}
}
h3 {
color: $lighter-base-font-color;
font: normal 1.4rem/1.8rem $serif;
padding-bottom: 20px;
text-align: center;
text-shadow: 0 1px rgba(255,255,255, 0.4);
text-transform: uppercase;
vertical-align: middle;
h3 {
color: $lighter-base-font-color;
font: normal 1.4rem/1.8rem $serif;
padding-bottom: 20px;
text-align: center;
text-shadow: 0 1px rgba(255,255,255, 0.4);
text-transform: uppercase;
vertical-align: middle;
position: relative;
z-index: 2;
}
}
form {
margin-bottom: 12px;
padding: 0px 40px;
position: relative;
z-index: 2;
label {
display: none;
}
input[type="checkbox"] {
margin-right: 5px;
}
input[type="email"],
input[type="text"],
input[type="password"] {
background: rgb(255,255,255);
display: block;
height: 45px;
margin-bottom: 20px;
width: 100%;
}
label.remember-me,
label.terms-of-service,
label.honor-code {
background: rgb(233,233,233);
border: 1px solid rgb(200,200,200);
@include border-radius(3px);
@include box-shadow(0 1px 0 0 rgba(255,255,255, 0.6));
display: block;
margin-bottom: 20px;
padding: 8px 10px;
&:hover {
background: rgb(230,230,230);
}
a {
font: normal 1.2rem/1.6rem $serif;
text-decoration: underline;
&:hover {
}
}
}
form {
@include clearfix;
.honor-code-summary {
margin-bottom: 20px;
padding: 0px;
position: relative;
z-index: 2;
label {
display: none;
p {
color: $lighter-base-font-color;
font: 300 1.2rem/1.6rem $sans-serif;
}
label.remember-me {
background: rgb(230,230,230);
border: 1px solid rgb(200,200,200);
@include border-radius(3px);
@include box-shadow(0 1px 0 0 rgba(255,255,255, 0.6));
display: block;
margin-bottom: 60px;
padding: 8px 10px;
hr {
@extend .faded-hr-divider-light;
border: none;
margin-top: 30px;
position: relative;
z-index: 2;
&::before {
&::after {
@extend .faded-hr-divider;
bottom: -30px;
bottom: 0px;
content: "";
display: block;
position: absolute;
top: -1px;
}
}
input[type="checkbox"] {
margin-right: 5px;
}
input[type="email"],
input[type="password"] {
display: block;
height: 45px;
margin-bottom: 20px;
ul {
@include box-sizing(border-box);
margin: 0;
padding: 0 0 0 20px;
width: 100%;
li {
color: $lighter-base-font-color;
font: 300 1.2rem/1.6rem $sans-serif;
margin-bottom: 10px;
&:last-child {
margin-bottom: 0px;
}
}
}
}
.submit {
padding-top: 10px;
input[type="submit"] {
display: block;
height: 45px;
margin: 0 auto;
width: 70%;
width: 100%;
}
}
}
.login-extra {
padding: 15px 0px;
position: relative;
.login-extra {
position: relative;
z-index: 2;
p {
color: $lighter-base-font-color;
font: normal italic 1.2rem/1.6rem $serif;
text-align: center;
p {
a {
color: $lighter-base-font-color;
font: normal italic 1.2rem/1.6rem $serif;
text-align: center;
text-decoration: underline;
a {
color: $lighter-base-font-color;
font: normal italic 1.2rem/1.6rem $serif;
text-decoration: underline;
&:hover {
color: $base-font-color;
}
}
span + a {
margin-left: 15px;
}
span + a {
margin-left: 15px;
}
}
}
.close-modal {
//background: rgb(240,240,240);
//border: 1px solid rgba(180,180,180, 0.7);
@include border-radius(2px);
//@include box-shadow(0 1px 0 0 rgba(255,255,255, 0.4), inset 0 0 2px 0 rgba(0,0,0, 0.1));
cursor: pointer;
@include inline-block;
padding: 5px 10px;
position: absolute;
right: 5px;
top: 5px;
@include transition(all, 0.15s, ease-out);
.inner {
p {
color: $lighter-base-font-color;
font: normal 1.2rem/1.2rem $sans-serif;
text-align: center;
text-shadow: 0 1px rgba(255,255,255, 0.8);
@include transition(all, 0.15s, ease-out);
}
.close-modal {
@include border-radius(2px);
cursor: pointer;
@include inline-block;
padding: 10px;
position: absolute;
right: 2px;
top: 0px;
z-index: 3;
.inner {
p {
color: $lighter-base-font-color;
font: normal 1.2rem/1.2rem $sans-serif;
text-align: center;
text-shadow: 0 1px rgba(255,255,255, 0.8);
@include transition(all, 0.15s, ease-out);
}
}
&:hover {
//background: rgb(235,235,235);
//@include box-shadow(0 1px 0 0 rgba(255,255,255, 0.4), inset 0 0 2px 0 rgba(0,0,0, 0.125));
p {
color: $base-font-color;
}
&:hover {
p {
color: $base-font-color;
}
}
}
......
......@@ -10,7 +10,7 @@
@import 'shared_header';
@import 'shared_list_of_courses';
@import 'shared_course_filter';
@import 'shared_login_modal';
@import 'shared_modal';
@import 'index';
@import 'dashboard';
......
<%inherit file="main.html" />
<h1>About Us</h1>
......@@ -22,7 +22,6 @@
<div class="signup-wrapper">
<section class="sign-up">
<a href="#" class="find-courses">Find Courses</a>
<a href="#" class="create-account">Sign Up</a>
</section>
</div>
</section>
......
<%inherit file="main.html" />
<h1>Jobs</h1>
<%namespace name='static' file='static_content.html'/>
<section class="modal-wrapper">
<section class="login-modal">
<div class="inner-wrapper">
<header>
<h3>Log In</h3>
</header>
<section class="modal login-modal">
<div class="inner-wrapper">
<header>
<h3>Log In</h3>
<hr>
</header>
<form id="login_form" method="post">
<label>E-mail</label>
<input name="email" type="email" placeholder="e-mail">
<label>Password</label>
<input name="password" type="password" placeholder="password">
<label class="remember-me">
<input name="remember" type="checkbox">
Remember me
</label>
<form id="login_form" method="post">
<label>E-mail</label>
<input name="email" type="email" placeholder="E-mail">
<label>Password</label>
<input name="password" type="password" placeholder="Password">
<label class="remember-me">
<input name="remember" type="checkbox">
Remember me
</label>
<div class="submit">
<input name="submit" type="submit" value="Submit">
</form>
</div>
</form>
<section class="login-extra">
<p>
<span>Not enrolled? <a href="#">Sign up.</a></span>
<a href="#" class="pwd-reset">Forgot password?</a>
</p>
</section>
<section class="login-extra">
<p>
<span>Not enrolled? <a href="#">Sign up.</a></span>
<a href="#" class="pwd-reset">Forgot password?</a>
</p>
</section>
<div class="close-modal">
<div class="inner">
<p>&#10005;</p>
</div>
<div class="close-modal">
<div class="inner">
<p>&#10005;</p>
</div>
</div>
</section>
</div>
</section>
<script type="text/javascript">
function getCookie(name) {
var cookieValue = null;
......@@ -68,7 +70,7 @@ function postJSON(url, data, callback) {
submit_data,
function(json) {
if(json.success) {
location.href="/info";
location.href="/courses";
} else if($('#login_error').length == 0) {
$('#login_form').prepend('<div id="login_error">Email or password is incorrect.</div>');
} else {
......
......@@ -7,21 +7,35 @@
<a href="${ MITX_ROOT_URL }" class="logo">
<img src="${static.url('images/logo.png')}" />
</a>
<a href="/courses" class="discover-courses">Find Courses</a>
<nav class="find-courses">
<ol>
<li class="primary">
<div class="divider"></div>
<a href="/courses">Find Courses</a>
<div class="divider"></div>
</li>
<li class="secondary">
<a href="/about">About</a>
<a href="#">Blog</a>
<a href="/jobs">Jobs</a>
</li>
</ol>
</nav>
%if user.is_authenticated():
<h1>${ settings.COURSE_TITLE }</h1>
<nav class="user">
<ol>
<li>
<li class="primary">
<div class="divider"></div>
<a href="/dashboard" class="user-link">
<span class="avatar"><img src="${static.url('images/profile.jpg')}" /></span>
Neil deGrasse Tyson
</a>
</li>
<li>
<div class="divider"></div>
<a href="#" class="options">&#9662</a>
<div class="divider"></div>
<ol class="user-options">
<li><a href="#">Account Settings</a></li>
<li><a href="#">Help</a></li>
<li><a href="/logout">Log Out</a></li>
</ol>
......@@ -32,20 +46,12 @@
%else:
<nav class="guest">
<ol>
<li>
<a href="#">About</a>
</li>
<li>
<a href="#">Blog</a>
</li>
<li>
<a href="#">Jobs</a>
</li>
<li>
<a href="#" class="login">Log In</a>
</li>
<li>
<a href="#">Sign Up</a>
<li class="primary">
<div class="divider"></div>
<a href="#" id="login">Log In</a>
<div class="divider"></div>
<a href="#" id="signup">Sign Up</a>
<div class="divider"></div>
</li>
</ol>
</nav>
......@@ -55,4 +61,8 @@
%if not user.is_authenticated():
<%include file="login_modal.html" />
<%include file="signup_modal.html" />
<section class="modal-overlay">
</section>
%endif
<%namespace name='static' file='static_content.html'/>
<section class="modal signup-modal">
<div class="inner-wrapper">
<header>
<h3>Sign Up for edX</h3>
<hr>
</header>
<form id="login_form" method="post">
<label>E-mail</label>
<input name="email" type="email" placeholder="E-mail">
<label>Password</label>
<input name="password" type="password" placeholder="Password">
<label>Public Username</label>
<input name="username" type="text" placeholder="Public Username">
<label>Full Name</label>
<input name="fullname" type="text" placeholder="Full Name">
<label>Your Location</label>
<input name="location" type="text" placeholder="Your Location">
<label>Prefered Language</label>
<input name="language" type="text" placeholder="Prefered Language">
<label class="terms-of-service">
<input name="terms-of-service" type="checkbox">
I agree to the
<a href="#">Terms of Service</a>
</label>
<label class="honor-code">
<input name="honor-code" type="checkbox">
I agree to the
<a href="#">Honor Code</a>
, sumarized below as:
</label>
<div class="honor-code-summary">
<ul>
<li>
<p>Complete all mid-terms and final exams with only my own work.</p>
</li>
<li>
<p>Maintain only one account, and not share the username or password.</p>
</li>
<li>
<p>Not engage in any activity that would dishonestly improve my results, or improve or hurt those of others.</p>
</li>
<li>
<p>Not post answers to problems that are being used to assess student performance.</p>
</li>
</ul>
<hr>
</div>
<div class="submit">
<input name="submit" type="submit" value="Create My Account">
</div>
</form>
<section class="login-extra">
<p>
<span>Already have an account? <a href="#">Login.</a></span>
</p>
</section>
<div class="close-modal">
<div class="inner">
<p>&#10005;</p>
</div>
</div>
</div>
</section>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment