Merge. Note duplicate e-mail subject files
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
29
ci/build.sh
Executable file
29
ci/build.sh
Executable file
@@ -0,0 +1,29 @@
|
||||
#! /bin/bash
|
||||
|
||||
set -x
|
||||
set -e
|
||||
|
||||
#sass sass:static/css -r templates/sass/bourbon/lib/bourbon.rb --style :compressed
|
||||
|
||||
if [ -z "${GIT_COMMIT}" ]; then
|
||||
GIT_COMMIT=$(git rev-parse HEAD)
|
||||
fi
|
||||
|
||||
if [ -z "${GIT_BRANCH}" ]; then
|
||||
GIT_BRANCH=$(git symbolic-ref -q HEAD)
|
||||
GIT_BRANCH=${GIT_BRANCH##refs/heads/}
|
||||
GIT_BRANCH=${GIT_BRANCH:-HEAD}
|
||||
fi
|
||||
GIT_BRANCH=${GIT_BRANCH##origin/}
|
||||
GIT_BRANCH=${GIT_BRANCH//\//_}
|
||||
|
||||
if [ -z "${BUILD_NUMBER}" ]; then
|
||||
BUILD_NUMBER=dev
|
||||
fi
|
||||
|
||||
ID=mitx-${GIT_BRANCH}-${BUILD_NUMBER}-${GIT_COMMIT}
|
||||
REPO_ROOT=$(dirname $0)/..
|
||||
BUILD_DIR=${REPO_ROOT}/build
|
||||
|
||||
mkdir -p ${BUILD_DIR}
|
||||
tar --exclude=.git --exclude=build --transform="s#^#mitx/#" -czf ${BUILD_DIR}/${ID}.tgz ${REPO_ROOT}
|
||||
@@ -11,10 +11,11 @@ from lxml import etree
|
||||
|
||||
try: # This lets us do __name__ == ='__main__'
|
||||
from django.conf import settings
|
||||
from django.core.cache import cache
|
||||
|
||||
from student.models import UserProfile
|
||||
from student.models import UserTestGroup
|
||||
from mitxmako.shortcuts import render_to_response, render_to_string
|
||||
from util.cache import cache
|
||||
except:
|
||||
settings = None
|
||||
|
||||
@@ -157,10 +158,7 @@ def user_groups(user):
|
||||
cache_expiration = 60 * 60 # one hour
|
||||
|
||||
# Kill caching on dev machines -- we switch groups a lot
|
||||
if "dev" not in settings.DEFAULT_GROUPS:
|
||||
group_names = cache.get(fasthash(key))
|
||||
else:
|
||||
group_names = None
|
||||
group_names = cache.get(fasthash(key))
|
||||
|
||||
if group_names is None:
|
||||
group_names = [u.name for u in UserTestGroup.objects.filter(users=user)]
|
||||
|
||||
@@ -3,7 +3,6 @@ import os
|
||||
|
||||
from django import forms
|
||||
from django.contrib.auth.models import User
|
||||
from django.core.cache import cache
|
||||
from django.core.urlresolvers import reverse
|
||||
from django.db import models
|
||||
from django.db.models import signals
|
||||
@@ -11,6 +10,8 @@ from django.utils.translation import ugettext_lazy as _
|
||||
from markdown import markdown
|
||||
|
||||
from settings import *
|
||||
from util.cache import cache
|
||||
|
||||
|
||||
class ShouldHaveExactlyOneRootSlug(Exception):
|
||||
pass
|
||||
|
||||
16
lib/util/cache.py
Normal file
16
lib/util/cache.py
Normal file
@@ -0,0 +1,16 @@
|
||||
"""
|
||||
This module aims to give a little more fine-tuned control of caching and cache
|
||||
invalidation. Import these instead of django.core.cache.
|
||||
|
||||
Note that 'default' is being preserved for user session caching, which we're
|
||||
not migrating so as not to inconvenience users by logging them all out.
|
||||
"""
|
||||
from django.core import cache
|
||||
|
||||
# If we can't find a 'general' CACHE defined in settings.py, we simply fall back
|
||||
# to returning the default cache. This will happen with dev machines.
|
||||
try:
|
||||
cache = cache.get_cache('general')
|
||||
except ValueError:
|
||||
cache = cache.cache
|
||||
|
||||
21
settings.py
21
settings.py
@@ -166,6 +166,13 @@ MAKO_TEMPLATES = {}
|
||||
|
||||
LOGGING_ENV = "dev" # override this in different environments
|
||||
|
||||
# Default dev cache (i.e. no caching)
|
||||
CACHES = {
|
||||
'default': {
|
||||
'BACKEND': 'django.core.cache.backends.dummy.DummyCache',
|
||||
}
|
||||
}
|
||||
|
||||
# Make sure we execute correctly regardless of where we're called from
|
||||
execfile(os.path.join(BASE_DIR, "settings.py"))
|
||||
|
||||
@@ -448,7 +455,7 @@ LIVESETTINGS_OPTIONS = {
|
||||
'MIN_TITLE_LENGTH' : 1,
|
||||
'MIN_QUESTION_BODY_LENGTH' : 1,
|
||||
'MIN_ANSWER_BODY_LENGTH' : 1,
|
||||
'WIKI_ON' : True,
|
||||
'WIKI_ON' : False,
|
||||
'ALLOW_ASK_ANONYMOUSLY' : True,
|
||||
'ALLOW_POSTING_BEFORE_LOGGING_IN' : False,
|
||||
'ALLOW_SWAPPING_QUESTION_WITH_ANSWER' : False,
|
||||
@@ -541,16 +548,16 @@ LIVESETTINGS_OPTIONS = {
|
||||
'MIN_REP' : {
|
||||
'MIN_REP_TO_ACCEPT_OWN_ANSWER' : 1,
|
||||
'MIN_REP_TO_ANSWER_OWN_QUESTION' : 1,
|
||||
'MIN_REP_TO_CLOSE_OTHERS_QUESTIONS' : 250,
|
||||
'MIN_REP_TO_CLOSE_OTHERS_QUESTIONS' : 1200,
|
||||
'MIN_REP_TO_CLOSE_OWN_QUESTIONS' : 1,
|
||||
'MIN_REP_TO_DELETE_OTHERS_COMMENTS' : 2000,
|
||||
'MIN_REP_TO_DELETE_OTHERS_POSTS' : 5000,
|
||||
'MIN_REP_TO_EDIT_OTHERS_POSTS' : 2000,
|
||||
'MIN_REP_TO_EDIT_WIKI' : 50,
|
||||
'MIN_REP_TO_DELETE_OTHERS_COMMENTS' : 5000,
|
||||
'MIN_REP_TO_DELETE_OTHERS_POSTS' : 10000,
|
||||
'MIN_REP_TO_EDIT_OTHERS_POSTS' : 5000,
|
||||
'MIN_REP_TO_EDIT_WIKI' : 200,
|
||||
'MIN_REP_TO_FLAG_OFFENSIVE' : 1,
|
||||
'MIN_REP_TO_HAVE_STRONG_URL' : 250,
|
||||
'MIN_REP_TO_LEAVE_COMMENTS' : 1,
|
||||
'MIN_REP_TO_LOCK_POSTS' : 4000,
|
||||
'MIN_REP_TO_LOCK_POSTS' : 10000,
|
||||
'MIN_REP_TO_REOPEN_OWN_QUESTIONS' : 1,
|
||||
'MIN_REP_TO_RETAG_OTHERS_QUESTIONS' : 100,
|
||||
'MIN_REP_TO_UPLOAD_FILES' : 1,
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -6,8 +6,5 @@ body {
|
||||
margin: 0;
|
||||
overflow: hidden; }
|
||||
|
||||
div#enroll p.ie-warning {
|
||||
display: block !important;
|
||||
line-height: 1.3em; }
|
||||
div#enroll form {
|
||||
display: none; }
|
||||
|
||||
@@ -119,8 +119,6 @@ input, select {
|
||||
.wrapper, .subpage, section.copyright, section.tos, section.privacy-policy, section.honor-code, header.announcement div, footer, section.index-content {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
-o-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
margin: 0 auto;
|
||||
max-width: 1400px;
|
||||
@@ -200,8 +198,6 @@ input, select {
|
||||
font-style: normal;
|
||||
-webkit-box-shadow: inset 0 1px 0 #b83d3d;
|
||||
-moz-box-shadow: inset 0 1px 0 #b83d3d;
|
||||
-ms-box-shadow: inset 0 1px 0 #b83d3d;
|
||||
-o-box-shadow: inset 0 1px 0 #b83d3d;
|
||||
box-shadow: inset 0 1px 0 #b83d3d;
|
||||
-webkit-font-smoothing: antialiased; }
|
||||
.button:hover, header.announcement div section.course section a:hover, section.index-content section.course a:hover, section.index-content section.staff a:hover, section.index-content section.about-course section.cta a.enroll:hover {
|
||||
@@ -239,8 +235,6 @@ body a:hover, body a:focus {
|
||||
body input[type="email"], body input[type="number"], body input[type="password"], body input[type="search"], body input[type="tel"], body input[type="text"], body input[type="url"], body input[type="color"], body input[type="date"], body input[type="datetime"], body input[type="datetime-local"], body input[type="month"], body input[type="time"], body input[type="week"], body textarea {
|
||||
-webkit-box-shadow: 0 -1px 0 white;
|
||||
-moz-box-shadow: 0 -1px 0 white;
|
||||
-ms-box-shadow: 0 -1px 0 white;
|
||||
-o-box-shadow: 0 -1px 0 white;
|
||||
box-shadow: 0 -1px 0 white;
|
||||
background-color: #eeeeee;
|
||||
background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #eeeeee), color-stop(100%, white));
|
||||
@@ -385,8 +379,6 @@ header.announcement div section.course section a {
|
||||
border-color: #260d0d;
|
||||
-webkit-box-shadow: inset 0 1px 0 #732626, 0 1px 0 #ac3939;
|
||||
-moz-box-shadow: inset 0 1px 0 #732626, 0 1px 0 #ac3939;
|
||||
-ms-box-shadow: inset 0 1px 0 #732626, 0 1px 0 #ac3939;
|
||||
-o-box-shadow: inset 0 1px 0 #732626, 0 1px 0 #ac3939;
|
||||
box-shadow: inset 0 1px 0 #732626, 0 1px 0 #ac3939;
|
||||
display: block;
|
||||
padding: 12.944px 25.888px;
|
||||
@@ -519,8 +511,6 @@ section.index-content section ul {
|
||||
section.index-content section.about {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
-o-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border-right: 1px solid #e5e5e5;
|
||||
margin-right: 2.513%;
|
||||
@@ -684,8 +674,6 @@ section.index-content section.course h2 {
|
||||
section.index-content section.about-course {
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
-o-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border-right: 1px solid #e5e5e5;
|
||||
margin-right: 2.513%;
|
||||
@@ -761,13 +749,9 @@ div.leanModal_box {
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: 0 0 6px black;
|
||||
-moz-box-shadow: 0 0 6px black;
|
||||
-ms-box-shadow: 0 0 6px black;
|
||||
-o-box-shadow: 0 0 6px black;
|
||||
box-shadow: 0 0 6px black;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
-o-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
display: none;
|
||||
padding: 51.776px; }
|
||||
@@ -847,8 +831,6 @@ div.leanModal_box form ol li input[type="email"], div.leanModal_box form ol li i
|
||||
width: 100%;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
-ms-box-sizing: border-box;
|
||||
-o-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
div.leanModal_box form ol li input[type="checkbox"] {
|
||||
margin-right: 10px; }
|
||||
@@ -870,8 +852,6 @@ div.leanModal_box form input[type="button"], div.leanModal_box form input[type="
|
||||
border-radius: 3px;
|
||||
-webkit-box-shadow: inset 0 1px 0 0 #bc5c5c;
|
||||
-moz-box-shadow: inset 0 1px 0 0 #bc5c5c;
|
||||
-ms-box-shadow: inset 0 1px 0 0 #bc5c5c;
|
||||
-o-box-shadow: inset 0 1px 0 0 #bc5c5c;
|
||||
box-shadow: inset 0 1px 0 0 #bc5c5c;
|
||||
color: white;
|
||||
display: inline;
|
||||
@@ -892,8 +872,6 @@ div.leanModal_box form input[type="button"], div.leanModal_box form input[type="
|
||||
div.leanModal_box form input[type="button"]:hover, div.leanModal_box form input[type="submit"]:hover {
|
||||
-webkit-box-shadow: inset 0 1px 0 0 #a44141;
|
||||
-moz-box-shadow: inset 0 1px 0 0 #a44141;
|
||||
-ms-box-shadow: inset 0 1px 0 0 #a44141;
|
||||
-o-box-shadow: inset 0 1px 0 0 #a44141;
|
||||
box-shadow: inset 0 1px 0 0 #a44141;
|
||||
cursor: pointer;
|
||||
background-color: #823030;
|
||||
@@ -907,8 +885,6 @@ div.leanModal_box form input[type="button"]:active, div.leanModal_box form input
|
||||
border: 1px solid #691b1b;
|
||||
-webkit-box-shadow: inset 0 0 8px 4px #5c1919, inset 0 0 8px 4px #5c1919, 0 1px 1px 0 #eeeeee;
|
||||
-moz-box-shadow: inset 0 0 8px 4px #5c1919, inset 0 0 8px 4px #5c1919, 0 1px 1px 0 #eeeeee;
|
||||
-ms-box-shadow: inset 0 0 8px 4px #5c1919, inset 0 0 8px 4px #5c1919, 0 1px 1px 0 #eeeeee;
|
||||
-o-box-shadow: inset 0 0 8px 4px #5c1919, inset 0 0 8px 4px #5c1919, 0 1px 1px 0 #eeeeee;
|
||||
box-shadow: inset 0 0 8px 4px #5c1919, inset 0 0 8px 4px #5c1919, 0 1px 1px 0 #eeeeee; }
|
||||
|
||||
div#login {
|
||||
@@ -943,40 +919,3 @@ div#feedback_div form ol li {
|
||||
width: 100%; }
|
||||
div#feedback_div form ol li textarea#feedback_message {
|
||||
height: 100px; }
|
||||
|
||||
div#calculator_div {
|
||||
max-width: 500px; }
|
||||
div#calculator_div form {
|
||||
padding-bottom: 25.888px;
|
||||
margin-bottom: 25.888px;
|
||||
border-bottom: 1px solid #ddd; }
|
||||
div#calculator_div form input#calculator_input {
|
||||
width: 400px; }
|
||||
div#calculator_div form input#calculator_button {
|
||||
background: 0;
|
||||
color: #993333;
|
||||
border: 0;
|
||||
-webkit-box-shadow: none;
|
||||
-moz-box-shadow: none;
|
||||
-ms-box-shadow: none;
|
||||
-o-box-shadow: none;
|
||||
box-shadow: none;
|
||||
padding: 0;
|
||||
text-shadow: none; }
|
||||
div#calculator_div form input#calculator_button:hover {
|
||||
color: #333; }
|
||||
div#calculator_div form input#calculator_output {
|
||||
border: 0;
|
||||
background: none;
|
||||
padding: 9.061px;
|
||||
font-size: 24px;
|
||||
width: 378px;
|
||||
font-weight: bold;
|
||||
margin-top: 4px; }
|
||||
div#calculator_div dl dt {
|
||||
float: left;
|
||||
clear: both;
|
||||
padding-right: 12.944px;
|
||||
font-weight: bold; }
|
||||
div#calculator_div dl dd {
|
||||
float: left; }
|
||||
|
||||
BIN
static/images/calc-icon.png
Normal file
BIN
static/images/calc-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 152 B |
BIN
static/images/close-calc-icon.png
Normal file
BIN
static/images/close-calc-icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 231 B |
@@ -1,7 +1,7 @@
|
||||
|
||||
<%inherit file="main.html" />
|
||||
|
||||
<section class="activation">
|
||||
<section class="outside-app">
|
||||
<h1>Page not found</h1>
|
||||
<p>The page that you were looking for was not found. Go back to the <a href="/">homepage</a> or let us know about any pages that may have been moved at <a href="mailto:technical@mitx.mit.edu">technical@mitx.mit.edu</a>.</p>
|
||||
</section>
|
||||
|
||||
10
templates/activation_email.txt
Normal file
10
templates/activation_email.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
Someone, hopefully you, signed up for an account for MITx's on-line
|
||||
offering of 6.002 using this email address. If it was you, and you'd
|
||||
like to activate and use your account, copy and paste this address
|
||||
into your web browser's address bar:
|
||||
|
||||
http://${ site }/activate/${ key }
|
||||
|
||||
If you didn't request this, you don't need to do anything; you won't
|
||||
receive any more email from us. Please do not reply to this e-mail; if
|
||||
you require assistance, check the help section of the MITx web site.
|
||||
1
templates/activation_email_subject.txt
Normal file
1
templates/activation_email_subject.txt
Normal file
@@ -0,0 +1 @@
|
||||
Your account for MITx's on-line 6.002
|
||||
@@ -1,4 +1,5 @@
|
||||
<%inherit file="main.html" />
|
||||
<%block name="title"><title>Courseware – MITx 6.002x</title></%block>
|
||||
|
||||
<%block name="js_extra">
|
||||
<!-- TODO: http://docs.jquery.com/Plugins/Validation -->
|
||||
@@ -7,7 +8,7 @@
|
||||
${init}
|
||||
|
||||
$(".sequence-nav li a").hover(function(){
|
||||
$(this).siblings().toggle();
|
||||
$(this).siblings().toggleClass("shown");
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<%inherit file="main.html" />
|
||||
<%block name="title"><title>Help - MITx 6.002x</title></%block>
|
||||
|
||||
<%include file="navigation.html" args="active_page='help'"/>
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<%inherit file="main.html" />
|
||||
<%block name="title"><title>Course Info - MITx 6.002x</title></%block>
|
||||
|
||||
<%include file="navigation.html" args="active_page='info'" />
|
||||
|
||||
|
||||
@@ -52,7 +52,32 @@
|
||||
</ul>
|
||||
<ul>
|
||||
<li><a href="#feedback_div" rel="leanModal">Feedback</a></li>
|
||||
<li><a href="#calculator_div" rel="leanModal">Calculator</a></li>
|
||||
<li class="calc-main">
|
||||
<a href="#" class="calc">Calculator</a>
|
||||
|
||||
<div id="calculator_wrapper">
|
||||
<form id="calculator">
|
||||
<input type="text" id="calculator_input" />
|
||||
<dl class="help">
|
||||
<dt>Suffixes:</dt>
|
||||
<dd> %kMGTcmunp</dd>
|
||||
<dt>Operations:</dt>
|
||||
<dd>^ * / + - ()</dd>
|
||||
<dt>Functions:</dt>
|
||||
<dd>sin, cos, tan, sqrt, log10, log2, ln, arccos, arcsin, arctan, abs </dd>
|
||||
<dt>Constants</dt>
|
||||
<dd>e, pi</dd>
|
||||
|
||||
<!-- Students won't know what parallel means at this time. Complex numbers aren't well tested in the courseware, so we would prefer to not expose them. If you read the comments in the source, feel free to use them. If you run into a bug, please let us know. But we can't officially support them right now.
|
||||
|
||||
<dt>Unsupported:</dt> <dd>||, j </dd> -->
|
||||
</dl>
|
||||
<input id="calculator_button" type="submit" value="="/>
|
||||
<input type="text" id="calculator_output" readonly />
|
||||
</form>
|
||||
|
||||
</div>
|
||||
</li>
|
||||
<li><a href="/s/help.html">Help</a></li>
|
||||
<li><a href="/logout">Log out</a></li>
|
||||
</ul>
|
||||
@@ -60,6 +85,7 @@
|
||||
</footer>
|
||||
|
||||
<div id="feedback_div" class="leanModal_box">
|
||||
<h1>Feedback for MITx</h1>
|
||||
<p>Found a bug? Got an idea for improving our system? Let us know.</p>
|
||||
|
||||
<form>
|
||||
@@ -72,28 +98,6 @@
|
||||
|
||||
</div>
|
||||
|
||||
<div id="calculator_div" class="leanModal_box">
|
||||
<form id="calculator">
|
||||
<input type="text" id="calculator_input">
|
||||
<input id="calculator_button" type="submit" value="=">
|
||||
<input type="text" id="calculator_output" readonly>
|
||||
</form>
|
||||
|
||||
<dl>
|
||||
<dt>Suffixes:</dt>
|
||||
<dd> %kMGTcmunp</dd>
|
||||
<dt>Operations:</dt>
|
||||
<dd>^ * / + - ()</dd>
|
||||
<dt>Functions:</dt>
|
||||
<dd>sin, cos, tan, sqrt, log10, log2, ln, arccos, arcsin, arctan, abs </dd>
|
||||
<dt>Constants</dt>
|
||||
<dd>e, pi</dd>
|
||||
|
||||
<!-- Students won't know what parallel means at this time. Complex numbers aren't well tested in the courseware, so we would prefer to not expose them. If you read the comments in the source, feel free to use them. If you run into a bug, please let us know. But we can't officially support them right now.
|
||||
|
||||
<dt>Unsupported:</dt> <dd>||, j </dd> -->
|
||||
</dl>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript" src="${ settings.LIB_URL }jquery.treeview.js"></script>
|
||||
<script type="text/javascript" src="/static/js/jquery.leanModal.min.js"></script>
|
||||
@@ -120,6 +124,15 @@ $(function() {
|
||||
|
||||
// Calculator
|
||||
$(function() {
|
||||
|
||||
$("#calculator_wrapper").hide();
|
||||
|
||||
$(".calc").click(function(){
|
||||
$("#calculator_wrapper").slideToggle();
|
||||
$("#calculator_wrapper #calculator_input").focus();
|
||||
$(this).toggleClass("closed");
|
||||
});
|
||||
|
||||
$("form#calculator").submit(function(e){
|
||||
e.preventDefault();
|
||||
$.getJSON("/calculate", {"equation":$("#calculator_input").attr("value")},
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<%inherit file="main.html" />
|
||||
<%block name="title"><title>Profile - MITx 6.002x</title></%block>
|
||||
|
||||
<%!
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
@@ -1,4 +1,20 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Reset password - MITx 6.002x</title>
|
||||
|
||||
<link rel="stylesheet" href="/static/css/application.css" type="text/css" media="all" />
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="/static/js/html5shiv.js"></script>
|
||||
<![endif]-->
|
||||
|
||||
</head>
|
||||
|
||||
<body>
|
||||
|
||||
{% block content %}
|
||||
<section class="outside-app">
|
||||
|
||||
{% if validlink %}
|
||||
|
||||
@@ -22,4 +38,8 @@
|
||||
|
||||
{% endif %}
|
||||
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -8,7 +8,7 @@ We are also using Bourbon with sass. They are a generic set of mixins, and funct
|
||||
To use bourbon you need to install it with:
|
||||
$ gem install bourbon
|
||||
|
||||
Then to generate Sass files cd to templates directory and watch the sass files for developement:
|
||||
Then to generate Sass files cd to templates directory and watch the sass files for development:
|
||||
$ sass --watch sass:../static/css/ -r ./sass/bourbon/lib/bourbon.rb
|
||||
|
||||
To generate a compressed css file for production:
|
||||
|
||||
@@ -21,12 +21,12 @@ div.info-wrapper {
|
||||
@extend .clearfix;
|
||||
border-bottom: 1px solid #e3e3e3;
|
||||
|
||||
&:first-child {
|
||||
padding: lh(.5);
|
||||
margin-left: (-(lh(.5)));
|
||||
background: $cream;
|
||||
border-bottom: 1px solid darken($cream, 10%);
|
||||
}
|
||||
// &:first-child {
|
||||
// padding: lh(.5);
|
||||
// margin-left: (-(lh(.5)));
|
||||
// background: $cream;
|
||||
// border-bottom: 1px solid darken($cream, 10%);
|
||||
// }
|
||||
|
||||
h2 {
|
||||
float: left;
|
||||
@@ -39,6 +39,10 @@ div.info-wrapper {
|
||||
width: flex-grid(7, 9);
|
||||
margin-bottom: 0;
|
||||
|
||||
li {
|
||||
margin-bottom: lh(.5);
|
||||
}
|
||||
|
||||
p {
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
// Base layout
|
||||
@import "base/reset", "base/font-face";
|
||||
@import "base/variables", "base/functions", "base/extends", "base/base";
|
||||
@import "layout/layout", "layout/header", "layout/footer", "layout/leanmodal";
|
||||
@import "layout/layout", "layout/header", "layout/footer", "layout/calculator", "layout/leanmodal";
|
||||
@import "plugins/jquery-ui-1.8.16.custom";
|
||||
|
||||
// pages
|
||||
|
||||
@@ -61,8 +61,13 @@ a {
|
||||
text-decoration:none;
|
||||
}
|
||||
|
||||
p &, li > &, span > &, .inline {
|
||||
border-bottom: 1px solid #bbb;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
&:hover, &:focus {
|
||||
text-decoration:underline;
|
||||
color: #000;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -74,11 +74,16 @@ h1.top-header {
|
||||
|
||||
h1, h2 {
|
||||
font-size: 18px;
|
||||
font-weight: 800;
|
||||
font-weight: bold;
|
||||
letter-spacing: 0;
|
||||
text-transform: none;
|
||||
}
|
||||
|
||||
a {
|
||||
font-style: normal;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.bottom-border {
|
||||
@include box-shadow(0 1px 0 #eee);
|
||||
border-bottom: 1px solid #d3d3d3;
|
||||
@@ -180,6 +185,7 @@ h1.top-header {
|
||||
}
|
||||
|
||||
a {
|
||||
border-bottom: 0;
|
||||
color: darken($cream, 80%);
|
||||
|
||||
&:hover {
|
||||
|
||||
@@ -20,3 +20,9 @@
|
||||
@function lh($amount: 1) {
|
||||
@return $body-line-height * $amount;
|
||||
}
|
||||
|
||||
@mixin hide-text(){
|
||||
text-indent: -9999px;
|
||||
overflow: hidden;
|
||||
display: block;
|
||||
}
|
||||
|
||||
6
templates/sass/bourbon/_bourbon.scss
vendored
6
templates/sass/bourbon/_bourbon.scss
vendored
@@ -1,7 +1,11 @@
|
||||
// Custom Functions
|
||||
@import "functions/deprecated-webkit-gradient";
|
||||
@import "functions/flex-grid";
|
||||
@import "functions/grid-width";
|
||||
@import "functions/linear-gradient";
|
||||
@import "functions/modular-scale";
|
||||
@import "functions/radial-gradient";
|
||||
@import "functions/render-gradients";
|
||||
@import "functions/tint-shade";
|
||||
|
||||
// CSS3 Mixins
|
||||
@@ -20,9 +24,11 @@
|
||||
@import "css3/radial-gradient";
|
||||
@import "css3/transform";
|
||||
@import "css3/transition";
|
||||
@import "css3/user-select";
|
||||
|
||||
// Addons & other mixins
|
||||
@import "addons/button";
|
||||
@import "addons/clearfix";
|
||||
@import "addons/font-family";
|
||||
@import "addons/html5-input-types";
|
||||
@import "addons/position";
|
||||
|
||||
29
templates/sass/bourbon/addons/_clearfix.scss
vendored
Normal file
29
templates/sass/bourbon/addons/_clearfix.scss
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
// Micro clearfix provides an easy way to contain floats without adding additional markup
|
||||
//
|
||||
// Example usage:
|
||||
//
|
||||
// // Contain all floats within .wrapper
|
||||
// .wrapper {
|
||||
// @include clearfix;
|
||||
// .content,
|
||||
// .sidebar {
|
||||
// float : left;
|
||||
// }
|
||||
// }
|
||||
|
||||
@mixin clearfix {
|
||||
zoom: 1;
|
||||
|
||||
&:before,
|
||||
&:after {
|
||||
content: "";
|
||||
display: table;
|
||||
}
|
||||
|
||||
&:after {
|
||||
clear: both;
|
||||
}
|
||||
}
|
||||
|
||||
// Acknowledgements
|
||||
// Micro clearfix: [Nicolas Gallagher](http://nicolasgallagher.com/micro-clearfix-hack/)
|
||||
@@ -2,8 +2,6 @@
|
||||
// Background-image property for adding multiple background images with
|
||||
// gradients, or for stringing multiple gradients together.
|
||||
//************************************************************************//
|
||||
@import "../functions/linear-gradient";
|
||||
@import "../functions/radial-gradient";
|
||||
|
||||
@mixin background-image(
|
||||
$image-1 , $image-2: false,
|
||||
@@ -50,18 +48,6 @@
|
||||
}
|
||||
|
||||
|
||||
@function render-gradients($gradients, $gradient-type, $vendor: false) {
|
||||
$vendor-gradients: false;
|
||||
@if $vendor {
|
||||
$vendor-gradients: -#{$vendor}-#{$gradient-type}-gradient($gradients);
|
||||
}
|
||||
|
||||
@else if $vendor == false {
|
||||
$vendor-gradients: "#{$gradient-type}-gradient(#{$gradients})";
|
||||
$vendor-gradients: unquote($vendor-gradients);
|
||||
}
|
||||
@return $vendor-gradients;
|
||||
}
|
||||
|
||||
//Examples:
|
||||
//@include background-image(linear-gradient(top, orange, red));
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
@mixin border-top-left-radius($radii) {
|
||||
-webkit-border-top-left-radius: $radii;
|
||||
-moz-border-top-left-radius: $radii;
|
||||
-moz-border-radius-topleft: $radii;
|
||||
-ms-border-top-left-radius: $radii;
|
||||
-o-border-top-left-radius: $radii;
|
||||
border-top-left-radius: $radii;
|
||||
@@ -17,6 +18,7 @@
|
||||
@mixin border-top-right-radius($radii) {
|
||||
-webkit-border-top-right-radius: $radii;
|
||||
-moz-border-top-right-radius: $radii;
|
||||
-moz-border-radius-topright: $radii;
|
||||
-ms-border-top-right-radius: $radii;
|
||||
-o-border-top-right-radius: $radii;
|
||||
border-top-right-radius: $radii;
|
||||
@@ -25,6 +27,7 @@
|
||||
@mixin border-bottom-left-radius($radii) {
|
||||
-webkit-border-bottom-left-radius: $radii;
|
||||
-moz-border-bottom-left-radius: $radii;
|
||||
-moz-border-radius-bottomleft: $radii;
|
||||
-ms-border-bottom-left-radius: $radii;
|
||||
-o-border-bottom-left-radius: $radii;
|
||||
border-bottom-left-radius: $radii;
|
||||
@@ -33,6 +36,7 @@
|
||||
@mixin border-bottom-right-radius($radii) {
|
||||
-webkit-border-bottom-right-radius: $radii;
|
||||
-moz-border-bottom-right-radius: $radii;
|
||||
-moz-border-radius-bottomright: $radii;
|
||||
-ms-border-bottom-right-radius: $radii;
|
||||
-o-border-bottom-right-radius: $radii;
|
||||
border-bottom-right-radius: $radii;
|
||||
|
||||
2
templates/sass/bourbon/css3/_box-shadow.scss
vendored
2
templates/sass/bourbon/css3/_box-shadow.scss
vendored
@@ -10,7 +10,5 @@
|
||||
|
||||
-webkit-box-shadow: $full;
|
||||
-moz-box-shadow: $full;
|
||||
-ms-box-shadow: $full;
|
||||
-o-box-shadow: $full;
|
||||
box-shadow: $full;
|
||||
}
|
||||
|
||||
2
templates/sass/bourbon/css3/_box-sizing.scss
vendored
2
templates/sass/bourbon/css3/_box-sizing.scss
vendored
@@ -2,7 +2,5 @@
|
||||
// content-box | border-box | inherit
|
||||
-webkit-box-sizing: $box;
|
||||
-moz-box-sizing: $box;
|
||||
-ms-box-sizing: $box;
|
||||
-o-box-sizing: $box;
|
||||
box-sizing: $box;
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
$fallback-color: nth($G1, 1);
|
||||
|
||||
// If $fallback is a color use that color as the fallback color
|
||||
@if type-of($fallback) == color {
|
||||
@if (type-of($fallback) == color) or ($fallback == "transparent") {
|
||||
$fallback-color: $fallback;
|
||||
}
|
||||
|
||||
|
||||
@@ -4,11 +4,20 @@
|
||||
$G3: false, $G4: false,
|
||||
$G5: false, $G6: false,
|
||||
$G7: false, $G8: false,
|
||||
$G9: false, $G10: false) {
|
||||
$G9: false, $G10: false,
|
||||
$fallback: false) {
|
||||
|
||||
$full: compact($G1, $G2, $G3, $G4, $G5, $G6, $G7, $G8, $G9, $G10);
|
||||
|
||||
background-color: nth($G1, 1);
|
||||
// Set $G1 as the default fallback color
|
||||
$fallback-color: nth($G1, 1);
|
||||
|
||||
// If $fallback is a color use that color as the fallback color
|
||||
@if (type-of($fallback) == color) or ($fallback == "transparent") {
|
||||
$fallback-color: $fallback;
|
||||
}
|
||||
|
||||
background-color: $fallback-color;
|
||||
background-image: deprecated-webkit-gradient(radial, $full); // Safari <= 5.0
|
||||
background-image: -webkit-radial-gradient($pos, $shape-size, $full);
|
||||
background-image: -moz-radial-gradient($pos, $shape-size, $full);
|
||||
|
||||
6
templates/sass/bourbon/css3/_user-select.scss
vendored
Normal file
6
templates/sass/bourbon/css3/_user-select.scss
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
@mixin user-select($arg: none) {
|
||||
-webkit-user-select: $arg;
|
||||
-moz-user-select: $arg;
|
||||
-ms-user-select: $arg;
|
||||
user-select: $arg;
|
||||
}
|
||||
35
templates/sass/bourbon/functions/_flex-grid.scss
vendored
Normal file
35
templates/sass/bourbon/functions/_flex-grid.scss
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
// Flexible grid
|
||||
@function flex-grid($columns, $container-columns: $fg-max-columns) {
|
||||
$width: $columns * $fg-column + ($columns - 1) * $fg-gutter;
|
||||
$container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter;
|
||||
@return percentage($width / $container-width);
|
||||
}
|
||||
|
||||
// Flexible gutter
|
||||
@function flex-gutter($container-columns: $fg-max-columns, $gutter: $fg-gutter) {
|
||||
$container-width: $container-columns * $fg-column + ($container-columns - 1) * $fg-gutter;
|
||||
@return percentage($gutter / $container-width);
|
||||
}
|
||||
|
||||
// The $fg-column, $fg-gutter and $fg-max-columns variables must be defined in your base stylesheet to properly use the flex-grid function.
|
||||
// This function takes the fluid grid equation (target / context = result) and uses columns to help define each.
|
||||
//
|
||||
// $fg-column: 60px; // Column Width
|
||||
// $fg-gutter: 25px; // Gutter Width
|
||||
// $fg-max-columns: 12; // Total Columns For Main Container
|
||||
//
|
||||
// div {
|
||||
// width: flex-grid(4); // returns (315px / 1020px) = 30.882353%;
|
||||
// margin-left: flex-gutter(); // returns (25px / 1020px) = 2.45098%;
|
||||
//
|
||||
// p {
|
||||
// width: flex-grid(2, 4); // returns (145px / 315px) = 46.031746%;
|
||||
// float: left;
|
||||
// margin: flex-gutter(4); // returns (25px / 315px) = 7.936508%;
|
||||
// }
|
||||
//
|
||||
// blockquote {
|
||||
// float: left;
|
||||
// width: flex-grid(2, 4); // returns (145px / 315px) = 46.031746%;
|
||||
// }
|
||||
// }
|
||||
14
templates/sass/bourbon/functions/_render-gradients.scss
vendored
Normal file
14
templates/sass/bourbon/functions/_render-gradients.scss
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
// User for linear and radial gradients within background-image or border-image properties
|
||||
|
||||
@function render-gradients($gradients, $gradient-type, $vendor: false) {
|
||||
$vendor-gradients: false;
|
||||
@if $vendor {
|
||||
$vendor-gradients: -#{$vendor}-#{$gradient-type}-gradient($gradients);
|
||||
}
|
||||
|
||||
@else if $vendor == false {
|
||||
$vendor-gradients: "#{$gradient-type}-gradient(#{$gradients})";
|
||||
$vendor-gradients: unquote($vendor-gradients);
|
||||
}
|
||||
@return $vendor-gradients;
|
||||
}
|
||||
@@ -54,6 +54,7 @@ nav.sequence-nav {
|
||||
padding: 15px 4px 14px;
|
||||
width: 28px;
|
||||
height: 17px;
|
||||
@include transition(all, .4s, $ease-in-out-quad);
|
||||
|
||||
// @media screen and (max-width: 800px) {
|
||||
// padding: 12px 8px;
|
||||
@@ -118,16 +119,24 @@ nav.sequence-nav {
|
||||
}
|
||||
|
||||
p {
|
||||
position: absolute;
|
||||
display: none;
|
||||
// display: none;
|
||||
// visibility: hidden;
|
||||
background: #333;
|
||||
padding: 6px;
|
||||
white-space: pre-wrap;
|
||||
z-index: 99;
|
||||
margin: 4px 0 0 -5px;
|
||||
text-shadow: 0 -1px 0 #000;
|
||||
color: #fff;
|
||||
line-height: lh();
|
||||
margin: 0px 0 0 -5px;
|
||||
opacity: 0;
|
||||
padding: 6px;
|
||||
position: absolute;
|
||||
text-shadow: 0 -1px 0 #000;
|
||||
@include transition(all, .6s, $ease-in-out-quart);
|
||||
white-space: pre-wrap;
|
||||
z-index: 99;
|
||||
|
||||
&.shown {
|
||||
opacity: 1;
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
&:empty {
|
||||
background: none;
|
||||
@@ -146,7 +155,6 @@ nav.sequence-nav {
|
||||
top: -5px;
|
||||
left: 18px;
|
||||
@include transform(rotate(45deg));
|
||||
@include transition();
|
||||
width: 10px;
|
||||
}
|
||||
}
|
||||
@@ -215,15 +223,24 @@ nav.sequence-nav {
|
||||
|
||||
|
||||
section.course-content {
|
||||
position: relative;
|
||||
|
||||
div#seq_content {
|
||||
margin-bottom: 60px;
|
||||
}
|
||||
|
||||
nav.sequence-bottom {
|
||||
margin-bottom: -(lh());
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
right: 50%;
|
||||
margin-right: -53px;
|
||||
|
||||
ul {
|
||||
@extend .clearfix;
|
||||
background-color: darken(#F6EFD4, 5%);
|
||||
border: 1px solid darken(#f6efd4, 20%);
|
||||
border-bottom: 0;
|
||||
@include border-radius(3px 3px 0 0);
|
||||
margin: lh() auto 0;
|
||||
overflow: hidden;
|
||||
width: 106px;
|
||||
background-color: darken($cream, 5%);
|
||||
@@ -238,22 +255,25 @@ section.course-content {
|
||||
a {
|
||||
background-position: center center;
|
||||
background-repeat: no-repeat;
|
||||
border-bottom: none;
|
||||
display: block;
|
||||
padding: lh(.75) 4px;
|
||||
text-indent: -9999px;
|
||||
width: 45px;
|
||||
display: block;
|
||||
@include transition(all, .4s, $ease-in-out-quad);
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
color: darken($cream, 60%);
|
||||
text-decoration: none;
|
||||
opacity: .5;
|
||||
background-color: darken($cream, 10%);
|
||||
color: darken(#F6EFD4, 60%);
|
||||
color: darken($cream, 60%);
|
||||
opacity: .5;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
&.disabled {
|
||||
opacity: .4;
|
||||
background-color: lighten($cream, 10%);
|
||||
opacity: .4;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -34,16 +34,37 @@ section.course-index {
|
||||
ul.ui-accordion-content {
|
||||
@include border-radius(0);
|
||||
@include box-shadow( inset -1px 0 0 #e6e6e6);
|
||||
background: #d6d6d6;
|
||||
background: #dadada;
|
||||
border: none;
|
||||
border-bottom: 1px solid #c3c3c3;
|
||||
font-size: 12px;
|
||||
margin: 0;
|
||||
overflow: hidden;
|
||||
// overflow: visible;
|
||||
|
||||
li {
|
||||
position: relative;
|
||||
|
||||
&.active {
|
||||
font-weight: bold;
|
||||
|
||||
p.subtitle {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
// &:after {
|
||||
// content: " ";
|
||||
// width: 16px;
|
||||
// height: 16px;
|
||||
// position: absolute;
|
||||
// right: -35px;
|
||||
// top: 7px;
|
||||
// display: block;
|
||||
// background-color: #dadada;
|
||||
// border-top: 1px solid #c3c3c3;
|
||||
// border-right: 1px solid #c3c3c3;
|
||||
// z-index: 99;
|
||||
// @include transform(rotate(45deg));
|
||||
// }
|
||||
}
|
||||
|
||||
a {
|
||||
|
||||
@@ -95,6 +95,7 @@ section.course-content {
|
||||
|
||||
a {
|
||||
@include box-shadow(1px 0 0 #555);
|
||||
border-bottom: none;
|
||||
border-right: 1px solid #000;
|
||||
display: block;
|
||||
cursor: pointer;
|
||||
@@ -141,20 +142,13 @@ section.course-content {
|
||||
line-height: 46px; //height of play pause buttons
|
||||
margin-right: 0;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
opacity: .7;
|
||||
@include transition();
|
||||
|
||||
h3 {
|
||||
@include inline-block();
|
||||
|
||||
a {
|
||||
color: #fff;
|
||||
padding: 0 lh(.5);
|
||||
@include inline-block();
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
// background-color: #444;
|
||||
}
|
||||
}
|
||||
padding: 0 lh(.5);
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
// fix for now
|
||||
@@ -164,13 +158,23 @@ section.course-content {
|
||||
|
||||
li {
|
||||
cursor: pointer;
|
||||
color: #fff;
|
||||
@include inline-block();
|
||||
|
||||
&.active {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: #aaa;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
opacity: 1;
|
||||
background-color: #444;
|
||||
}
|
||||
}
|
||||
|
||||
a.hide-subtitles {
|
||||
@@ -184,6 +188,7 @@ section.course-content {
|
||||
font-weight: 800;
|
||||
background: url('/static/images/cc.png') 16px center no-repeat;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
@include transition();
|
||||
|
||||
&:hover {
|
||||
color: #fff;
|
||||
|
||||
@@ -125,6 +125,7 @@ div.paginator {
|
||||
a {
|
||||
color: #555;
|
||||
text-decoration: none;
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,7 +23,10 @@
|
||||
font-weight: normal;
|
||||
@include border-radius(4px 4px 0 0);
|
||||
}
|
||||
|
||||
a {
|
||||
color: #fb7321;
|
||||
text-decoration: underline;
|
||||
font-weight: bold; } }
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -64,7 +64,6 @@ div.question-header {
|
||||
overflow: hidden;
|
||||
padding: 5px 0 10px;
|
||||
|
||||
|
||||
div.tag-list {
|
||||
display: inline-block;
|
||||
float:left;
|
||||
@@ -79,7 +78,6 @@ div.question-header {
|
||||
width: flex-grid(4,8);
|
||||
|
||||
a {
|
||||
|
||||
&.question-delete {
|
||||
color: $mit-red;
|
||||
text-decoration: none;
|
||||
@@ -122,6 +120,11 @@ div.question-header {
|
||||
width: 20%;
|
||||
border-left: 1px dashed #ddd;
|
||||
|
||||
a {
|
||||
border-bottom: none;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
div.post-update-info {
|
||||
@include box-sizing(border-box);
|
||||
padding: 10px;
|
||||
@@ -140,10 +143,6 @@ div.question-header {
|
||||
}
|
||||
}
|
||||
|
||||
a {
|
||||
color:$mit-red ;
|
||||
}
|
||||
|
||||
div.change-date {
|
||||
font-size: 12px;
|
||||
margin-bottom: 2px;
|
||||
@@ -327,6 +326,7 @@ div.question-header {
|
||||
div.controls {
|
||||
border-top: 1px solid #efefef;
|
||||
text-align: right;
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
font-size: 12px;
|
||||
|
||||
@@ -51,6 +51,8 @@ ul.tags {
|
||||
a {
|
||||
color: #555;
|
||||
text-decoration: none;
|
||||
border-bottom: none;
|
||||
font-style: normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
103
templates/sass/layout/_calculator.scss
Normal file
103
templates/sass/layout/_calculator.scss
Normal file
@@ -0,0 +1,103 @@
|
||||
li.calc-main {
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
|
||||
a.calc {
|
||||
@include hide-text;
|
||||
background: url("/static/images/calc-icon.png") rgba(#111, .9) no-repeat center;
|
||||
border-bottom: 0;
|
||||
color: #fff;
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
@include border-radius(3px 3px 0 0);
|
||||
@include inline-block;
|
||||
padding: 8px 12px;
|
||||
width: 16px;
|
||||
height: 20px;
|
||||
|
||||
&:hover {
|
||||
opacity: .8;
|
||||
}
|
||||
|
||||
&.closed {
|
||||
background-image: url("/static/images/close-calc-icon.png");
|
||||
}
|
||||
}
|
||||
|
||||
div#calculator_wrapper {
|
||||
background: rgba(#111, .9);
|
||||
clear: both;
|
||||
|
||||
form {
|
||||
padding: lh();
|
||||
@extend .clearfix;
|
||||
|
||||
input#calculator_input {
|
||||
border: none;
|
||||
@include box-shadow(none);
|
||||
@include box-sizing(border-box);
|
||||
font-size: 16px;
|
||||
padding: 10px;
|
||||
width: flex-grid(7.5);
|
||||
margin: 0;
|
||||
float: left;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
input#calculator_button {
|
||||
background: #111;
|
||||
border: 1px solid #000;
|
||||
@include border-radius(0);
|
||||
@include box-shadow(none);
|
||||
@include box-sizing(border-box);
|
||||
color: #fff;
|
||||
font-size: 30px;
|
||||
font-weight: bold;
|
||||
padding: 0;
|
||||
text-shadow: none;
|
||||
width: flex-grid(.5) + flex-gutter();
|
||||
float: left;
|
||||
margin: 0 (flex-gutter() / 2);
|
||||
|
||||
&:hover {
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
input#calculator_output {
|
||||
background: #222;
|
||||
border: 0;
|
||||
@include box-shadow(none);
|
||||
@include box-sizing(border-box);
|
||||
color: #fff;
|
||||
float: left;
|
||||
font-size: 16px;
|
||||
font-weight: bold;
|
||||
margin: 1px 0 0;
|
||||
padding: 10px;
|
||||
width: flex-grid(4);
|
||||
}
|
||||
}
|
||||
|
||||
dl {
|
||||
display: none;
|
||||
|
||||
dt {
|
||||
clear: both;
|
||||
float: left;
|
||||
font-weight: bold;
|
||||
padding-right: lh(.5);
|
||||
}
|
||||
|
||||
dd {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -72,6 +72,7 @@ footer {
|
||||
height: 29px;
|
||||
width: 28px;
|
||||
text-indent: -9999px;
|
||||
border-bottom: 0;
|
||||
|
||||
&:hover {
|
||||
opacity: .8;
|
||||
|
||||
@@ -52,7 +52,7 @@ div.header-wrapper {
|
||||
|
||||
a {
|
||||
color: #fff;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
|
||||
&:hover {
|
||||
color: rgba(#fff, .7);
|
||||
@@ -104,7 +104,8 @@ div.header-wrapper {
|
||||
display: block;
|
||||
font-weight: bold;
|
||||
padding: 10px lh() 8px;
|
||||
text-decoration: none;
|
||||
border: none;
|
||||
font-style: normal;
|
||||
|
||||
@media screen and (max-width: 1020px) {
|
||||
padding: 10px lh(.7) 8px;
|
||||
|
||||
@@ -29,5 +29,15 @@ html {
|
||||
margin-top: lh(.5);
|
||||
}
|
||||
}
|
||||
|
||||
section.outside-app {
|
||||
@extend .main-content;
|
||||
max-width: 600px;
|
||||
padding: lh();
|
||||
|
||||
#{$all-text-inputs} {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -244,52 +244,3 @@ div#feedback_div{
|
||||
}
|
||||
}
|
||||
|
||||
div#calculator_div {
|
||||
max-width: 500px;
|
||||
|
||||
form {
|
||||
padding-bottom: lh();
|
||||
margin-bottom: lh();
|
||||
border-bottom: 1px solid #ddd;
|
||||
|
||||
input#calculator_input {
|
||||
width: 400px;
|
||||
}
|
||||
|
||||
input#calculator_button {
|
||||
background: 0;
|
||||
color: $mit-red;
|
||||
border: 0;
|
||||
@include box-shadow(none);
|
||||
padding: 0;
|
||||
text-shadow: none;
|
||||
|
||||
&:hover {
|
||||
color: #333;
|
||||
}
|
||||
}
|
||||
|
||||
input#calculator_output {
|
||||
border: 0;
|
||||
background: none;
|
||||
padding: lh(.35);
|
||||
font-size: 24px;
|
||||
width: 378px;
|
||||
font-weight: bold;
|
||||
margin-top: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
dl {
|
||||
dt {
|
||||
float: left;
|
||||
clear: both;
|
||||
padding-right: lh(.5);
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
dd {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%inherit file="main.html" />
|
||||
|
||||
<section class="activation">
|
||||
<section class="outside-app">
|
||||
<h1>Currently the <em>MITx</em> servers are down</h1>
|
||||
<p>Our staff is currently working to get the site back up as soon as possible. Please email us at <a href="mailto:technical@mitx.mit.edu">technical@mitx.mit.edu</a> to report any problems or downtime.</p>
|
||||
</section>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%inherit file="main.html" />
|
||||
|
||||
<section class="activation">
|
||||
<section class="outside-app">
|
||||
<h1>There has been an error on the <em>MITx</em> servers</h1>
|
||||
<p>Our staff is currently working to get the site back up as soon as possible. Please email us at <a href="mailto:technical@mitx.mit.edu">technical@mitx.mit.edu</a> to report any problems or downtime.</p>
|
||||
</section>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<%inherit file="main.html" />
|
||||
|
||||
<section class="activation">
|
||||
<section class="outside-app">
|
||||
<h1>Currently the <em>MITx</em> servers are overloaded</h1>
|
||||
<p>Our staff is currently working to get the site back up as soon as possible. Please email us at <a href="mailto:technical@mitx.mit.edu">technical@mitx.mit.edu</a> to report any problems or downtime.</p>
|
||||
</section>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<%inherit file="simplewiki_base.html"/>
|
||||
|
||||
<%block name="title"><title>Create Article - MITx 6.002x Wiki</title></%block>
|
||||
<%block name="title"><title>Wiki – Create Article – MITx 6.002x</title></%block>
|
||||
|
||||
<%block name="wiki_page_title">
|
||||
<h1>Create article</h1>
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
from django.core.urlresolvers import reverse
|
||||
%>
|
||||
|
||||
<%block name="title"><title>Oops... - MITx 6.002x Wiki</title></%block>
|
||||
<%block name="title"><title>Wiki Error – MITx 6.002x</title></%block>
|
||||
|
||||
|
||||
<%block name="wiki_page_title">
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<%inherit file="simplewiki_base.html"/>
|
||||
|
||||
<%block name="title"><title>${"Revision history of " + wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITx 6.002x Wiki</title></%block>
|
||||
<%block name="title"><title>${"Revision history of " + wiki_title + " - " if wiki_title is not UNDEFINED else ""}Wiki – MITx 6.002x</title></%block>
|
||||
|
||||
<%!
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<%inherit file="simplewiki_base.html"/>
|
||||
|
||||
<%block name="title"><title>Revision feed - MITx 6.002x Wiki</title></%block>
|
||||
<%block name="title"><title>Wiki - Revision feed - MITx 6.002x</title></%block>
|
||||
|
||||
<%!
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<%inherit file="simplewiki_base.html"/>
|
||||
|
||||
<%block name="title"><title>Search Results - MITx 6.002x Wiki</title></%block>
|
||||
<%block name="title"><title>Wiki - Search Results - MITx 6.002x</title></%block>
|
||||
|
||||
<%!
|
||||
from django.core.urlresolvers import reverse
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<%inherit file="simplewiki_base.html"/>
|
||||
|
||||
<%block name="title"><title>${wiki_title + " - " if wiki_title is not UNDEFINED else ""}MITx 6.002x Wiki</title></%block>
|
||||
<%block name="title"><title>${wiki_title + " - " if wiki_title is not UNDEFINED else ""}Wiki – MITx 6.002x</title></%block>
|
||||
|
||||
<%block name="wiki_page_title">
|
||||
<h1>${ wiki_article.title } ${'<span style="color: red;">- Deleted Revision!</span>' if wiki_current_revision_deleted else ''}</h1>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<%inherit file="main.html" />
|
||||
<%block name="title"><title>Textbook – MITx 6.002x</title></%block>
|
||||
|
||||
<%block name="js_extra">
|
||||
<script>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<%inherit file="main.html" />
|
||||
<%block name="title"><title>Textbook – MITx 6.002x</title></%block>
|
||||
|
||||
<div id="bodyContent">
|
||||
<%include file="navigation.html" />
|
||||
|
||||
@@ -28,11 +28,11 @@
|
||||
|
||||
<div class="secondary-controls">
|
||||
<div class="speeds">
|
||||
<h3><a href="#">Speed</a></h3>
|
||||
<h3>Speed</h3>
|
||||
<ol id="video_speeds"></ol>
|
||||
</div>
|
||||
|
||||
<a href="#" class="hide-subtitles">on</a>
|
||||
<a href="#" class="hide-subtitles">turn off</a>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
@@ -66,7 +66,7 @@
|
||||
$('div.video-subtitles').toggleClass('closed');
|
||||
|
||||
var link_text = $('.hide-subtitles').text();
|
||||
$(this).text((link_text == 'on') ? 'off' : 'on');
|
||||
$(this).text((link_text == 'turn off') ? 'turn on' : 'turn off');
|
||||
return false;
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user