Commit 2f15424a by Bridger Maxwell

Merged in master branch

parents 2aca6264 a8a4b49d
......@@ -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)]
......@@ -194,7 +192,11 @@ def course_file(user):
cache_key = filename + "_processed?dev_content:" + str(options['dev_content']) + "&groups:" + str(sorted(groups))
tree_string = cache.get(fasthash(cache_key))
if "dev" not in settings.DEFAULT_GROUPS:
tree_string = cache.get(fasthash(cache_key))
else:
tree_string = None
if not tree_string:
tree = course_xml_process(etree.XML(render_to_string(filename, options, namespace = 'course')))
tree_string = etree.tostring(tree)
......
......@@ -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
......
"""
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
require 'rake/clean'
require 'tempfile'
REPO_ROOT = File.dirname(__FILE__)
BUILD_DIR = File.join(REPO_ROOT, "build")
CLOBBER.include('build')
CLEAN.include("#{BUILD_DIR}/*.deb")
task :package do
commit = (ENV["GIT_COMMIT"] || `git rev-parse HEAD`).chomp()
branch = (ENV["GIT_BRANCH"] || `git symbolic-ref -q HEAD`).chomp()
branch = branch.gsub('refs/heads/', '').gsub('origin/', '').gsub('/', '_')
build_number = (ENV["BUILD_NUMBER"] || "dev").chomp()
if branch == "master"
package_name = "mitx"
else
package_name = "mitx-#{branch}"
end
FileUtils.mkdir_p(BUILD_DIR)
Dir.chdir(BUILD_DIR) do
args = ["fakeroot", "fpm", "-s", "dir", "-t", "deb",
"--exclude=build",
"--exclude=rakefile",
"--exclude=.git",
"--prefix=/opt/wwc/mitx-#{commit}",
"--depends=python-mysqldb",
"--depends=python-django",
"--depends=python-pip",
"--depends=python-flup",
"--depends=python-numpy",
"--depends=python-scipy",
"--depends=python-matplotlib",
"--depends=python-libxml2",
"--depends=python2.7-dev",
"--depends=libxml2-dev",
"--depends=libxslt-dev",
"--depends=python-markdown",
"--depends=python-pygments",
"--depends=mysql-client",
"--name=#{package_name}-#{commit}",
"--version=0.1",
"--iteration=#{build_number}",
"-a", "all",
"#{REPO_ROOT}"]
system(*args) || raise("fpm failed to build the .deb")
end
end
......@@ -166,8 +166,17 @@ 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"))
override_settings = os.path.join(BASE_DIR, "settings.py")
if os.path.isfile(override_settings):
execfile(override_settings)
# A sample logging configuration. The only tangible logging
# performed by this configuration is to send an email to
......@@ -448,7 +457,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 +550,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,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -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; }
<%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>
......
......@@ -73,4 +73,4 @@
%endif
</section>
</div>
</section>
</section>
\ No newline at end of file
<%inherit file="main.html" />
<%block name="title"><title>Help - MITx 6.002x</title></%block>
<%include file="navigation.html" args="active_page='help'"/>
......
<%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,38 @@
</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">
<div class="input-wrapper">
<input type="text" id="calculator_input" />
<div class="help-wrapper">
<a href="#">Hints</a>
<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>
</div>
</div>
<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 +91,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 +104,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 +130,24 @@ $(function() {
// Calculator
$(function() {
$("#calculator_wrapper").hide();
$(".calc").click(function(){
$("#calculator_wrapper").slideToggle("fast");
$("#calculator_wrapper #calculator_input").focus();
$(this).toggleClass("closed");
return false;
});
$("div.help-wrapper a").hover(function(){
$(".help").toggleClass("shown");
});
$("div.help-wrapper a").click(function(){
return false;
});
$("form#calculator").submit(function(e){
e.preventDefault();
$.getJSON("/calculate", {"equation":$("#calculator_input").attr("value")},
......
<%inherit file="main.html" />
<%namespace name="profile_graphs" file="profile_graphs.js"/>
<%block name="title"><title>Profile - MITx 6.002x</title></%block>
<%!
from django.core.urlresolvers import reverse
%>
......
......@@ -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:
......
......@@ -7,31 +7,5 @@ div.gradebook-wrapper {
h1 {
@extend .top-header;
}
> ol {
list-style: none;
margin-top: lh();
> li {
@extend .clearfix;
border-bottom: 1px solid #e3e3e3;
display: table;
padding: lh() 0;
width: 100%;
&:last-child {
border-bottom: 0px;
}
h2 {
border-right: 1px dashed #ddd;
@include box-sizing(border-box);
display: table-cell;
margin: 0;
padding: 0;
width: flex-grid(2, 9);
vertical-align: top;
}
}
}
}
}
}
\ No newline at end of file
......@@ -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;
}
// 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";
......
// 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));
......
@mixin border-image ($image) {
-webkit-border-image: $image;
-moz-border-image: $image;
-ms-border-image: $image;
-o-border-image: $image;
border-image: $image;
@mixin border-image($images) {
-webkit-border-image: border-add-prefix($images, webkit);
-moz-border-image: border-add-prefix($images, moz);
-o-border-image: border-add-prefix($images, o);
border-image: border-add-prefix($images);
}
@function border-add-prefix($images, $vendor: false) {
$border-image: ();
$images-type: type-of(nth($images, 1));
$first-var: nth(nth($images, 1), 1); // Get type of Gradient (Linear || radial)
// If input is a gradient
@if $images-type == string {
@if ($first-var == "linear") or ($first-var == "radial") {
@for $i from 2 through length($images) {
$gradient-type: nth($images, 1); // Get type of gradient (linear || radial)
$gradient-args: nth($images, $i); // Get actual gradient (red, blue)
$border-image: render-gradients($gradient-args, $gradient-type, $vendor);
}
}
// If input is a URL
@else {
$border-image: $images;
}
}
// If input is gradient or url + additional args
@else if $images-type == list {
@for $i from 1 through length($images) {
$type: type-of(nth($images, $i)); // Get type of variable - List or String
// If variable is a list - Gradient
@if $type == list {
$gradient-type: nth(nth($images, $i), 1); // Get type of gradient (linear || radial)
$gradient-args: nth(nth($images, $i), 2); // Get actual gradient (red, blue)
$border-image: render-gradients($gradient-args, $gradient-type, $vendor);
}
// If variable is a string - Image or number
@else if ($type == string) or ($type == number) {
$border-image: append($border-image, nth($images, $i));
}
}
}
@return $border-image;
}
//Examples:
// @include border-image(url("image.png"));
// @include border-image(url("image.png") 20 stretch);
// @include border-image(linear-gradient(45deg, orange, yellow));
// @include border-image(linear-gradient(45deg, orange, yellow) stretch);
// @include border-image(linear-gradient(45deg, orange, yellow) 20 30 40 50 stretch round);
// @include border-image(radial-gradient(top, cover, orange, yellow, orange));
\ No newline at end of file
......@@ -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;
......
......@@ -10,7 +10,5 @@
-webkit-box-shadow: $full;
-moz-box-shadow: $full;
-ms-box-shadow: $full;
-o-box-shadow: $full;
box-shadow: $full;
}
......@@ -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);
......
@mixin user-select($arg: none) {
-webkit-user-select: $arg;
-moz-user-select: $arg;
-ms-user-select: $arg;
user-select: $arg;
}
// 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%;
// }
// }
// 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;
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;
margin: 4px 0 0 -5px;
text-shadow: 0 -1px 0 #000;
color: #fff;
line-height: lh();
&.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;
background-color: darken($cream, 10%);
color: darken(#F6EFD4, 60%);
color: darken($cream, 60%);
text-decoration: none;
opacity: .5;
background-color: darken($cream, 10%);
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;
}
}
}
......
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_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);
}
div.input-wrapper {
position: relative;
@extend .clearfix;
width: flex-grid(7.5);
margin: 0;
float: left;
input#calculator_input {
border: none;
@include box-shadow(none);
@include box-sizing(border-box);
font-size: 16px;
padding: 10px;
width: 100%;
&:focus {
outline: none;
border: none;
}
}
div.help-wrapper {
position: absolute;
right: 8px;
top: 15px;
a {
@include hide-text;
width: 17px;
height: 17px;
background: url("/static/images/info-icon.png") center center no-repeat;
}
dl {
background: #fff;
@include border-radius(3px);
@include box-shadow(0 0 3px #999);
color: #333;
opacity: 0;
padding: 10px;
position: absolute;
right: -40px;
top: -110px;
width: 500px;
@include transition();
&.shown {
opacity: 1;
top: -115px;
}
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;
......
......@@ -219,52 +219,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;
}
}
}
......@@ -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>
......
<%inherit file="main.html" />
<%block name="title"><title>Textbook – MITx 6.002x</title></%block>
<%block name="js_extra">
<script>
......
<%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;
});
});
......
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