Merge pull request #822 from MITx/feature/tomg/labs-signup
added course page with log in and sign up
This commit is contained in:
@@ -621,4 +621,7 @@ def remove_user(request, org, course, name):
|
||||
@ensure_csrf_cookie
|
||||
def asset_index(request, location):
|
||||
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', {})
|
||||
BIN
cms/static/img/edx-labs-logo-small.png
Normal file
BIN
cms/static/img/edx-labs-logo-small.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.2 KiB |
@@ -1,3 +1,9 @@
|
||||
body.no-header {
|
||||
.primary-header {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.primary-header {
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
|
||||
116
cms/static/sass/_landing.scss
Normal file
116
cms/static/sass/_landing.scss
Normal file
@@ -0,0 +1,116 @@
|
||||
// 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;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,7 @@
|
||||
.sign-up-box,
|
||||
.log-in-box {
|
||||
width: 500px;
|
||||
margin: 200px auto;
|
||||
margin: 100px auto;
|
||||
border-radius: 3px;
|
||||
|
||||
header {
|
||||
@@ -19,7 +20,7 @@
|
||||
}
|
||||
}
|
||||
|
||||
.log-in-form {
|
||||
form {
|
||||
padding: 40px;
|
||||
border: 1px solid $darkGrey;
|
||||
border-top-width: 0;
|
||||
@@ -34,22 +35,33 @@
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.email-field,
|
||||
.password-field {
|
||||
input[type="text"],
|
||||
input[type="email"],
|
||||
input[type="password"] {
|
||||
width: 100%;
|
||||
font-size: 20px;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.row {
|
||||
@include clearfix;
|
||||
margin-bottom: 24px;
|
||||
|
||||
.split {
|
||||
float: left;
|
||||
width: 48%;
|
||||
|
||||
&:first-child {
|
||||
margin-right: 4%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-actions {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.log-in-button {
|
||||
input[type="submit"] {
|
||||
@include blue-button;
|
||||
margin-right: 10px;
|
||||
padding: 8px 20px 10px;
|
||||
@@ -63,6 +75,5 @@
|
||||
margin-top: 10px;
|
||||
text-align: right;
|
||||
font-size: 13px;
|
||||
border-top: 1px solid $lightGrey;
|
||||
}
|
||||
}
|
||||
@@ -15,6 +15,7 @@
|
||||
@import "unit";
|
||||
@import "assets";
|
||||
@import "course-info";
|
||||
@import "landing";
|
||||
@import "graphics";
|
||||
@import "modal";
|
||||
@import "alerts";
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<%inherit file="base.html" />
|
||||
<%! from django.core.urlresolvers import reverse %>
|
||||
<%block name="title">Log in</%block>
|
||||
<%block name="bodyclass">no-header</%block>
|
||||
|
||||
<%block name="content">
|
||||
|
||||
@@ -10,11 +11,11 @@
|
||||
</header>
|
||||
<form class="log-in-form" id="login_form" action="login_post" method="post">
|
||||
<div class="row">
|
||||
<label>Email:</label>
|
||||
<label>Email</label>
|
||||
<input name="email" type="email" class="email-field">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label>Password:</label>
|
||||
<label>Password</label>
|
||||
<input name="password" type="password" class="password-field">
|
||||
</div>
|
||||
<div class="row form-actions">
|
||||
|
||||
@@ -1,52 +1,59 @@
|
||||
<%inherit file="base.html" />
|
||||
<%block name="title">Sign up</%block>
|
||||
<%block name="bodyclass">no-header</%block>
|
||||
|
||||
<%block name="content">
|
||||
<section class="main-container">
|
||||
|
||||
<section class="main-content">
|
||||
<header>
|
||||
<h3>Sign Up for edX</h3>
|
||||
<hr>
|
||||
</header>
|
||||
|
||||
<div id="register">
|
||||
|
||||
<form id="register_form" method="post">
|
||||
<div id="register_error" name="register_error"></div>
|
||||
<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="name" type="text" placeholder="Full Name">
|
||||
<label>Your Location</label>
|
||||
<input name="location" type="text" placeholder="Your Location">
|
||||
<label>Preferred Language</label>
|
||||
<input name="language" type="text" placeholder="Preferred Language">
|
||||
<label class="terms-of-service">
|
||||
<input name="terms_of_service" type="checkbox" value="true">
|
||||
I agree to the
|
||||
<a href="#">Terms of Service</a>
|
||||
</label>
|
||||
|
||||
<!-- no honor code for CMS, but need it because we're using the lms student object -->
|
||||
<input name="honor_code" type="checkbox" value="true" checked="true" hidden="true">
|
||||
|
||||
<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>
|
||||
|
||||
<article class="sign-up-box">
|
||||
<header>
|
||||
<h1>Register for edX Labs</h1>
|
||||
</header>
|
||||
<form id="register_form" method="post">
|
||||
<div id="register_error" name="register_error"></div>
|
||||
<div class="row">
|
||||
<label>Email</label>
|
||||
<input name="email" type="email">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label>Password</label>
|
||||
<input name="password" type="password">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label>Public Username</label>
|
||||
<input name="username" type="text">
|
||||
</div>
|
||||
<div class="row">
|
||||
<label>Full Name</label>
|
||||
<input name="name" type="text">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="split">
|
||||
<label>Your Location</label>
|
||||
<input name="location" type="text">
|
||||
</div>
|
||||
<div class="split">
|
||||
<label>Preferred Language</label>
|
||||
<input name="language" type="text">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="terms-of-service">
|
||||
<input name="terms_of_service" type="checkbox" value="true">
|
||||
I agree to the
|
||||
<a href="#">Terms of Service</a>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<!-- no honor code for CMS, but need it because we're using the lms student object -->
|
||||
<input name="honor_code" type="checkbox" value="true" checked="true" hidden="true">
|
||||
|
||||
<div class="row form-actions submit">
|
||||
<input name="submit" type="submit" value="Create My Account">
|
||||
</div>
|
||||
</form>
|
||||
<div class="log-in-extra">
|
||||
<p>Not enrolled? <a href="/">Sign up.</a></p>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
@@ -81,8 +88,4 @@
|
||||
});
|
||||
})(this)
|
||||
</script>
|
||||
|
||||
</section>
|
||||
|
||||
</section>
|
||||
</%block>
|
||||
</%block>
|
||||
38
cms/templates/temp-course-landing.html
Normal file
38
cms/templates/temp-course-landing.html
Normal file
@@ -0,0 +1,38 @@
|
||||
<%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>
|
||||
@@ -29,8 +29,10 @@ urlpatterns = ('',
|
||||
'contentstore.views.add_user', name='add_user'),
|
||||
url(r'^(?P<org>[^/]+)/(?P<course>[^/]+)/course/(?P<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')
|
||||
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user