Commit 09b27107 by Kyle Fiedler

merged with default

--HG--
branch : templates-kf-print
parents 0cbd6fa2 42daf8dd
No preview for this file type
......@@ -26,6 +26,7 @@ someone else already signed up with that username. Try a different,
more unique username. For example, try adding a random number to the
end.</p>
<a name="othercourses">
<h2> I am interested in a different subject. What other courses do
you offer? </h2>
......@@ -33,6 +34,7 @@ you offer? </h2>
range of courses in the future, at present, 6.002x is the only course
available.</p>
<a name="start">
<h2>How will I know that the course has started?</h2>
<p> The course will start on March 5. Check the website
......@@ -41,30 +43,44 @@ the course website 6.002x.mitx.mit.edu on or slightly before March 5
so you can login, begin to get familiar with the site and start the
course.</p>
<a name="login">
<h2> Why is there no log-in button?</h2>
<p> You will not be able to log into the course until either the
starting date, or shortly before.</p>
<a name="schedule">
<h2> Does the class have a schedule?</h2>
<p> The lectures are on-line videos, and may be watched at your own
pace and schedule. The course will have fixed deadlines for homework
assignments and exams. </p>
<a name="enrollissues">
<h2> I just enrolled for the course. I have not received any form
of acknowledgement that I have enrolled.</h2>
<p> You should receive a single activation e-mail. If you did not,
check your spam folder, or try to register again with your correct
e-mail address and a new username (most errors are from typos in
e-mail addresses).</p>
<p> You should receive a single activation e-mail. If you did not, the
most common issues are:
<ul>
<li> Typo in e-mail address
<li> Old browser. We recommend trying a modern version of Firefox or Chrome
<li> JavaScript disabled
<li> Activation e-mail in spam folder. Check spam folder.
<li> Non-unique username. Try adding a random string at the end.
</ul>
<p>If you run into issues, try recreating your account. There is no need
to do anything about the old account, if any. If it is not activated
through the link in the e-mail, it will disappear later.
<a name="howdropcourse">
<h2> How do I drop the course?</h2>
<p> You do not have to do anything. You can simply stop working on the
course at any time you choose to do so.</p>
<a name="ifdropcourse">
<h2>What happens if I drop the course?</h2>
<p> For the prototype course, learners achieving grades of "A," "B,"
......@@ -76,6 +92,7 @@ will be disclosed outside of MITx. You can also choose to opt for a
no record at any time. However, the posts you make while enrolled in
the class will remain visible. </p>
<a name="whatismitx">
<h2>
What is <i>MITx</i>?</h2>
......@@ -104,6 +121,7 @@ education. The launch of <i>MITx</i> represents a next step forward in that
effort.
</p>
<a name="differentcampus">
<h2>
What is 6.002x, and how is it different from the on-campus version of
6.002?
......@@ -133,6 +151,7 @@ version of 6.002.
professors Anant Agarwal and Jeffrey H. Lang for 6.002.
</p>
<a name="howenroll">
<h2>
How do I enroll in 6.002x?
</h2>
......@@ -141,6 +160,7 @@ To enroll, visit <a href="http://mitx.mit.edu">http://mitx.mit.edu</a>
and sign up.
</p>
<a name="whenavailable">
<h2>
When will the course be available online?
</h2>
......@@ -149,6 +169,7 @@ When will the course be available online?
6.002x will become available online on Monday, March 5.
</p>
<a name="timeline">
<h2>
Do I need to follow a set timeline in completing 6.002x?
</h2>
......@@ -160,6 +181,7 @@ final exam will be given within a specific range of days. However,
faster-paced learners can proceed multiple weeks ahead if they choose.
</p>
<a name="workrequired">
<h2>
How much time is required to complete the course?
</h2>
......@@ -169,6 +191,7 @@ course. However, the time taken by individual students might vary
considerably depending on background and skill.
</p>
<a name="instructors">
<h2>
Who are the instructors for 6.002x?
</h2>
......@@ -178,6 +201,7 @@ Gerald Sussman and Piotr Mitros. The team also includes several
teaching assistants (TAs).
</p>
<a name="worklike">
<h2>
What is the work like in 6.002x?
</h2>
......@@ -199,6 +223,7 @@ videos. Lab and homework exercises will round out the week. Tutorials
are also provided as additional reference material.
</p>
<a name="questionsduringcourse">
<h2>
What if I have a question during the course?
</h2>
......@@ -209,6 +234,7 @@ documents, FAQs, tutorials and videos on using the various components
of the course will also be provided.
</p>
<a name="collaboration">
<h2>
Will 6.002x offer any means for collaboration among online learners?
</h2>
......@@ -217,6 +243,7 @@ Yes. 6.002x will offer modest support for collaborative work through a
prototype wiki and discussion forum.
</p>
<a name="prereqs">
<h2>
Are there prerequisites to take the course?
</h2>
......@@ -239,6 +266,7 @@ remedial differential equations component for students with weaker
math backgrounds.
</p>
<a name="cost">
<h2>
How much does the course cost?
</h2>
......@@ -246,9 +274,10 @@ How much does the course cost?
All of the courses on <i>MITx</i> will be free of charge. Those who have the
ability and motivation to demonstrate mastery of content can receive a
credential for a modest fee. For this prototype course, the fee for a
credential will be waived.
credential will be waived.
</p>
<a name="credential">
<h2>
What is a credential?
</h2>
......@@ -261,6 +290,7 @@ testing center or otherwise have your identity certified in order to
receive this certificate.
</p>
<a name="whograding">
<h2>
Who is grading the course?
</h2>
......@@ -269,6 +299,7 @@ Who is grading the course?
including practice exercises, homework assignments, labs and exams.
</p>
<a name="whatpassing">
<h2>
What is a passing grade?
</h2>
......@@ -279,6 +310,7 @@ affecting a student&rsquo;s grade and the grade thresholds will be
posted on the course website when the course comes online.
</p>
<a name="textbook">
<h2>
Do I need to buy a textbook?
</h2>
......@@ -290,23 +322,28 @@ provided electronically as part of the online course. While the
textbook is recommended, it is not required. The electronic text is
provided for personal use in connection with this course only. The
copyright for the book is owned by Elsevier. The book can be purchased
on Amazon.
on <a href="http://www.amazon.com/exec/obidos/ASIN/1558607358/ref=nosim/mitopencourse-20" target="_blank">Amazon</a>.
</p>
<a name="technicalrequirements">
<h2>
Do I need to have special software to access 6.002x?
</h2>
<p>
No, you do not need special software to access 6.002x, as you will
access the online interactive course through your browser. The course
website was developed and tested primarily with Google Chrome. We
support current versions of Mozilla Firefox as well. The video player
is designed to work with Flash. While we provide a partial non-Flash
fallback for the video, as well as partial support for Internet
Explorer, other browsers and tablets, portions of the functionality
will be unavailable.
website was developed and tested primarily with the current version of
Google Chrome. We support current versions of Mozilla Firefox as
well. The video player is based on Youtube, and is designed to work
with Flash. We provide a partial non-Flash fallback for the video, but
this uses Google's experimental HTML5 API, and hence we cannot
guarantee those will continue to function for the duration of the
semester. We provide partial support for Internet Explorer, as well as
other browsers and tablets, but portions of the functionality will be
unavailable.
</p>
<a name="futurecourses">
<h2>
When will the next courses become available and what topics will they be on?
</h2>
......
../data/problems/Lab2A.html
\ No newline at end of file
<%inherit file="main.html" />
<%block name="js_extra">
<!-- TODO: http://docs.jquery.com/Plugins/Validation -->
<script type="text/javascript">
$(function() {
${init}
// Show and hide sidebar
var acc_hidden=false;
$('#hide_acc').click(function() {
if(acc_hidden) {
$('#accordion').show();
$('#acc_td').attr("width","320");
$('#hide_acc').html("&lt;<br>&lt;<br>&lt;");
acc_hidden=false;
} else {
$('#accordion').hide();
$('#acc_td').attr("width","0");
$('#hide_acc').html("&gt;<br>&gt;<br>&gt;");
acc_hidden=true;
}
});
});
</script>
</%block>
<%include file="navigation.html" args="active_page='courseware'" />
<section class="main-content">
<div class="course-wrapper">
<section class="course-index">
<div id="open_close_accordion">
<header id="open_close_accordion">
<h2>Courseware Index</h2>
<a href="#">close</a>
</div>
</header>
<div id="accordion">
${accordion}
......
......@@ -2,6 +2,9 @@
<div name="enroll_form" id="enroll_form">
<h1>Enroll in 6.002x Circuits &amp; Electronics</h1>
<p class="ie-warning"> Enrollment requires a modern web browser with JavaScript enabled. You don't have this. You can&rsquo;t enroll without upgrading, since you couldn&rsquo;t take the course without upgrading. Feel free to download the latest version of <a href="http://www.mozilla.org/en-US/firefox/new/">Mozilla Firefox</a> or <a href="http://support.google.com/chrome/bin/answer.py?hl=en&answer=95346">Google Chrome</a>, for free, to enroll and take this course.</p>
<form name="enroll" id="enroll_form" method="get">
<fieldset><% if 'error' in locals(): e = error %>
......
../data/custom_tags
\ No newline at end of file
<%inherit file="marketing.html" />
<%block name="title">MITx 6.002x: Circuits & Electronics</%block>
<%block name="description">6.002x (Circuits and Electronics) is an experimental on-line adaptation of MIT's first undergraduate analog design course: 6.002.</%block>
<%block name="keywords">MITx, circuits, electronics, EECS, electrical engineering, analog circuits, digital circuits, online learning, MIT, online laboratory, education, learners, undergraduate, certificate</%block>
<%block name="header_text">
<section class="course">
<section>
<h1>Circuits &amp; Electronics</h1>
<h2>6.002x</h2>
<a class="enroll" rel="leanModal" href="#enroll">Enroll in 6.002x Circuits <span>&amp;</span> Electronics</a>
<a class="enroll" rel="leanModal" href="#enroll"><noscript>In order to</noscript> Enroll in 6.002x Circuits <span>&amp;</span> Electronics <noscript>you need to have javascript enabled</noscript></a>
</section>
<p>6.002x (Circuits and Electronics) is an experimental on-line adaptation of MIT&rsquo;s first undergraduate analog design course: 6.002. This course will run, free of charge, for students worldwide from March 5, 2012 through June 8, 2012.</p>
</section>
......@@ -48,7 +52,7 @@
</section>
<section class="cta">
<a class="enroll" rel="leanModal" href="#enroll">Enroll in 6.002x Circuits &amp; Electronics</a>
<a class="enroll" rel="leanModal" href="#enroll"><noscript>In order to</noscript> Enroll in 6.002x Circuits &amp; Electronics <noscript>you need to have javascript enabled</noscript></a>
</section>
</section>
......@@ -58,17 +62,17 @@
<ul>
<li>
<img src="/static/staff/agarwal-mit-news-small.jpg">
<img src="/static/staff/agarwal-mit-news-small.jpg" alt="Anant Agarwal">
<h2>Anant Agarwal</h2>
<p>Director of MIT&rsquo;s Computer Science and Artificial Intelligence Laboratory (CSAIL) and a professor of the Electrical Engineering and Computer Science department at MIT. His research focus is in parallel computer architectures and cloud software systems, and he is a founder of several successful startups, including Tilera, a company that produces scalable multicore processors. Prof. Agarwal won MIT&rsquo;s Smullin and Jamieson prizes for teaching and co-authored the course textbook &ldquo;Foundations of Analog and Digital Electronic Circuits.&rdquo;</p></li>
<li>
<img src="/static/staff/gjs-small.jpg">
<img src="/static/staff/gjs-small.jpg" alt="Gerald Sussman">
<h2>Gerald Sussman</h2>
<p>Professor of Electrical Engineering at MIT. He is a well known educator in the computer science community, perhaps best known as the author of Structure and Interpretation of Computer Programs, which is universally acknowledged as one of the top ten textbooks in computer science, and as the creator of Scheme, a popular teaching language. His research spans a range of topics, from artificial intelligence, to physics and chaotic systems, to supercomputer design.</p></li>
<li>
<img src="/static/staff/pmitros-small.jpg">
<img src="/static/staff/pmitros-small.jpg" alt="Piotr Mitros">
<h2>Piotr Mitros</h2>
<p>Research Scientist at MIT. His research focus is in finding ways to apply techniques from control systems to optimizing the learning process. Dr. Mitros has worked as an analog designer at Texas Instruments, Talking Lights, and most recently, designed the analog front end for a novel medical imaging modality for Rhythmia Medical.</p></li>
</ul>
......
<!DOCTYPE html>
<html>
<head>
<%block name="title"><title>MITx 6.002</title></%block>
<%block name="title"><title>MITx 6.002x</title></%block>
<link rel="stylesheet" href="${ settings.LIB_URL }jquery.treeview.css" type="text/css" media="all" />
<link rel="stylesheet" href="/static/css/application.css" type="text/css" media="all" />
......@@ -27,11 +27,6 @@
</script>
<script type="text/javascript" src="${ settings.LIB_URL }mathjax/MathJax.js?config=TeX-AMS_HTML-full"></script>
<script type="text/javascript">
$(function(){
$("a[rel*=leanModal]").leanModal();
});
</script>
<%block name="headextra"/>
</head>
......@@ -116,5 +111,13 @@ $(function() {
});
</script>
<script type="text/javascript">
$(function(){
$("a[rel*=leanModal]").leanModal();
});
</script>
<%block name="js_extra"/>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<%block name="title"><title>MITx 6.002</title></%block>
<title><%block name="title">MITx: MIT's new online learning initiative</%block></title>
<meta name="description" content="<%block name="description">MITx will offer a portfolio of MIT courses for free to a virtual community of learners around the world</%block>" />
<meta name="keywords" content="<%block name="keywords">MITx, online learning, MIT, online laboratory, education, learners, undergraduate, certificate</%block>" />
<!--link rel="stylesheet" href="${ settings.LIB_URL }jquery.treeview.css" type="text/css" media="all" /-->
<link rel="stylesheet" href="/static/css/marketing.css" type="text/css" media="all" />
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<!--[if lt IE 8]>
<link rel="stylesheet" href="/static/css/marketing-ie.css" type="text/css" media="all" />
<![endif]-->
......@@ -22,11 +27,6 @@
<script src="/static/js/html5shiv.js"></script>
<![endif]-->
<script type="text/javascript">
$(function(){
$("a[rel*=leanModal]").leanModal();
});
</script>
<%block name="headextra"/>
......@@ -151,7 +151,20 @@ $(document).ready(function(){
});
});
$(function(){
$("a[rel*=leanModal]").leanModal();
$("a.login").click(function(){
$("#login_form #li_email").focus();
});
$("a.enroll").click(function(){
$("#enroll_form #ca_email").focus();
});
});
</script>
<%block name="js_extra"/>
</body>
</html>
......@@ -12,7 +12,7 @@
</section>
<section class="intro-video">
<a id="video-overlay-link" rel="leanModal" href="#video-overlay"><img src="/static/images/video-image.png" id="video-img" alt="" /><span> Watch intro video</span></a>
<a id="video-overlay-link" rel="leanModal" href="#video-overlay"><img src="/static/images/video-image.png" id="video-img" alt="Link to MITx introduction video" /><span> Watch intro video</span></a>
</section>
</section>
......@@ -40,7 +40,7 @@
</hgroup>
<p>
<a href="http://6002x.mitx.mit.edu/" class="more-info">More information <span>&amp;</span> Enroll</a>
<a href="http://6002x.mitx.mit.edu/" class="more-info">More information <span>&amp;</span> Enroll <span class="arrow">&#8227;</span></a>
</p>
<p>Taught by Anant Agarwal, with Gerald Sussman and Piotr Mitros, 6.002x (Circuits and Electronics) is an on-line adaption of 6.002, MIT&rsquo;s first undergraduate analog design course. This prototype course will run, free of charge, for students worldwide from March 5, 2012 through June 8, 2012. Students will be given the opportunity to demonstrate their mastery of the material and earn a certificate from <em>MITx</em>.</p>
......@@ -51,6 +51,8 @@
<iframe id="player" type="text/html" width="560" height="390" src="http://www.youtube.com/embed/p2Q6BrNhdh8?enablejsapi=1" frameborder="0">
</iframe>
</div>
<%block name="js_extra">
<script>
var player;
......@@ -113,3 +115,4 @@ $(function() {
});
</script>
</%block>
......@@ -7,7 +7,6 @@
</hgroup>
<nav class="${active_page}">
<ul class="coursenav">
<li class="courseware"><a href="/courseware">Courseware</a></li>
<li class="info"><a href="/info">Course Info</a></li>
......
......@@ -13,11 +13,15 @@ function ${ id }_load() {
postJSON('/modx/problem/${ id }/problem_check',
submit_data,
function(json) {
if(json['success'] == 'syntax')
alert('Syntax error');
else
${ id }_load();
switch(json.success) {
case 'incorrect': // Worked, but answer not
case 'correct':
${ id }_load();
//alert("!!"+json.success);
break;
default:
alert(json.success);
}
});
log_event('problem_check', submit_data);
});
......
......@@ -5,9 +5,9 @@
%>
<%block name="headextra">
<script type="text/javascript" src="${ settings.LIB_URL }flot/jquery.flot.min.js"></script>
<script type="text/javascript" src="${ settings.LIB_URL }flot/jquery.flot.stack.js"></script>
<script language="javascript" type="text/javascript" src="${ settings.LIB_URL }flot/jquery.flot.symbol.js"></script>
<script type="text/javascript" src="/static/js/flot/jquery.flot.js"></script>
<script type="text/javascript" src="/static/js/flot/jquery.flot.stack.js"></script>
<script type="text/javascript" src="/static/js/flot/jquery.flot.symbol.js"></script>
<script>
<%include file="profile_graphs.js"/>
</script>
......
......@@ -16,7 +16,7 @@ $(function () {
}).appendTo("body").fadeIn(200);
}
/* -------------------------------- Grade detail graph -------------------------------- */
/* -------------------------------- Grade detail bars -------------------------------- */
var colors = [$.color.parse("#E8B800"), $.color.parse("#A0CEFA"), $.color.parse("#BD3738"), $.color.parse("#429A2E")];
//var colors = [$.color.parse("#1B2045"), $.color.parse("#557a00"), $.color.parse("#F5600"), $.color.parse("#FEBA2C")];
//var colors = [$.color.parse("#E7C856"), $.color.parse("#CD462E"), $.color.parse("#B01732"), $.color.parse("#41192A")];
......@@ -42,7 +42,7 @@ $(function () {
data: ${ json.dumps( [[i + tickIndex, score['percentage']] for i,score in enumerate(section['subscores'])] ) },
color: colors[${sectionIndex}].toString(),
});
ticks = ticks.concat( ${ json.dumps( [[i + tickIndex, str(i + 1)] for i,score in enumerate(section['subscores'])] ) } );
ticks = ticks.concat( ${ json.dumps( [[i + tickIndex, score['label'] ] for i,score in enumerate(section['subscores'])] ) } );
bottomTicks.push( [ ${tickIndex + len(section['subscores'])/2}, "${section['category']}" ] );
detail_tooltips["${section['category']}"] = ${ json.dumps([score['summary'] for score in section['subscores']] ) };
......@@ -57,8 +57,8 @@ $(function () {
data: [[${tickIndex}, ${section['totalscore']['score']}]],
color: colors[${sectionIndex}].toString(),
});
ticks = ticks.concat( [ [${tickIndex}, "Total"] ] );
detail_tooltips["${section['category']} Total"] = [ "${section['totalscore']['summary']}" ];
ticks = ticks.concat( [ [${tickIndex}, "${section['totallabel']}"] ] );
detail_tooltips["${section['category']} Average"] = [ "${section['totalscore']['summary']}" ];
<% tickIndex += 1 + sectionSpacer %>
%else: ##This is for sections like midterm or final, which have no smaller components
......@@ -66,12 +66,8 @@ $(function () {
data: [[${tickIndex}, ${section['totalscore']['score']}]],
color: colors[${sectionIndex}].toString(),
});
%if section['category'] == "Midterm":
bottomTicks = bottomTicks.concat( [ [${tickIndex}, "${section['category']}"] ] );
%else:
ticks = ticks.concat( [ [${tickIndex}, "${section['category']}"] ] );
%endif
ticks = ticks.concat( [ [${tickIndex}," ${section['totallabel']}"] ] );
detail_tooltips["${section['category']}"] = [ "${section['totalscore']['summary']}" ];
<% tickIndex += 1 + sectionSpacer %>
......@@ -80,13 +76,45 @@ $(function () {
%endfor
//Alwasy be sure that one series has the xaxis set to 2, or the second xaxis labels won't show up
series.push( {label: 'Dropped Scores', data: droppedScores, points: {symbol: "cross", show: true, radius: 3}, bars: {show: false}, color: "red", xaxis: 2} );
series.push( {label: 'Dropped Scores', data: droppedScores, points: {symbol: "cross", show: true, radius: 3}, bars: {show: false}, color: "red"} );
/* ----------------------------- Grade overviewew bar -------------------------*/
<%
totalWeight = 0.0
sectionIndex = 0
totalScore = 0.0
overviewBarX = tickIndex
%>
%for section in grade_summary:
<%
weighted_score = section['totalscore']['score'] * section['weight']
summary_text = "{0} - {1:.1%} of a possible {2:.0%}".format(section['category'], weighted_score, section['weight'])
%>
%if section['totalscore']['score'] > 0:
series.push({label: "${section['category']} - Weighted",
data: [[${overviewBarX}, ${weighted_score}]],
color: colors[${sectionIndex}].toString(),
});
%endif
detail_tooltips["${section['category']} - Weighted"] = [ "${summary_text}" ];
<%
sectionIndex += 1
totalWeight += section['weight']
totalScore += section['totalscore']['score'] * section['weight']
%>
%endfor
ticks = ticks.concat( [ [${overviewBarX}, "Total"] ] );
<% tickIndex += 1 + sectionSpacer %>
var options = {
series: {lines: {show: false, steps: false },
bars: {show: true, barWidth: 0.6, align: 'center', lineWidth: 1},},
xaxis: {tickLength: 0, min: 0.0, max: ${tickIndex - sectionSpacer}},
xaxes: [{ticks: ticks}, {ticks: bottomTicks}],
series: {stack: true,
lines: {show: false, steps: false },
bars: {show: true, barWidth: 0.6, align: 'center', lineWidth: 1},},
xaxis: {tickLength: 0, min: 0.0, max: ${tickIndex - sectionSpacer}, ticks: ticks, labelAngle: 90},
yaxis: {ticks: [[1, "100%"], [0.87, "A 87%"], [0.7, "B 70%"], [0.6, "C 60%"], [0, "0%"]], min: 0.0, max: 1.0, labelWidth: 50},
grid: { hoverable: true, clickable: true, borderWidth: 1,
markings: [ {yaxis: {from: 0.87, to: 1 }, color: "#EBFFD5"}, {yaxis: {from: 0.7, to: 0.87 }, color: "#E6FFFF"},
......@@ -94,17 +122,42 @@ $(function () {
legend: {show: false},
};
if ($("#grade-detail-graph").length > 0) {
$.plot($("#grade-detail-graph"), series, options);
var $grade_detail_graph = $("#grade-detail-graph");
if ($grade_detail_graph.length > 0) {
var plot = $.plot($grade_detail_graph, series, options);
var o = plot.pointOffset({x: ${overviewBarX} , y: ${totalScore}});
$grade_detail_graph.append('<div style="position:absolute;left:' + (o.left - 12) + 'px;top:' + (o.top - 20) + 'px">${"{totalscore:.0%}".format(totalscore=totalScore)}</div>');
// //Rotate the x-axis labels
// var rotateValue = "rotate(-60deg)";
// var rotateOrigin = "bottom left";
// $("#grade-detail-graph .x1Axis .tickLabel").css( {
// '-webkit-transform': rotateValue,
// '-moz-transform': rotateValue,
// '-ms-transform': rotateValue,
// '-o-transform': rotateValue,
// 'transform': rotateValue,
//
// '-webkit-transform-origin': rotateOrigin,
// '-moz-transform-origin': rotateOrigin,
// '-ms-transform-origin': rotateOrigin,
// '-o-transform-origin': rotateOrigin,
//
// 'text-align' : 'left',
// });
}
var previousPoint = null;
$("#grade-detail-graph").bind("plothover", function (event, pos, item) {
$("#x").text(pos.x.toFixed(2));
$("#y").text(pos.y.toFixed(2));
if (item) {
if (previousPoint != item.dataIndex) {
previousPoint = item.dataIndex;
if (previousPoint != (item.dataIndex, item.seriesIndex)) {
previousPoint = (item.dataIndex, item.seriesIndex);
$("#tooltip").remove();
......
No preview for this file type
......@@ -5,12 +5,13 @@ $ gem install sass
We are also using Bourbon with sass. They are a generic set of mixins, and functions that allow for more rapid development of CSS3. Find out more about bourbon here: https://github.com/thoughtbot/bourbon
Then to generate Sass files cd to templates directory and watch the sass files for developement:
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:
$ sass --watch sass:../static/css/ -r ./sass/bourbon/lib/bourbon.rb
To generate a compressed css file for production:
$ sass --watch sass:../static/css/ -r ./sass/bourbon/lib/bourbon.rb --style :compressed
These will automatically generate the CSS files on save.
......@@ -43,8 +43,10 @@ div.info-wrapper {
border-left: 1px solid #d3d3d3;
h1 {
padding: 0 lh();
padding: lh(.5) lh();
font-size: 18px;
margin: 0 ;
@extend .bottom-border;
}
ol {
......
......@@ -9,8 +9,10 @@ div.profile-wrapper {
border-right: 0;
h1 {
padding:0 lh();
padding: lh(.5) lh();
font-size: 18px;
margin: 0 ;
@extend .bottom-border;
}
ul {
......
div.book-wrapper {
@extend .table-wrapper;
ul#booknav {
section.book-sidebar {
@extend .sidebar;
@include box-sizing(border-box);
@extend .tran;
a {
color: #000;
ul#booknav {
&:hover {
color: #666;
}
}
li {
background: none;
padding-left: 30px;
div.hitarea {
margin-left: -22px;
background-image: url('/static/images/treeview-default.gif');
position: relative;
top: 4px;
a {
color: #000;
&:hover {
opacity: 0.6;
filter: alpha(opacity=60);
color: #666;
}
}
ul {
li {
background: none;
padding-left: 30px;
div.hitarea {
margin-left: -22px;
background-image: url('/static/images/treeview-default.gif');
position: relative;
top: 4px;
&:hover {
opacity: 0.6;
filter: alpha(opacity=60);
}
}
ul {
background: none;
}
}
}
> li {
border-bottom: 1px solid #d3d3d3;
@include box-shadow(0 1px 0 #eee);
padding: 7px 7px 7px 30px;
> li {
border-bottom: 1px solid #d3d3d3;
@include box-shadow(0 1px 0 #eee);
padding: 7px 7px 7px 30px;
}
}
}
......@@ -74,6 +78,13 @@ div.book-wrapper {
}
}
}
&.bottom-nav {
margin-top: lh();
margin-bottom: -(lh());
border-bottom: 0;
border-top: 1px solid #EDDFAA;
}
}
section.page {
......@@ -85,4 +96,36 @@ div.book-wrapper {
}
}
}
&.closed {
section.book-sidebar {
width: flex-grid(.6);
header#open_close_accordion {
padding: 0;
a {
background-image: url('/static/images/slide-right-icon.png');
}
h2 {
visibility: hidden;
width: 10px;
padding: 0;
}
}
ul#booknav {
visibility: hidden;
width: 10px;
padding: 0;
overflow: hidden;
max-height: 100px;
}
}
section.course-content {
width: flex-grid(11.5) + flex-gutter();
}
}
}
......@@ -7,10 +7,11 @@
@import "jquery-ui-1.8.16.custom";
// pages
@import "courseware/courseware", "courseware/sidebar", "courseware/video", "courseware/sequence-nav";
@import "courseware/courseware", "courseware/sidebar", "courseware/video", "courseware/sequence-nav", "courseware/amplifier";
@import "textbook";
@import "info";
@import "profile";
@import "wiki/basic-html", "wiki/sidebar", "wiki/create", "wiki/wiki";
@import "help";
@import "discussion/askbot-original", "discussion/discussion","discussion/sidebar", "discussion/questions", "discussion/tags", "discussion/question-view" , "discussion/answers", "discussion/forms", "discussion/form-wmd-toolbar";
@import "discussion/askbot-original", "discussion/discussion","discussion/sidebar", "discussion/questions", "discussion/tags", "discussion/question-view" , "discussion/answers", "discussion/forms", "discussion/form-wmd-toolbar", "discussion/modals", "discussion/profile";
......@@ -10,8 +10,8 @@
margin: 0 auto;
max-width: $fg-max-width;
min-width: $fg-min-width;
width: flex-grid(12);
text-align: left;
width: flex-grid(12);
div.table-wrapper {
display: table;
......@@ -20,24 +20,24 @@
}
h1.top-header {
margin: (-(lh())) (-(lh())) lh();
padding: lh();
background: #f3f3f3;
border-bottom: 1px solid #e3e3e3;
margin: (-(lh())) (-(lh())) lh();
padding: lh();
}
.button {
@include box-shadow(inset 0 1px 0 lighten(#888, 10%), 0 0 3px #ccc);
@include linear-gradient(lighten(#888, 5%), darken(#888, 5%));
@include border-radius(3px);
border: 1px solid darken(#888, 10%);
padding: 4px 8px;
@include border-radius(3px);
@include box-shadow(inset 0 1px 0 lighten(#888, 10%), 0 0 3px #ccc);
color: #fff;
font: bold $body-font-size $body-font-family;
cursor: pointer;
-webkit-font-smoothing: antialiased;
text-shadow: none;
font: bold $body-font-size $body-font-family;
@include linear-gradient(lighten(#888, 5%), darken(#888, 5%));
padding: 4px 8px;
text-decoration: none;
text-shadow: none;
-webkit-font-smoothing: antialiased;
&:hover, &:focus {
@include box-shadow(inset 0 1px 0 lighten(#888, 20%), 0 0 3px #ccc);
......@@ -47,8 +47,8 @@ h1.top-header {
}
.content {
@include box-sizing(border-box);
@include box-shadow(inset 0 0 2px 3px #f3f3f3);
@include box-sizing(border-box);
display: table-cell;
padding: lh();
vertical-align: top;
......@@ -60,43 +60,55 @@ h1.top-header {
}
.sidebar {
@include box-shadow( inset 0 0 0 1px #f6f6f6);
@include box-sizing(border-box);
@include border-radius(4px 0 0 4px);
background: #e3e3e3;
@include border-radius(4px 0 0 4px);
border-right: 1px solid #d3d3d3;
@include box-shadow( inset 0 0 0 1px #f6f6f6);
@include box-sizing(border-box);
display: table-cell;
font-family: $body-font-family;
position: relative;
text-shadow: 0 1px 0 #f1f1f1;
vertical-align: top;
width: flex-grid(3);
position: relative;
h1, h2 {
font-size: 18px;
font-weight: 800;
letter-spacing: 0;
text-transform: none;
}
.bottom-border {
@include box-shadow(0 1px 0 #eee);
border-bottom: 1px solid #d3d3d3;
}
@media print {
display: none;
}
h3 {
@include box-shadow(0 1px 0 #eee);
background: none;
border: none;
border-bottom: 1px solid #d3d3d3;
@extend .bottom-border;
background: none;
color: #000;
font-weight: normal;
margin: 0;
overflow: hidden;
a {
@include transition();
color: lighten($text-color, 10%);
display: block;
font-size: $body-font-size;
padding: 7px 7px 7px 30px;
text-decoration: none;
@include transition();
&:hover {
@include box-shadow(0 1px 0 #fff);
background: #efefef;
@include box-shadow(0 1px 0 #fff);
}
}
......@@ -105,10 +117,10 @@ h1.top-header {
}
&.active {
@include box-shadow(none);
background: none;
border: 0;
border-bottom: 1px solid #bbb;
@include box-shadow(none);
color: #000;
font-weight: bold;
......@@ -118,19 +130,48 @@ h1.top-header {
}
}
header#open_close_accordion {
border-bottom: 1px solid #d3d3d3;
@include box-shadow(0 1px 0 #eee);
padding: lh(.5) lh();
position: relative;
h2 {
padding-right: 20px;
margin: 0;
}
a {
background: #eee url('/static/images/slide-left-icon.png') center center no-repeat;
border: 1px solid #D3D3D3;
@include border-radius(3px 0 0 3px);
height: 16px;
padding: 8px;
position: absolute;
right: -1px;
text-indent: -9999px;
top: 6px;
width: 16px;
&:hover {
background-color: white;
}
}
}
a.button {
text-decoration: none;
}
}
.topbar {
@extend .clearfix;
background: #F6EFD4;
border-bottom: 1px solid darken(#F6EFD4, 10%);
margin: (-$body-line-height) (-$body-line-height) $body-line-height;
@include box-shadow(inset 0 1px 0 #fff, inset 1px 0 0 #fff);
font-size: 12px;
margin: (-$body-line-height) (-$body-line-height) $body-line-height;
text-shadow: 0 1px 0 #fff;
@include box-shadow(inset 0 1px 0 #fff, inset 1px 0 0 #fff);
@extend .clearfix;
@media print {
display: none;
......@@ -145,12 +186,12 @@ h1.top-header {
}
&.block-link {
@include box-shadow(inset 1px 0 0 lighten(#f6efd4, 5%));
background: darken(#F6EFD4, 5%);
border-left: 1px solid darken(#f6efd4, 20%);
@include box-shadow(inset 1px 0 0 lighten(#f6efd4, 5%));
display: block;
padding: lh(.75);
text-transform: uppercase;
display: block;
&:hover {
background: none;
......@@ -158,3 +199,7 @@ h1.top-header {
}
}
}
.tran {
@include transition( all, .2s, $ease-in-out-quad);
}
......@@ -20,4 +20,3 @@
@function lh($amount: 1) {
@return $body-line-height * $amount;
}
// JM MOSFET AMPLIFIER
div#graph-container {
@extend .clearfix;
canvas#graph {
background-color: rgb(60, 60, 100);
width: flex-grid(4.5, 9);
float: left;
margin-right: flex-gutter(9);
}
div.graph-controls {
width: flex-grid(4.5, 9);
float: left;
select#musicTypeSelect {
display: block;
margin-bottom: lh(2);
}
div#graph-output {
display: block;
margin-bottom: lh(2);
}
div#graph-listen {
display: block;
margin-bottom: lh(2);
}
p {
margin-bottom: lh(1);
}
div#label {
display: inline-block;
}
input#playButton {
display: block;
}
}
}
div#schematic-container {
@extend .clearfix;
canvas {
background-color: rgb(60, 60, 100);
width: flex-grid(4.5, 9);
float: left;
margin-right: flex-gutter(9);
}
div.schematic-sliders {
width: flex-grid(4.5, 9);
float: left;
div.slider-label#vs {
margin-top: lh(2.0);
}
div.slider-label {
margin-bottom: lh(0.5);
}
div.slider {
margin-bottom: lh(1);
}
}
}
//End JM MOSFET AMPLIFIER
......@@ -5,10 +5,6 @@ div.course-wrapper {
list-style: none;
}
.tran {
@include transition( all, .2s, $ease-in-out-quad);
}
section.course-content {
@extend .content;
......@@ -176,7 +172,7 @@ div.course-wrapper {
section.course-index {
width: flex-grid(.6);
div#open_close_accordion {
header#open_close_accordion {
padding: 0;
a {
......
......@@ -2,34 +2,6 @@ section.course-index {
@extend .sidebar;
@extend .tran;
div#open_close_accordion {
@include box-shadow(0 1px 0 #eee);
border-bottom: 1px solid #d3d3d3;
padding: 0 lh();
position: relative;
h2 {
padding-right: 20px;
}
a {
width: 16px;
text-indent: -9999px;
height: 16px;
position: absolute;
padding: 8px;
top: -12px;
right: -1px;
border: 1px solid #D3D3D3;
background: #eee url('/static/images/slide-left-icon.png') center center no-repeat;
@include border-radius(3px 0 0 3px);
&:hover {
background-color: white;
}
}
}
div#accordion {
h3 {
......
div.answer-controls {
@include box-sizing(border-box);
@extend div.question-controls;
display: inline-block;
margin: 20px 0;
margin: 0 0 15px;
padding-left: flex-grid(1.1);
width: 100%;
div.answer-sort {
@extend div.question-sort;
div.answer-count {
display: inline-block;
float: left;
}
div.answer-count {
@extend div.question-count;
div.answer-sort {
float: right;
margin-left: flex-gutter();
nav {
@extend .action-link;
float: right;
margin-top: 34px;
a {
&.on span{
font-weight: bold;
}
&:before {
content: '|';
color: #ccc;
font-size: 16px;
}
}
}
}
}
......@@ -44,12 +64,49 @@ div.answer-block {
}
div.answered-by-owner {
color: $mit-red;
p {
font-style: italic;
color: #656565;
}
div.comments-container {
color: #555;
}
}
div.deleted {
p {
color: $mit-red;
}
}
}
div.paginator {
@extend div.answer-block;
text-align: center;
padding: 20px 0;
span {
@include border-radius(3px);
background: #eee;
margin: 0 5px;
padding: 4px 10px;
&.curr {
background: none;
color: $mit-red;
font-weight: bold;
}
&.next, &.prev {
@extend .light-button;
}
a {
color: #555;
text-decoration: none;
}
}
}
div.answer-own {
......@@ -60,18 +117,27 @@ div.answer-own {
}
div.answer-actions {
text-align: right;
margin: 0;
padding: 0;
padding:8px 8px 8px 0;
text-align: right;
border-top: 1px solid #efefef;
span.sep {
color: #ddd;
color: #EDDFAA;
}
a {
text-decoration: none;
cursor: pointer;
text-decoration: none;
&.question-delete {
// color: $mit-red;
}
&.question-edit, &.permant-link {
// color: darken(#F6EFD4, 45%);;
}
}
a.question-edit, a.permant-link {
color: #999;
}
}
......@@ -20,11 +20,11 @@
}
.action-link {
a {
color: darken(#F6EFD4, 50%);
color: $mit-red;
&:hover {
text-decoration: none;
color: darken(#F6EFD4, 70%);
color: darken($mit-red, 20%);
}
}
}
......@@ -43,14 +43,17 @@ body.askbot {
vertical-align: top;
width: flex-grid(9) + flex-gutter();
p.tabula-rasa {
.tabula-rasa {
@extend .light-button;
@include border-radius(5px);
background-color: #f6f6f6;
color: #888;
display: block;
margin: 10px auto;
padding: 20px;
text-align: center;
width: flex-grid(5);
text-decoration: none;
color: #888;
font-weight: bold;
&:first-child {
margin-top: 70px;
......@@ -59,14 +62,50 @@ body.askbot {
margin-bottom: 70px;
}
a {
text-decoration: none;
color: #888;
font-weight: bold;
}
}
}
}
}
}
// Autocomplete
.acInput {
width: 200px;
}
.acResults {
background-color: #fff;
border: 1px solid #ababab;
overflow: hidden;
padding: 0px;
@include box-shadow(0 2px 2px #bbb);
ul {
list-style-position: outside;
list-style: none;
margin: 0;
padding: 0;
width: 100%;
}
li {
cursor: pointer;
display: block;
font: menu;
margin: 0px;
overflow: hidden;
padding: 5px 10px;
text-align: left;
border-top: 1px solid #eee;
width: 100%;
}
}
.acLoading {
background : url('../images/indicator.gif') right center no-repeat;
}
.acSelect {
background-color: $mit-red;
color: #fff;
}
......@@ -13,17 +13,27 @@ form.answer-form {
}
div.form-item {
margin: 25px 0;
margin: 15px 0;
label {
display: block;
margin-bottom: -5px;
}
.title-desc {
@include box-sizing(border-box);
background: #333;
color: #fff;
font-size: 13px;
padding: 5px 10px;
width: flex-grid(6);
-webkit-font-smoothing: antialiased;
}
}
span.form-error, label.form-error {
color: #990000;
display: inline;
display: inline-block;
font-size: 90%;
font-weight: bold;
padding: 10px 0;
......@@ -78,6 +88,7 @@ form.question-form {
}
input[type="text"] {
@include box-sizing(border-box);
width: flex-grid(6);
}
......
.vote-notification {
background-color: darken($mit-red, 7%);
@include border-radius(4px);
@include box-shadow(0px 2px 9px #aaa);
color: white;
cursor: pointer;
display: none;
font-size: 14px;
font-weight: normal;
padding-bottom: 10px;
position: absolute;
text-align: center;
h3 {
background: $mit-red;
padding: 10px 10px 10px 10px;
font-size: 13px;
margin-bottom: 5px;
border-bottom: darken(#8e0000, 10%) 1px solid;
@include box-shadow(0 1px 0 lighten($mit-red, 10%));
color: #fff;
font-weight: normal;
@include border-radius(4px 4px 0 0);
}
a {
color: #fb7321;
text-decoration: underline;
font-weight: bold; } }
body.user-profile-page {
section.user-info {
// @extend .sidebar;
header {
@extend .clearfix;
border-bottom: 1px solid #d3d3d3;
@include box-shadow(0 1px 0 #eee);
padding: 0 lh();
margin: 0 (-(lh())) lh();
section {
float: left;
width: flex-grid(2, 3);
margin-right: flex-gutter(3);
h1 {
margin-top: 0;
}
}
p.karma {
float: left;
width: flex-grid(1, 3);
border: 1px solid #D3D3D3;
@include border-radius(3px);
@include box-shadow(inset 0 0 0 1px #fff, 0 1px 0 #fff);
background: #eee;
text-align: center;
padding: lh(.5) 0;
strong {
display: block;
font-style: 20px;
}
}
}
}
section.questions {
h1 {
@extend .top-header;
}
}
ul.sub-info {
border-top: 1px solid #ddd;
margin-top: lh();
list-style: none;
> li {
width: flex-grid(2.25, 9);
display: table-cell;
padding: (flex-gutter(9)/2);
border-right: 1px solid #ddd;
@include box-sizing(border-box);
&:first-child {
padding-left: 0;
}
&:last-child {
border-right: 0;
padding-right: 0;
}
h2 {
margin-top: 0;
}
span.tag-number {
display: none;
}
}
ul {
list-style: none;
&.user-stats-table {
list-style: none;
}
&.vote-buttons {
list-style: none;
li {
@include border-radius(4px);
background-color: lighten(#F6EFD4, 3%);
background-position: 10px center;
background-repeat: no-repeat;
height: 20px;
padding: 10px 10px 10px 40px;
display: inline-block;
&.up {
background-image: url(/static/images/askbot/vote-arrow-up.png);
margin-right: 6px;
}
&.down {
background-image: url(/static/images/askbot/vote-arrow-down.png);
}
}
}
&.badges {
@include border-radius(4px);
background-color: #e3e3e3;
@include inline-block();
a {
border: 0;
background: none;
text-transform: uppercase;
color: #292309;
font-size: 12px;
padding: 10px;
text-shadow: 0 1px 0 #fff;
display: block;
}
}
}
}
}
......@@ -72,7 +72,7 @@ div.question-header {
width: flex-grid(4,8);
a {
color: darken(#F6EFD4, 50%);
// color: darken(#F6EFD4, 50%);
&.question-delete {
color: $mit-red;
......@@ -80,7 +80,7 @@ div.question-header {
}
span.sep {
color: darken(#F6EFD4, 10%);
color: #ccc;
}
}
}
......@@ -100,11 +100,10 @@ div.question-header {
display: inline-block;
float: left;
width: flex-grid(1.8,8);
border-left: 1px dotted #CCC;
div.post-update-info {
@include box-sizing(border-box);
@include border-radius(5px);
background:lighten(#F6EFD4, 5%);
padding: 10px;
margin-bottom: 10px;
......@@ -127,29 +126,19 @@ div.question-header {
div.change-date {
font-size: 12px;
margin-bottom: 10px;
margin-bottom: 2px;
}
div.avatar {
div.user-meta {
display: inline-block;
float: left;
margin-right: 3px;
img.gravatar {
background: white;
border: 1px solid darken(#F6EFD4, 10%);
span.username {
font-size: 20px;
margin-right: 5px;
padding: 3px ;
vertical-align: bottom;
}
}
div.user-meta {
display: inline-block;
width: 60%;
span.user-badges {
display: block;
// display: block;
}
}
}
......@@ -158,16 +147,13 @@ div.question-header {
div.comments-container {
@include box-sizing(border-box);
// background: lighten(#efefef, 3%);
padding: 3%;
display: inline-block;
// margin: 15px 0 0;
padding: 3%;
padding: 0 0 3% 0;
width: 100%;
div.comments-content {
font-size: 13px;
background: lighten(#efefef, 4%);
background: #efefef;
div.block {
border-top: 1px solid #ddd;
......@@ -177,9 +163,6 @@ div.question-header {
&:first-child {
border-top: 0;
}
// &:last-child {
// border-bottom: 1px solid #ddd;
// }
}
form.post-comments {
......@@ -291,7 +274,7 @@ div.question-header {
}
.counter {
color: #888;
display: block;
display: none;
float: right;
margin-top: 5px;
text-align: right;
......@@ -299,7 +282,7 @@ div.question-header {
div.controls {
// padding: 15px 0;
background: lighten(#eeeeee, 4%);
background: #efefef ;
text-align: right;
a {
display: inline-block;
......@@ -311,4 +294,18 @@ div.question-header {
}
}
div.question-status {
background: $mit-red;
clear:both;
color: #fff;
display: block;
padding: 10px 0 10px 7.5%;
h3 {
font-weight: normal;
}
a {
color: #eee;
}
}
div.question-list-header {
display: block;
margin-bottom: 15px;
margin-bottom: 0px;
overflow: hidden;
width: flex-grid(9,9);
@extend h1.top-header;
section.question-list-meta {
display: block;
......@@ -14,6 +15,9 @@ div.question-list-header {
float: left;
}
h1 {
margin: 0;
}
span.label {
color: #555;
}
......@@ -30,6 +34,7 @@ div.question-list-header {
div.question-sort {
float: right;
margin-left: flex-gutter();
margin-top: 10px;
nav {
@extend .action-link;
......@@ -42,8 +47,8 @@ div.question-list-header {
&:before {
content: '|';
color: darken(#F6EFD4, 10%);
font-size: 22px;
color: #ccc;
font-size: 16px;
}
}
}
......@@ -53,8 +58,7 @@ div.question-list-header {
section.question-tags-list {
display: block;
min-height: 26px;
overflow: hidden;
padding-top:5px;
padding-top:15px;
width: 100%;
div {
......@@ -64,6 +68,7 @@ div.question-list-header {
div.back {
margin-right: 10px;
margin-top: 4px;
a {
color: #555;
......@@ -73,6 +78,14 @@ div.question-list-header {
div.tags-list {
}
ul.tags li {
background: #fff;
&:before {
border-color: transparent #fff transparent transparent;
}
}
}
}
......@@ -80,12 +93,26 @@ ul.question-list, div#question-list {
width: flex-grid(9,9);
li.single-question {
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
list-style: none;
padding: 10px 0;
padding: 10px 3%;
margin-left: -3%;
width: 100%;
&:hover {
background: lighten(#F6EFD4, 8%);
background: #F3F3F3;
ul.tags li {
background: #ddd;
&:before {
border-color: transparent #ddd transparent transparent;
}
}
}
&:first-child {
border-top: 0;
}
div {
......@@ -130,27 +157,31 @@ ul.question-list, div#question-list {
text-align: right;
li {
@include border-radius(3px);
@include linear-gradient(#fff, #f5f5f5);
border: 1px solid #ddd;
display: inline-block;
height:60px;
margin-right: 10px;
width: 60px;
&:hover {
span, div {
color: #555;
}
}
&.views {
background: lighten(#F6EFD4, 5%);
}
&.answers {
background: #F6EFD4;
}
&.votes {
background: darken(#F6EFD4, 5%);
}
span, div {
@include box-sizing(border-box);
color: darken(#F6EFD4, 60%);
color: #888;
display: block;
text-align: center;
}
......@@ -173,6 +204,23 @@ ul.question-list, div#question-list {
}
}
div.post-own-question {
padding: 11px;
margin-top: 10px;
color: #888;
text-align: center;
a {
font-weight: bold;
@extend .light-button;
padding: 20px;
display: block;
margin: 10px auto;
text-align: center;
width: flex-grid(5);
}
}
}
.search-result-summary {
......
div.discussion-wrapper aside {
@extend .sidebar;
@include box-shadow(inset 1px 0 0 #f6f6f6);
@include border-radius(0 4px 4px 0);
border-left: 1px solid #d3d3d3;
@include border-radius(0 4px 4px 0);
border-right: 1px solid #f6f6f6;
@include box-shadow(inset 1px 0 0 #f6f6f6);
padding: lh();
width: flex-grid(3);
h1 {
@extend .bottom-border;
margin: (-(lh())) (-(lh())) 0;
padding: lh(.5) lh();
}
h2 {
color: #4D4D4D;
......@@ -27,17 +31,28 @@ div.discussion-wrapper aside {
}
div.box {
@include box-shadow(0 1px 0 #eee);
border-bottom: 1px solid #d3d3d3;
display: block;
padding-bottom: 20px;
overflow: hidden;
margin: lh(.5) 0;
&:last-child {
@include box-shadow(none);
border: 0;
}
h2 {
text-transform: uppercase;
font-weight: bold;
font-size: 14px;
letter-spacing: 1px;
&:not(.first) {
@include box-shadow(inset 0 1px 0 #eee);
border-top: 1px solid #d3d3d3;
margin: 0 (-(lh())) 0;
padding: lh(.5) lh();
}
}
&.contributors {
a {
......@@ -70,11 +85,8 @@ div.discussion-wrapper aside {
}
}
#displayTagFilterControl {
margin-top: 10px;
}
div.search-box {
margin-top: lh(.5);
input {
@include box-sizing(border-box);
display: inline;
......@@ -107,9 +119,9 @@ div.discussion-wrapper aside {
input#clear {
@include box-shadow(none);
@include border-radius(5px);
@include border-radius(15px);
border: none;
background: $mit-red;
background: #bbb;
color: #fff;
display: inline;
font-size: 10px;
......@@ -118,6 +130,34 @@ div.discussion-wrapper aside {
}
}
div#tagSelector {
h2 {
@include box-shadow(inset 0 1px 0 #eee);
border-top: 1px solid #d3d3d3;
margin: 0 (-(lh())) 0;
padding: lh(.5) lh();
text-transform: uppercase;
font-weight: bold;
font-size: 14px;
letter-spacing: 1px;
}
ul {
margin: 0;
}
div.inputs {
margin-bottom: lh();
}
div#displayTagFilterControl {
p.choice {
@include inline-block();
margin-right: lh(.5);
}
}
}
// Question view sopecific
div.follow-buttons {
......@@ -136,11 +176,10 @@ div.discussion-wrapper aside {
div.question-stats {
ul {
color: #777;
list-style: none;
li {
@include box-shadow(0 1px 0 #eee);
border-bottom: 1px solid #d3d3d3;
padding: 7px 0;
padding: 7px 0 0;
&:last-child {
@include box-shadow(none);
......@@ -162,6 +201,3 @@ div.discussion-wrapper aside {
}
}
}
ul.tags {
list-style: none;
display: inline;
li, a {
position: relative;
}
li {
@include border-radius(4px);
background: #eee;
@include border-radius(4px);
@include box-shadow(0px 1px 0px #ccc);
color: #555;
display: inline-block;
font-size: 12px;
margin-bottom: 5px;
margin-left: 15px;
padding: 3px 10px 5px 5px;
margin-bottom: 5px;
&:before {
border-color:transparent #eee transparent transparent;
......@@ -20,15 +23,15 @@ ul.tags {
border-width:12px 12px 12px 0;
content:"";
height:0;
left:-11px;
left:-10px;
position:absolute;
top:0;
width:0;
}
span.delete-icon, div.delete-icon {
@include border-radius(0 4px 4px 0);
background: #555;
@include border-radius(0 4px 4px 0);
clear: none;
color: #eee;
cursor: pointer;
......@@ -36,7 +39,7 @@ ul.tags {
float: none;
left: 10px;
opacity: 0.5;
padding: 3px 6px;
padding: 4px 6px;
position: relative;
top: 1px;
......@@ -53,11 +56,12 @@ ul.tags {
}
span.tag-number {
@include border-radius(3px);
background: #555;
font-size: 10px;
margin: 0 3px;
padding: 2px 5px;
color: #eee;
opacity: 0.5;
display: none;
// @include border-radius(3px);
// background: #555;
// font-size: 10px;
// margin: 0 3px;
// padding: 2px 5px;
// color: #eee;
// opacity: 0.5;
}
......@@ -2,7 +2,7 @@
@include box-sizing(border-box);
margin: 0 auto;
max-width: $fg-max-width;
min-width: $fg-min-width;
// min-width: $fg-min-width;
padding: lh();
width: flex-grid(12);
}
......
......@@ -8,6 +8,11 @@ footer {
padding: lh() 0;
background: url('/static/images/marketing/mit-logo.png') right center no-repeat;
@media screen and (max-width: 780px) {
background-position: left bottom;
padding-bottom: lh(3);
}
a {
color: #888;
text-decoration: none;
......@@ -26,8 +31,13 @@ footer {
ul {
@include inline-block();
@media screen and (max-width: 780px) {
margin-top: lh();
}
li {
@include inline-block();
margin-bottom: 0;
&:after {
content: ' |';
......
......@@ -15,6 +15,10 @@ header.announcement {
div {
padding: lh(10) lh() lh(3);
@media screen and (max-width:780px) {
padding: lh(2.5) lh() lh(2);
}
//hide login link for homepage
nav {
h1 {
......@@ -41,7 +45,12 @@ header.announcement {
div {
padding: lh(4) lh() lh(2);
@media screen and (max-width:780px) {
padding: lh(2.5) lh() lh(2);
}
}
}
div {
......@@ -61,6 +70,7 @@ header.announcement {
@include inline-block();
margin-right: lh(.5);
a {
font: italic 800 18px $header-font-family;
color: #fff;
......@@ -87,43 +97,53 @@ header.announcement {
section {
@extend .clearfix;
@include inline-block();
background: $mit-red;
@include inline-block();
margin-left: flex-grid(4) + flex-gutter();
padding: lh() lh(1.5);
@media screen and (max-width: 780px) {
margin-left: 0;
}
h1 {
@include inline-block();
font-family: "Open Sans";
font-size: 30px;
font-weight: 800;
@include inline-block();
line-height: 1.2em;
margin: 0 lh() 0 0;
}
h2 {
@include inline-block();
font-family: "Open Sans";
font-size: 24px;
font-weight: 400;
@include inline-block();
line-height: 1.2em;
}
&.course {
section {
width: flex-grid(4, 8);
margin-right: flex-gutter(8);
float: left;
margin-left: 0;
margin-right: flex-gutter(8);
padding: 0;
width: flex-grid(4, 8);
@media screen and (max-width: 780px) {
float: none;
width: 100%;
margin-right: 0;
}
a {
@extend .button;
@include box-shadow(inset 0 1px 0 darken($mit-red, 10%), 0 1px 0 lighten($mit-red, 5%));
background-color: darken($mit-red, 20%);
border-color: darken($mit-red, 30%);
@include box-shadow(inset 0 1px 0 darken($mit-red, 10%), 0 1px 0 lighten($mit-red, 5%));
display: block;
padding: lh(.5) lh();
border-color: darken($mit-red, 30%);
text-align: center;
&:hover {
......@@ -137,6 +157,11 @@ header.announcement {
width: flex-grid(4, 8);
line-height: lh();
float: left;
@media screen and (max-width: 780px) {
float: none;
width: 100%;
}
}
}
}
......
......@@ -6,6 +6,12 @@ section.index-content {
@extend .clearfix;
float: left;
@media screen and (max-width: 780px) {
float: none;
width: auto;
margin-right: 0;
}
h1 {
font-size: 800 24px "Open Sans";
margin-bottom: lh();
......@@ -27,6 +33,13 @@ section.index-content {
padding-right: flex-gutter() / 2;
width: flex-grid(8);
@media screen and (max-width: 780px) {
width: 100%;
border-right: 0;
margin-right: 0;
padding-right: 0;
}
section {
@extend .clearfix;
margin-bottom: lh();
......@@ -35,8 +48,17 @@ section.index-content {
width: flex-grid(4, 8);
float: left;
@media screen and (max-width: 780px) {
float: none;
width: auto;
}
&:nth-child(odd) {
margin-right: flex-gutter(8);
@media screen and (max-width: 780px) {
margin-right: 0;
}
}
}
......@@ -48,6 +70,11 @@ section.index-content {
margin-right: flex-gutter(8);
width: flex-grid(4, 8);
@media screen and (max-width: 780px) {
margin-right: 0;
width: auto;
}
p {
margin-right: 0;
width: auto;
......@@ -58,6 +85,10 @@ section.index-content {
&.intro-video {
width: flex-grid(4, 8);
@media screen and (max-width: 780px) {
width: auto;
}
a {
display: block;
width: 100%;
......@@ -82,11 +113,14 @@ section.index-content {
h2 {
text-transform: uppercase;
letter-spacing: 1px;
color: #666;
color: #888;
margin-bottom: lh();
font-weight: normal;
font-size: 14px;
span {
text-transform: none;
}
}
......@@ -119,8 +153,17 @@ section.index-content {
float: left;
margin-bottom: lh(.5);
@media screen and (max-width: 780px) {
width: auto;
float: none;
}
&:nth-child(odd) {
margin-right: flex-gutter(8);
@media screen and (max-width: 780px) {
margin-right: 0;
}
}
}
}
......@@ -131,12 +174,17 @@ section.index-content {
&.course, &.staff {
width: flex-grid(4);
@media screen and (max-width: 780px) {
width: auto;
}
h1 {
color: #888;
font: normal $body-font-size $body-font-family;
text-transform: uppercase;
font-size: 14px;
letter-spacing: 1px;
color: #666;
margin-bottom: lh();
text-transform: uppercase;
}
h2 {
......@@ -149,6 +197,13 @@ section.index-content {
a {
@extend .button;
span.arrow {
color: rgba(#fff, .6);
font-style: normal;
@include inline-block();
padding-left: 10px;
}
}
ul {
......@@ -169,9 +224,18 @@ section.index-content {
background: url('/static/images/marketing/circuits-bg.jpg') 0 0 no-repeat;
@include background-size(contain);
@media screen and (max-width: 998px) {
@media screen and (max-width: 998px) and (min-width: 781px){
background: url('/static/images/marketing/circuits-medium-bg.jpg') 0 0 no-repeat;
}
@media screen and (max-width: 780px) {
padding-top: lh(5);
background: url('/static/images/marketing/circuits-bg.jpg') 0 0 no-repeat;
}
@media screen and (min-width: 500px) and (max-width: 781px) {
padding-top: lh(8);
}
}
}
......@@ -185,12 +249,26 @@ section.index-content {
padding-right: flex-gutter() / 2;
width: flex-grid(8);
@media screen and (max-width: 780px) {
width: auto;
border-right: 0;
margin-right: 0;
padding-right: 0;
}
section {
width: flex-grid(4, 8);
@media screen and (max-width: 780px) {
width: auto;
}
&.about-info {
margin-right: flex-gutter(8);
@media screen and (max-width: 780px) {
margin-right: 0;
}
}
&.requirements {
......@@ -205,6 +283,12 @@ section.index-content {
width: flex-grid(4, 8);
margin-right: flex-gutter(8);
@media screen and (max-width: 780px) {
margin-right: 0;
float: none;
width: auto;
}
&:nth-child(odd) {
margin-right: 0;
}
......@@ -225,6 +309,12 @@ section.index-content {
}
}
}
&.staff {
h1 {
margin-top: lh(1);
}
}
}
}
......
......@@ -5,7 +5,7 @@ $fg-column: 60px;
$fg-gutter: 25px;
$fg-max-columns: 12;
$fg-max-width: 1400px;
$fg-min-width: 810px;
$fg-min-width: 781px;
$gw-column: 60px;
$gw-gutter: 25px;
......@@ -14,17 +14,7 @@ $body-font-family: Georgia, serif;
$header-font-family: "Open Sans", Helvetica, Arial, sans-serif;
$body-font-size: 16px;
// @media screen and (min-width:1200px) {
// $body-font-size: 18px;
// }
// @media screen and (max-width:890px) {
// $body-font-size: 14px;
// }
$body-line-height: golden-ratio($body-font-size, 1);
$lh: golden-ratio($body-font-size, 1);
// Colors
$mit-red: #933;
......
div.header-wrapper {
// @include linear-gradient(lighten($mit-red, 5%), darken($mit-red, 5%));
@include box-shadow(inset 0 -1px 2px darken($mit-red, 10%));
background: $mit-red;
border-bottom: 1px solid #fff;
@include box-shadow(inset 0 -4px 6px darken($mit-red, 5%));
@media print {
display: none;
......@@ -17,25 +16,38 @@ div.header-wrapper {
hgroup {
@extend .clearfix;
float: left;
min-width: flex-grid(3);
padding-top: 13px;
h1 {
border-right: 1px solid darken($mit-red, 5%);
color: darken($mit-red, 25%);
font-size: 20px;
font-size: 18px;
font-weight: 800;
margin: 0 lh() 0 0;
padding: 17px lh() 14px 0;
text-shadow: 0 1px 0 lighten($mit-red, 10%);
line-height: lh();
@include inline-block();
line-height: lh();
margin: 0;
padding: 0 lh(.5) 0 0;
text-shadow: 0 1px 0 lighten($mit-red, 10%);
&:after {
color: darken($mit-red, 10%);
content: "•";
display: inline-block;
font-size: 10px;
letter-spacing: -2px;
padding-left: lh(.5);
text-shadow: 0;
}
}
h2 {
font-size: 16px;
@include inline-block();
margin: 0 lh() 0 0;
padding: 19px lh() 9px 0;
line-height: lh();
border-right: 1px solid darken($mit-red, 5%);
letter-spacing: 0;
margin: 0;
padding: 0 lh() 0px 0;
text-shadow: 0 -1px 0 darken($mit-red, 10%);
text-transform: none;
-webkit-font-smoothing: antialiased;
a {
......@@ -48,61 +60,123 @@ div.header-wrapper {
}
}
@media screen and (max-width: 920px) {
border-bottom: 1px solid darken($mit-red, 5%);
@media screen and (max-width: 900px) {
display: block;
float: none;
h1 {
float: right;
border: 0;
margin-right: 0;
padding-right: 0;
float: left;
}
h2 {
float: left;
border: 0;
float: left;
margin-right: 0;
padding-right: 0;
}
}
}
nav {
float: left;
background: #501016;
border-bottom: 1px solid darken(#501016, 10%);
@include border-radius(3px 3px 0 0);
@include box-shadow(inset 0 0 0 1px darken(#501016, 5%), inset 0 2px 0 lighten(#501016, 5%));
display: block;
margin: 0;
float: left;
margin: 5px 0 0;
padding: 0;
text-shadow: 0 -1px 0 darken($mit-red, 10%);
max-height: 52px; //fix for firefox
-webkit-font-smoothing: antialiased;
ul {
@extend .clearfix;
display: inline-block;
padding: 19px 0 9px;
margin: 0;
li {
margin-right: lh();
display: inline-block;
margin-bottom: 0;
line-height: lh();
margin-bottom: 0;
float: left;
a {
color: #fff;
display: block;
font-weight: bold;
padding: 10px lh() 8px;
text-decoration: none;
@media screen and (max-width: 1020px) {
padding: 10px lh(.7) 8px;
}
&:hover {
color: rgba(#fff, .7);
background-color: none;
text-decoration: none;
}
}
}
}
@media screen and (max-width: 900px) {
width: 100%;
float: none;
ul {
li {
padding: auto;
display: table-cell;
width: 16.6666666667%;
text-align: center;
}
}
}
.active {
background: #F4F4F4;
border: 1px solid darken(#501016, 10%);
border-bottom: 0;
@include border-radius(3px 3px 0 0);
@include box-shadow(0 2px 0 #f4f4f4, inset 0 1px 0 #fff);
color: #333;
text-shadow: 0 1px 0 #fff;
}
&.courseware {
li.courseware a {
@extend .active;
}
}
&.book {
li.book a {
@extend .active;
}
}
&.info {
li.info a {
@extend .active;
}
}
&.discussion {
li.discussion a {
@extend .active;
}
}
&.wiki {
li.wiki a {
@extend .active;
}
}
&.profile {
li.profile a {
@extend .active;
}
}
}
}
}
......@@ -11,11 +11,13 @@ html {
section.main-content {
@extend .clearfix;
@extend .wrapper;
@include box-sizing(border-box);
@include border-radius(4px);
overflow: hidden;
background: #fff;
border: 1px solid #bbb;
border-bottom: 1px solid #bbb;
@include box-shadow(0 0 4px #dfdfdf);
@include box-sizing(border-box);
margin-top: 3px;
overflow: hidden;
@media print {
border-bottom: 0;
......@@ -23,9 +25,7 @@ html {
}
@media screen and (min-width: 1400px) {
// @include border-radius(3px);
@include box-shadow(0 0 4px #dfdfdf);
border: 1px solid #bbb;
@include border-radius(4px);
margin-top: lh(.5);
}
}
......
......@@ -10,24 +10,24 @@
}
div.leanModal_box {
background: #fff;
border: none;
@include border-radius(3px);
@include box-shadow(0 0 6px #000);
@include box-sizing(border-box);
display: none;
border: none;
background: #fff;
padding: lh(2);
a.modal_close {
color: #aaa;
display: block;
font-style: normal;
height: 14px;
position: absolute;
top: 12px;
right: 12px;
display: block;
top: 12px;
width: 14px;
height: 14px;
z-index: 2;
color: #aaa;
font-style: normal;
&:hover{
text-decoration: none;
......@@ -36,19 +36,24 @@ div.leanModal_box {
}
h1 {
border-bottom: 1px solid #eee;
font-size: 24px;
margin-bottom: lh();
margin-top: 0;
padding-bottom: lh();
border-bottom: 1px solid #eee;
margin-bottom: lh();
text-align: left;
}
&#enroll {
max-width: 600px;
p.ie-warning {
display: none;
}
ol {
@extend .clearfix;
padding-top: lh();
li {
......@@ -63,16 +68,16 @@ div.leanModal_box {
&:hover {
div.tip {
display: block;
line-height: lh();
position: absolute;
background: #333;
color: #fff;
width: 500px;
display: block;
font-size: 16px;
line-height: lh();
margin: 0 0 0 -10px;
padding: 10px;
position: absolute;
-webkit-font-smoothing: antialiased;
font-size: 16px;
width: 500px;
}
}
}
......@@ -84,16 +89,16 @@ div.leanModal_box {
div#enroll_error, div#login_error, div#pwd_error {
$error-color: #333;
-webkit-font-smoothing: antialiased;
background-color: $error-color;
border: darken($error-color, 20%);
color: #fff;
text-shadow: 0 1px 0 darken($error-color, 10%);
font-family: "Open sans";
font-weight: bold;
letter-spacing: 1px;
margin: (-(lh())) (-(lh())) lh();
padding: lh(.5);
text-shadow: 0 1px 0 darken($error-color, 10%);
-webkit-font-smoothing: antialiased;
&:empty {
padding: 0;
......@@ -108,11 +113,11 @@ div.leanModal_box {
margin-bottom: lh(.5);
&.terms, &.remember {
float: none;
width: auto;
border-top: 1px solid #eee;
clear: both;
float: none;
padding-top: lh();
border-top: 1px solid #eee;
width: auto;
}
&.honor-code {
......@@ -139,11 +144,11 @@ div.leanModal_box {
margin: lh(.5) 0 lh() lh();
li {
list-style: disc outside none;
margin-bottom: lh(.5);
color: #666;
font-size: 14px;
float: none;
font-size: 14px;
list-style: disc outside none;
margin-bottom: lh(.5);
}
}
}
......
......@@ -7,3 +7,14 @@ body {
margin: 0;
overflow: hidden;
}
div#enroll {
p.ie-warning {
display: block !important;
line-height: 1.3em;
}
form {
display: none;
}
}
......@@ -2,6 +2,13 @@ div#wiki_panel {
@extend .sidebar;
overflow: auto;
h2 {
padding: lh(.5) lh();
font-size: 18px;
margin: 0 ;
@extend .bottom-border;
}
input[type="button"] {
@extend h3;
@include transition();
......
../data/problems/schematic_tutorial.html
\ No newline at end of file
......@@ -2,27 +2,29 @@
var ${ id }contents=["",
%for t in items:
${t[1]['content']} ,
${t['content']} ,
%endfor
""
];
var ${ id }types=["",
%for t in items:
"${t[1]['type']}" ,
"${t['type']}" ,
%endfor
""
];
var ${ id }init_functions=["",
%for t in items:
function(){ ${t[1]['init_js']} },
function(){ ${t['init_js']} },
%endfor
""];
var ${ id }titles=${titles};
var ${ id }destroy_functions=["",
%for t in items:
function(){ ${t[1]['destroy_js']} },
function(){ ${t['destroy_js']} },
%endfor
""];
......@@ -52,6 +54,7 @@ function ${ id }goto(i) {
function ${ id }setup_click(i) {
$('#tt_'+i).click(function(eo) { ${ id }goto(i);});
$('#tt_'+i).addClass("seq_"+${ id }types[i]+"_inactive");
$('#tt_'+i).attr("title", ${ id }titles[i-1]);
}
......
......@@ -65,35 +65,31 @@
});
</script>
<%block name="bodyextra">
<%block name="wiki_head"/>
</%block>
<%block name="bodyextra">
<%include file="navigation.html" args="active_page='wiki'" />
<section class="main-content">
<div class="wiki-wrapper">
<%block name="wiki_panel">
<%block name="wiki_panel">
<div id="wiki_panel">
<%
if (wiki_article is not UNDEFINED):
baseURL = reverse("wiki_view", args=[wiki_article.get_url()])
else:
baseURL = reverse("wiki_view", args=["/"])
%>
<h2>Course Wiki</h2>
<%
if (wiki_article is not UNDEFINED):
baseURL = reverse("wiki_view", args=[wiki_article.get_url()])
else:
baseURL = reverse("wiki_view", args=["/"])
%>
<ul class="action">
<!-- <li> -->
<!-- <input type="button" onclick="javascript:location.href='${reverse("wiki_random", args=[])}'" value="Random article" class="button" /> -->
<!-- </li> -->
<li>
<input type="button" onclick="javascript:location.href='${reverse("wiki_list_articles", args=[])}'" value="All articles" class="button" />
</li>
<li class="create-article">
<h3>
<a href="#" id="create-article"/>Create Article</a>
......
......@@ -8,6 +8,27 @@
${ wiki_article.title }
</%block>
<%block name="wiki_head">
<script>
$(function() {
//Store the initial contents of #id_contents (the wiki body field) so we can compare for unsaved changes
$("#id_contents").data('initial_contents', $("#id_contents").val());
window.onbeforeunload = function askConfirm() { //Warn the user before they navigate away
if ( $("#id_contents").val() != $("#id_contents").data('initial_contents') ) {
return "You have made changes to the article that have not been saved yet.";
}
};
$("#submit_edit").click(function() {
$("#id_contents").data('initial_contents', $("#id_contents").val());
});
});
</script>
</%block>
<%block name="wiki_body">
<form method="POST" id="wiki_revision">
<div style="display:none">
......
<div class="staff_info">
${xml | h}
</div>
<%inherit file="main.html" />
<%block name="js_extra">
<script>
var page=${ page };
......@@ -16,34 +18,51 @@ function goto_page(n) {
if(n<10) {
prefix="00";
}
$("#bookpage").attr("src","${ settings.BOOK_URL }p"+prefix+n+".jpg");
$("#bookpage").attr("src","${ settings.BOOK_URL }p"+prefix+n+".png");
};
function prev_page() {
var newpage=page-1;
if(newpage<1) newpage=1;
if(newpage<0) newpage=0;
goto_page(newpage);
log_event("book", {"type":"prevpage","new":page});
}
function next_page() {
var newpage=page+1;
if(newpage>1764) newpage=1764;
if(newpage>1008) newpage=1008;
goto_page(newpage);
log_event("book", {"type":"nextpage","new":page});
}
$("#open_close_accordion a").click(function(){
if ($(".book-wrapper").hasClass("closed")){
$(".book-wrapper").removeClass("closed");
} else {
$(".book-wrapper").addClass("closed");
}
});
</script>
</%block>
<%include file="navigation.html" args="active_page='book'" />
<section class="main-content">
<div class="book-wrapper">
<ul id="booknav" class="treeview-booknav">
<%include file="book_toc.html" />
</ul>
<section class="book">
<section class="book-sidebar">
<header id="open_close_accordion">
<h2>Table of Contents</h2>
<a href="#">close</a>
</header>
<ul id="booknav" class="treeview-booknav">
<%include file="book_toc.html" />
</ul>
</section>
<section class="book">
<section class="page">
<nav>
<ul>
......@@ -56,7 +75,18 @@ function next_page() {
</ul>
</nav>
<img id="bookpage" src="${ settings.BOOK_URL }p${ "%03i"%(page) }.jpg">
<img id="bookpage" src="${ settings.BOOK_URL }p${ "%03i"%(page) }.png">
<nav class="bottom-nav">
<ul>
<li class="last">
<a href="javascript:prev_page()">Previous page</a>
</li>
<li class="next">
<a href="javascript:next_page()">Next page</a>
</li>
</ul>
</nav>
</section>
</section>
</div>
......
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