Commit 612e5fe8 by Calen Pennington

Merge pull request #822 from MITx/feature/tomg/labs-signup

added course page with log in and sign up
parents a6cf7cb0 92e830df
...@@ -621,4 +621,7 @@ def remove_user(request, org, course, name): ...@@ -621,4 +621,7 @@ def remove_user(request, org, course, name):
@ensure_csrf_cookie @ensure_csrf_cookie
def asset_index(request, location): def asset_index(request, location):
return render_to_response('asset_index.html',{}) return render_to_response('asset_index.html',{})
# points to the temporary course landing page with log in and sign up
def landing(request, org, course, coursename):
return render_to_response('temp-course-landing.html', {})
\ No newline at end of file
body.no-header {
.primary-header {
display: none;
}
}
.primary-header { .primary-header {
width: 100%; width: 100%;
height: 36px; height: 36px;
......
// This is a temporary page, which will be replaced once we have a more extensive course catalog and marketing site for edX labs.
.class-landing {
.main-wrapper {
width: 700px !important;
margin: 100px auto;
}
.class-info {
padding: 30px 40px 40px;
@extend .window;
hgroup {
padding-bottom: 26px;
border-bottom: 1px solid $mediumGrey;
}
h1 {
float: none;
font-size: 30px;
font-weight: 300;
margin: 0;
}
h2 {
color: #5d6779;
}
.class-actions {
@include clearfix;
padding: 15px 0;
margin-bottom: 18px;
border-bottom: 1px solid $mediumGrey;
}
.log-in-form {
@include clearfix;
padding: 15px 0 20px;
margin-bottom: 18px;
border-bottom: 1px solid $mediumGrey;
.log-in-submit-button {
@include blue-button;
padding: 6px 20px 8px;
margin: 24px 0 0;
}
.column {
float: left;
width: 41%;
margin-right: 1%;
&.submit {
width: 16%;
margin-right: 0;
}
label {
float: left;
}
}
input {
width: 100%;
font-family: $sans-serif;
font-size: 13px;
}
.forgot-button {
float: right;
margin-bottom: 6px;
font-size: 12px;
}
}
.sign-up-button {
@include blue-button;
display: block;
width: 250px;
margin: auto;
}
.log-in-button {
@include white-button;
float: right;
}
.sign-up-button,
.log-in-button {
padding: 8px 0 12px;
font-size: 18px;
font-weight: 300;
text-align: center;
}
.class-description {
margin-top: 30px;
font-size: 14px;
}
p + p {
margin-top: 22px;
}
}
.edx-labs-logo-small {
display: block;
width: 124px;
height: 30px;
margin: auto;
background: url(../img/edx-labs-logo-small.png) no-repeat;
text-indent: -9999px;
overflow: hidden;
}
}
\ No newline at end of file
.sign-up-box,
.log-in-box { .log-in-box {
width: 500px; width: 500px;
margin: 200px auto; margin: 100px auto;
border-radius: 3px; border-radius: 3px;
header { header {
...@@ -19,7 +20,7 @@ ...@@ -19,7 +20,7 @@
} }
} }
.log-in-form { form {
padding: 40px; padding: 40px;
border: 1px solid $darkGrey; border: 1px solid $darkGrey;
border-top-width: 0; border-top-width: 0;
...@@ -34,22 +35,33 @@ ...@@ -34,22 +35,33 @@
font-weight: 700; font-weight: 700;
} }
.email-field, input[type="text"],
.password-field { input[type="email"],
input[type="password"] {
width: 100%; width: 100%;
font-size: 20px; font-size: 20px;
font-weight: 300; font-weight: 300;
} }
.row { .row {
@include clearfix;
margin-bottom: 24px; margin-bottom: 24px;
.split {
float: left;
width: 48%;
&:first-child {
margin-right: 4%;
}
}
} }
.form-actions { .form-actions {
margin-bottom: 0; margin-bottom: 0;
} }
.log-in-button { input[type="submit"] {
@include blue-button; @include blue-button;
margin-right: 10px; margin-right: 10px;
padding: 8px 20px 10px; padding: 8px 20px 10px;
...@@ -63,6 +75,5 @@ ...@@ -63,6 +75,5 @@
margin-top: 10px; margin-top: 10px;
text-align: right; text-align: right;
font-size: 13px; font-size: 13px;
border-top: 1px solid $lightGrey;
} }
} }
\ No newline at end of file
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
@import "unit"; @import "unit";
@import "assets"; @import "assets";
@import "course-info"; @import "course-info";
@import "landing";
@import "graphics"; @import "graphics";
@import "modal"; @import "modal";
@import "alerts"; @import "alerts";
......
<%inherit file="base.html" /> <%inherit file="base.html" />
<%! from django.core.urlresolvers import reverse %> <%! from django.core.urlresolvers import reverse %>
<%block name="title">Log in</%block> <%block name="title">Log in</%block>
<%block name="bodyclass">no-header</%block>
<%block name="content"> <%block name="content">
...@@ -10,11 +11,11 @@ ...@@ -10,11 +11,11 @@
</header> </header>
<form class="log-in-form" id="login_form" action="login_post" method="post"> <form class="log-in-form" id="login_form" action="login_post" method="post">
<div class="row"> <div class="row">
<label>Email:</label> <label>Email</label>
<input name="email" type="email" class="email-field"> <input name="email" type="email" class="email-field">
</div> </div>
<div class="row"> <div class="row">
<label>Password:</label> <label>Password</label>
<input name="password" type="password" class="password-field"> <input name="password" type="password" class="password-field">
</div> </div>
<div class="row form-actions"> <div class="row form-actions">
......
<%inherit file="base.html" /> <%inherit file="base.html" />
<%block name="title">Sign up</%block> <%block name="title">Sign up</%block>
<%block name="bodyclass">no-header</%block>
<%block name="content"> <%block name="content">
<section class="main-container"> <article class="sign-up-box">
<header>
<section class="main-content"> <h1>Register for edX Labs</h1>
<header> </header>
<h3>Sign Up for edX</h3> <form id="register_form" method="post">
<hr> <div id="register_error" name="register_error"></div>
</header> <div class="row">
<label>Email</label>
<div id="register"> <input name="email" type="email">
</div>
<form id="register_form" method="post"> <div class="row">
<div id="register_error" name="register_error"></div> <label>Password</label>
<label>E-mail</label> <input name="password" type="password">
<input name="email" type="email" placeholder="E-mail"> </div>
<label>Password</label> <div class="row">
<input name="password" type="password" placeholder="Password"> <label>Public Username</label>
<label>Public Username</label> <input name="username" type="text">
<input name="username" type="text" placeholder="Public Username"> </div>
<label>Full Name</label> <div class="row">
<input name="name" type="text" placeholder="Full Name"> <label>Full Name</label>
<input name="name" type="text">
</div>
<div class="row">
<div class="split">
<label>Your Location</label> <label>Your Location</label>
<input name="location" type="text" placeholder="Your Location"> <input name="location" type="text">
</div>
<div class="split">
<label>Preferred Language</label> <label>Preferred Language</label>
<input name="language" type="text" placeholder="Preferred Language"> <input name="language" type="text">
<label class="terms-of-service"> </div>
<input name="terms_of_service" type="checkbox" value="true"> </div>
I agree to the <div class="row">
<a href="#">Terms of Service</a> <label class="terms-of-service">
</label> <input name="terms_of_service" type="checkbox" value="true">
I agree to the
<!-- no honor code for CMS, but need it because we're using the lms student object --> <a href="#">Terms of Service</a>
<input name="honor_code" type="checkbox" value="true" checked="true" hidden="true"> </label>
</div>
<div class="submit">
<input name="submit" type="submit" value="Create My Account"> <!-- no honor code for CMS, but need it because we're using the lms student object -->
</div> <input name="honor_code" type="checkbox" value="true" checked="true" hidden="true">
</form>
<section class="login-extra">
<p>
<span>Already have an account? <a href="#">Login.</a></span>
</p>
</section>
<div class="row form-actions submit">
<input name="submit" type="submit" value="Create My Account">
</div> </div>
</form>
<div class="log-in-extra">
<p>Not enrolled? <a href="/">Sign up.</a></p>
</div>
</article>
<script type="text/javascript"> <script type="text/javascript">
(function() { (function() {
...@@ -81,8 +88,4 @@ ...@@ -81,8 +88,4 @@
}); });
})(this) })(this)
</script> </script>
</%block>
</section> \ No newline at end of file
</section>
</%block>
<%inherit file="base.html" />
<%! from django.core.urlresolvers import reverse %>
<%block name="title">Landing</%block>
<%block name="bodyclass">no-header class-landing</%block>
<%block name="content">
<div class="main-wrapper">
<article class="class-info">
<hgroup>
<h1>Circuits and Electronics</h1>
<h2>Massachusetts Institute of Technology</h2>
</hgroup>
<div class="log-in-form">
<form>
<div class="column">
<label>Email</label>
<input name="email" type="email" class="email-field" tabindex="1">
</div>
<div class="column">
<label>Password</label><a href="#" class="forgot-button">Forgot?</a>
<input name="password" type="password" class="password-field" tabindex="2">
</div>
<div class="column submit">
<input name="submit" type="submit" value="Log In" class="log-in-submit-button" tabindex="3">
</div>
</form>
</div>
<div class="class-description">
<p>Ut laoreet dolore magna aliquam erat volutpat ut wisi enim ad minim veniam quis nostrud. Est usus legentis in iis qui, facit eorum claritatem Investigationes demonstraverunt lectores. Vel illum dolore eu feugiat nulla facilisis at vero eros, et accumsan et iusto? Te feugait nulla facilisi nam liber tempor cum soluta nobis eleifend option congue nihil imperdiet doming! Et quinta decima eodem modo typi qui nunc nobis, videntur parum clari fiant sollemnes in? Diam nonummy nibh euismod tincidunt exerci tation ullamcorper, suscipit lobortis nisl ut aliquip ex? Nunc putamus parum, claram anteposuerit litterarum formas humanitatis per seacula quarta decima.</p>
<p>Gothica quam nunc putamus parum claram anteposuerit litterarum formas humanitatis per seacula. Facilisi nam liber tempor cum soluta nobis eleifend.</p>
<p><a href="#" class="sign-up-button">Sign Up</a></p>
</div>
</article>
<footer>
<a href="#" class="edx-labs-logo-small">edX Labs</a>
</footer>
</div>
</%block>
\ No newline at end of file
...@@ -29,8 +29,10 @@ urlpatterns = ('', ...@@ -29,8 +29,10 @@ urlpatterns = ('',
'contentstore.views.add_user', name='add_user'), 'contentstore.views.add_user', name='add_user'),
url(r'^(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<name>[^/]+)/remove_user$', url(r'^(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<name>[^/]+)/remove_user$',
'contentstore.views.remove_user', name='remove_user'), 'contentstore.views.remove_user', name='remove_user'),
url(r'^assets/(?P<location>.*?)$', 'contentstore.views.asset_index', name='asset_index') url(r'^assets/(?P<location>.*?)$', 'contentstore.views.asset_index', name='asset_index'),
# temporary landing page for a course
url(r'^landing/(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<coursename>[^/]+)$', 'contentstore.views.landing', name='landing')
) )
......
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