Commit 7363a2fb by Reda Lemeden

Merge

parents 37d1ed27 611b4acf
...@@ -4,8 +4,12 @@ ...@@ -4,8 +4,12 @@
<!-- TODO: http://docs.jquery.com/Plugins/Validation --> <!-- TODO: http://docs.jquery.com/Plugins/Validation -->
<script type="text/javascript"> <script type="text/javascript">
$(function() { $(function() {
${init} ${init}
});
$(".sequence-nav li a").hover(function(){
$(this).siblings().toggle();
});
});
</script> </script>
</%block> </%block>
......
...@@ -85,6 +85,7 @@ ...@@ -85,6 +85,7 @@
<script type="text/javascript" src="/static/js/schematic.js"></script> <script type="text/javascript" src="/static/js/schematic.js"></script>
<script type="text/javascript" src="/static/js/cktsim.js"></script> <script type="text/javascript" src="/static/js/cktsim.js"></script>
<script> <script>
// Feedback form // Feedback form
$(function() { $(function() {
...@@ -117,6 +118,5 @@ $(function(){ ...@@ -117,6 +118,5 @@ $(function(){
</script> </script>
<%block name="js_extra"/> <%block name="js_extra"/>
</body> </body>
</html> </html>
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
@import "base/reset", "base/font-face"; @import "base/reset", "base/font-face";
@import "base/variables", "base/functions", "base/extends", "base/base"; @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/leanmodal";
@import "jquery-ui-1.8.16.custom"; @import "plugins/jquery-ui-1.8.16.custom";
// pages // pages
@import "courseware/courseware", "courseware/sidebar", "courseware/video", "courseware/sequence-nav", "courseware/amplifier"; @import "courseware/courseware", "courseware/sidebar", "courseware/video", "courseware/sequence-nav", "courseware/amplifier";
......
...@@ -6,102 +6,150 @@ nav.sequence-nav { ...@@ -6,102 +6,150 @@ nav.sequence-nav {
display: table-row; display: table-row;
float: left; float: left;
width: flex-grid(7.5,9) + flex-gutter(); width: flex-grid(7.5,9) + flex-gutter();
position: relative;
a { a {
@extend .block-link; @extend .block-link;
} }
.inactive { li {
background-repeat: no-repeat; display: table-cell;
.inactive {
background-repeat: no-repeat;
&:hover { &:hover {
background-color: lighten(#F6EFD4, 3%); background-color: lighten(#F6EFD4, 3%);
}
} }
}
.visited { .visited {
background-color: shade(#F6EFD4, 10%); background-color: shade(#F6EFD4, 10%);
background-repeat: no-repeat; background-repeat: no-repeat;
border-color: shade(#F6EFD4, 10%); border-color: shade(#F6EFD4, 10%);
&:hover { &:hover {
background-color: #F6EFD4; background-color: #F6EFD4;
background-position: center center;
}
} }
}
.active { .active {
// @include box-shadow(inset -1px 0 0 darken(#F6EFD4, 20%), inset 1px 0 0 darken(#F6EFD4, 20%)); // @include box-shadow(inset -1px 0 0 darken(#F6EFD4, 20%), inset 1px 0 0 darken(#F6EFD4, 20%));
@include box-shadow(0 1px 0 #fff); @include box-shadow(0 1px 0 #fff);
background-color: #fff;
background-repeat: no-repeat;
&:hover {
background-color: #fff; background-color: #fff;
background-repeat: no-repeat;
&:hover {
background-color: #fff;
background-position: center;
}
} }
}
li { a {
@include box-shadow(1px 0 0 #fff); @include box-shadow(1px 0 0 #fff);
background-position: center center; background-position: center center;
border: none; border: none;
border-right: 1px solid darken(#F6EFD4, 10%); border-right: 1px solid darken(#F6EFD4, 10%);
cursor: pointer; cursor: pointer;
display: table-cell; padding: 14px 4px;
padding: 14px 4px; width: 28px;
width: 28px; height: 17px;
// @media screen and (max-width: 800px) {
// padding: 12px 8px;
// }
//video
&.seq_video_inactive {
@extend .inactive;
background-image: url('/static/images/sequence-nav/video-icon-normal.png');
background-position: center;
}
// @media screen and (max-width: 800px) { &.seq_video_visited {
// padding: 12px 8px; @extend .visited;
// } background-image: url('/static/images/sequence-nav/video-icon-visited.png');
background-position: center;
}
//video &.seq_video_active {
&.seq_video_inactive { @extend .active;
@extend .inactive; background-image: url('/static/images/sequence-nav/video-icon-current.png');
background-image: url('/static/images/sequence-nav/video-icon-normal.png'); background-position: center;
} }
&.seq_video_visited { //other
@extend .visited; &.seq_other_inactive {
background-image: url('/static/images/sequence-nav/video-icon-visited.png'); @extend .inactive;
} background-image: url('/static/images/sequence-nav/document-icon-normal.png');
background-position: center;
}
&.seq_video_active { &.seq_other_visited {
@extend .active; @extend .visited;
background-image: url('/static/images/sequence-nav/video-icon-current.png'); background-image: url('/static/images/sequence-nav/document-icon-visited.png');
} background-position: center;
}
//other &.seq_other_active {
&.seq_other_inactive { @extend .active;
@extend .inactive; background-image: url('/static/images/sequence-nav/document-icon-current.png');
background-image: url('/static/images/sequence-nav/document-icon-normal.png'); background-position: center;
} }
&.seq_other_visited { //vertical & problems
@extend .visited; &.seq_vertical_inactive, &.seq_problem_inactive {
background-image: url('/static/images/sequence-nav/document-icon-visited.png'); @extend .inactive;
} background-image: url('/static/images/sequence-nav/list-icon-normal.png');
background-position: center;
}
&.seq_other_active { &.seq_vertical_visited, &.seq_problem_visited {
@extend .active; @extend .visited;
background-image: url('/static/images/sequence-nav/document-icon-current.png'); background-image: url('/static/images/sequence-nav/list-icon-visited.png');
} background-position: center;
}
//vertical & problems &.seq_vertical_active, &.seq_problem_active {
&.seq_vertical_inactive, &.seq_problem_inactive { @extend .active;
@extend .inactive; background-image: url('/static/images/sequence-nav/list-icon-current.png');
background-image: url('/static/images/sequence-nav/list-icon-normal.png'); background-position: center;
} }
}
&.seq_vertical_visited, &.seq_problem_visited { p {
@extend .visited; position: absolute;
background-image: url('/static/images/sequence-nav/list-icon-visited.png'); display: none;
} background: #B3A87E;
padding: 6px;
white-space: pre-wrap;
z-index: 99;
margin: 4px 0 0 -5px;
text-shadow: 0 -1px 0 darken(#B3A87E, 10%);
color: #fff;
&:empty {
background: none;
&::after {
display: none;
}
}
&.seq_vertical_active, &.seq_problem_active { &::after {
@extend .active; background: #B3A87E;
background-image: url('/static/images/sequence-nav/list-icon-current.png'); content: " ";
display: block;
height: 10px;
position: absolute;
top: -5px;
left: 18px;
@include transform(rotate(45deg));
@include transition();
width: 10px;
}
} }
} }
} }
......
...@@ -167,33 +167,6 @@ section.course-content { ...@@ -167,33 +167,6 @@ section.course-content {
@include inline-block(); @include inline-block();
} }
} }
// ol#video_speeds {
// @extend .clearfix;
// background: #333;
// border: 1px solid #000;
// font-weight: bold;
// @include inline-block();
// padding: 0 lh();
// position: absolute;
// right: 79px;
// @include box-shadow(inset 0 1px 0 #555);
// li {
// cursor: pointer;
// float: left;
// margin-bottom: 0;
// margin-right: lh(.5);
// &:last-child {
// margin-right: 0;
// }
// &:hover {
// color: $mit-red;
// }
// }
// }
} }
a.hide-subtitles { a.hide-subtitles {
......
<nav class="sequence-nav"> <nav class="sequence-nav">
<ol> <ol>
% for t in range(1,1+len(items)): % for t in range(1,1+len(items)):
<li class="seq_inactive" id="tt_${ t }">&nbsp;</li> <li><a href="#" class="seq_inactive" id="tt_${ t }"></a></li>
% endfor % endfor
</ol> </ol>
...@@ -11,8 +11,5 @@ ...@@ -11,8 +11,5 @@
</ul> </ul>
</nav> </nav>
<div id="seq_content"></div>
<!-- <td colspan=${ len(items) }> -->
<div id="seq_content"></div>
<!-- </td> -->
...@@ -54,7 +54,7 @@ function ${ id }goto(i) { ...@@ -54,7 +54,7 @@ function ${ id }goto(i) {
function ${ id }setup_click(i) { function ${ id }setup_click(i) {
$('#tt_'+i).click(function(eo) { ${ id }goto(i);}); $('#tt_'+i).click(function(eo) { ${ id }goto(i);});
$('#tt_'+i).addClass("seq_"+${ id }types[i]+"_inactive"); $('#tt_'+i).addClass("seq_"+${ id }types[i]+"_inactive");
$('#tt_'+i).attr("title", ${ id }titles[i-1]); $('#tt_'+i).parent().append("<p>" + ${ id }titles[i-1] + "</p>");
} }
......
...@@ -69,14 +69,6 @@ ...@@ -69,14 +69,6 @@
$(this).text((link_text == 'on') ? 'off' : 'on'); $(this).text((link_text == 'on') ? 'off' : 'on');
return false; return false;
}); });
/* $('.speeds ol').hide();
$('.speeds h3 a').click(function() {
$('.speeds ol').toggle();
return false;
});*/
}); });
</script> </script>
</%block> </%block>
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