Commit 084c4875 by David Ormsbee

Merge pull request #144 from MITx/kf-seq-nav

Added new styles for the sequence nav including completeness
parents 2ec12f59 aee2cf4e
...@@ -23,3 +23,7 @@ The dev server will automatically compile sass files that have changed. Simply s ...@@ -23,3 +23,7 @@ The dev server will automatically compile sass files that have changed. Simply s
the server using: the server using:
$ rake runserver $ rake runserver
To run it along side of development:
$ sass --watch lms/static/sass:lms/static/sass -r ./lms/static/sass/bourbon/lib/bourbon.rb
...@@ -205,7 +205,7 @@ h1.top-header { ...@@ -205,7 +205,7 @@ h1.top-header {
border-top: 1px solid #fff; border-top: 1px solid #fff;
// @include box-shadow(inset 0 1px 0 #fff, inset 1px 0 0 #fff); // @include box-shadow(inset 0 1px 0 #fff, inset 1px 0 0 #fff);
font-size: 12px; font-size: 12px;
height:46px; // height:46px;
line-height: 46px; line-height: 46px;
margin: (-$body-line-height) (-$body-line-height) $body-line-height; margin: (-$body-line-height) (-$body-line-height) $body-line-height;
text-shadow: 0 1px 0 #fff; text-shadow: 0 1px 0 #fff;
...@@ -224,7 +224,7 @@ h1.top-header { ...@@ -224,7 +224,7 @@ h1.top-header {
} }
&.block-link { &.block-link {
background: darken($cream, 5%); // background: darken($cream, 5%);
border-left: 1px solid darken($cream, 20%); border-left: 1px solid darken($cream, 20%);
@include box-shadow(inset 1px 0 0 lighten($cream, 5%)); @include box-shadow(inset 1px 0 0 lighten($cream, 5%));
display: block; display: block;
......
...@@ -17,7 +17,7 @@ nav.sequence-nav { ...@@ -17,7 +17,7 @@ nav.sequence-nav {
} }
li { li {
border-left: 1px solid darken($cream, 20%); border-left: 1px solid darken($cream, 10%);
display: table-cell; display: table-cell;
min-width: 20px; min-width: 20px;
...@@ -29,18 +29,17 @@ nav.sequence-nav { ...@@ -29,18 +29,17 @@ nav.sequence-nav {
background-repeat: no-repeat; background-repeat: no-repeat;
&:hover { &:hover {
background-color: lighten($cream, 3%); background-color: lighten($cream, 8%);
} }
} }
.visited { .visited {
background-color: #DCCDA2; background-color: darken($cream, 4%);
background-repeat: no-repeat; background-repeat: no-repeat;
@include box-shadow(inset 0 0 3px darken(#dccda2, 10%)); @include box-shadow(0);
&:hover { &:hover {
background-color: $cream; background-color: $cream;
background-position: center center;
} }
} }
...@@ -51,7 +50,6 @@ nav.sequence-nav { ...@@ -51,7 +50,6 @@ nav.sequence-nav {
&:hover { &:hover {
background-color: #fff; background-color: #fff;
background-position: center;
} }
} }
...@@ -61,86 +59,87 @@ nav.sequence-nav { ...@@ -61,86 +59,87 @@ nav.sequence-nav {
cursor: pointer; cursor: pointer;
display: block; display: block;
height: 17px; height: 17px;
padding: 15px 0 14px; padding: 15px 0 17px;
position: relative; position: relative;
@include transition(all, .4s, $ease-in-out-quad); @include transition(all, .4s, $ease-in-out-quad);
width: 100%; width: 100%;
background-position: center 8px;
&.progress {
border-bottom-style: solid;
border-bottom-width: 4px;
}
&.progress-none {
@extend .progress;
border-bottom-color: red;
}
&.progress-some {
@extend .progress;
border-bottom-color: yellow;
}
&.progress-done {
@extend .progress;
border-bottom-color: green;
}
//video //video
&.seq_video_inactive { &.seq_video_inactive {
@extend .inactive; @extend .inactive;
background-image: url('../images/sequence-nav/video-icon-normal.png'); background-image: url('../images/sequence-nav/video-icon-visited.png');
background-position: center;
} }
&.seq_video_visited { &.seq_video_visited {
@extend .visited; @extend .visited;
background-image: url('../images/sequence-nav/video-icon-visited.png'); background-image: url('../images/sequence-nav/video-icon-normal.png');
background-position: center;
} }
&.seq_video_active { &.seq_video_active {
@extend .active; @extend .active;
background-image: url('../images/sequence-nav/video-icon-current.png'); background-image: url('../images/sequence-nav/video-icon-current.png');
background-position: center;
} }
//other //other
&.seq_other_inactive { &.seq_other_inactive {
@extend .inactive; @extend .inactive;
background-image: url('../images/sequence-nav/document-icon-normal.png'); background-image: url('../images/sequence-nav/document-icon-visited.png');
background-position: center;
} }
&.seq_other_visited { &.seq_other_visited {
@extend .visited; @extend .visited;
background-image: url('../images/sequence-nav/document-icon-visited.png'); background-image: url('../images/sequence-nav/document-icon-normal.png');
background-position: center;
} }
&.seq_other_active { &.seq_other_active {
@extend .active; @extend .active;
background-image: url('../images/sequence-nav/document-icon-current.png'); background-image: url('../images/sequence-nav/document-icon-current.png');
background-position: center;
} }
//vertical & problems //vertical & problems
&.seq_vertical_inactive, &.seq_problem_inactive { &.seq_vertical_inactive, &.seq_problem_inactive {
@extend .inactive; @extend .inactive;
background-image: url('../images/sequence-nav/list-icon-normal.png'); background-image: url('../images/sequence-nav/list-icon-visited.png');
background-position: center;
} }
&.seq_vertical_visited, &.seq_problem_visited { &.seq_vertical_visited, &.seq_problem_visited {
@extend .visited; @extend .visited;
background-image: url('../images/sequence-nav/list-icon-visited.png'); background-image: url('../images/sequence-nav/list-icon-normal.png');
background-position: center;
} }
&.seq_vertical_active, &.seq_problem_active { &.seq_vertical_active, &.seq_problem_active {
@extend .active; @extend .active;
background-image: url('../images/sequence-nav/list-icon-current.png'); background-image: url('../images/sequence-nav/list-icon-current.png');
background-position: center; }
&:after {
content: " ";
display: block;
width: 11px;
height: 11px;
background: url('../images/sequence-nav/status/dash.png') no-repeat center;
@include position( absolute, 0 0 6px 50% );
margin-left: -5px;
}
//progress
&.progress-none {
&:after {
background: url('../images/sequence-nav/status/not-started.png') no-repeat center;
}
}
&.progress-some {
&:after {
background: url('../images/sequence-nav/status/wrong.png') no-repeat center;
}
}
&.progress-done {
&:after {
background: url('../images/sequence-nav/status/check.png') no-repeat center;
}
} }
p { p {
...@@ -180,6 +179,8 @@ nav.sequence-nav { ...@@ -180,6 +179,8 @@ nav.sequence-nav {
} }
&:hover { &:hover {
background-position: center 8px;
p { p {
display: block; display: block;
margin-top: 4px; margin-top: 4px;
...@@ -215,6 +216,7 @@ nav.sequence-nav { ...@@ -215,6 +216,7 @@ nav.sequence-nav {
display: block; display: block;
text-indent: -9999px; text-indent: -9999px;
@include transition(all, .2s, $ease-in-out-quad); @include transition(all, .2s, $ease-in-out-quad);
line-height: 49px;
&:hover { &:hover {
opacity: .5; opacity: .5;
......
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