Files
edx-platform/lms/static/sass/features/_course-sock.scss
Harry Rein bdf38ae00e Implemented an upgrade verification sock.
This sock sits at the bottom of both the home and the course content pages. It allows the user to click a 'Learn More' button to open a panel that allows the user to navigate to the upgrade checkout page. The sock is only shown for users that have not yet upgraded in a course that has a verification upgrade date that has not yet passed. Python tests cover the various course mode and upgrade dates.
2017-06-15 13:10:34 -04:00

181 lines
4.0 KiB
SCSS

.verification-sock {
display: inline-block;
position: relative;
width: 100%;
margin-top: $baseline;
max-width: $lms-max-width;
margin: $baseline auto 0;
-webkit-transition: all 0.4s ease-out;
-moz-transition: all 0.4s ease-out;
-o-transition: all 0.4s ease-out;
-ms-transition: all 0.4s ease-out;
transition: all 0.4s ease-out;
.action-toggle-verification-sock {
@include left(50%);
@include margin-left(-1 * $baseline * 15/2);
position: absolute;
top: (-1 * $baseline);
width: ($baseline * 15);
color: $button-bg-hover-color;
background-color: $success-color;
border-color: $success-color;
background-image: none;
box-shadow: none;
-webkit-transition: background-color 0.5s;
transition: background-color 0.5s;
&.active {
color: $success-color;
background-color: $button-bg-hover-color;
border-color: $success-color;
background-image: none;
box-shadow: none;
&:hover {
color: $button-bg-hover-color;
background-color: $success-color-hover;
border-color: $success-color-hover;
background-image: none;
box-shadow: none;
}
}
&:hover {
color: $button-bg-hover-color;
background-color: $success-color-hover;
border-color: $success-color-hover;
background-image: none;
box-shadow: none;
}
}
.verification-main-panel {
display: none;
overflow: hidden;
border-top: 1px solid $lms-border-color;
padding: ($baseline * 5/2) ($baseline * 2);
-webkit-transition: height ease-out;
transition: height ease-out;
.verification-desc-panel {
color: $black-t3;
position: relative;
@media (max-width: 960px) {
.mini-cert {
display: none;
border: 1px solid $black-t0;
}
}
.mini-cert {
@include right($baseline);
position: absolute;
top: $baseline;
width: ($baseline * 13);
}
h2 {
font-size: 1.5rem;
font-weight: 700;
}
h4 {
font-size: 1.25rem;
font-weight: 600;
}
.learner-story-container {
display: flex;
max-width: 630px;
.student-image {
margin: ($baseline / 4) $baseline 0 0;
height: ($baseline * 5/2);
width: ($baseline * 5/2);
}
.story-quote > .author{
display: block;
margin-top: ($baseline / 4);
font-weight: 600;
}
&:not(:first-child) {
margin-top: ($baseline * 2);
}
}
.action-upgrade-certificate {
position: absolute;
right: $baseline;
background-color: $success-color;
border-color: $success-color;
background-image: none;
box-shadow: none;
@media (max-width: 960px) {
& {
position: relative;
margin-top: ($baseline * 2);
}
}
@media (min-width: 960px) {
&.stuck-top {
bottom: auto;
top: $baseline * (52 / 5);
}
&.stuck-bottom {
top: auto;
bottom: $baseline * (-1 * 3/2);
}
&.attached {
@include right($baseline);
position: fixed;
bottom: $baseline;
top: auto;
}
}
&:hover {
background-color: $success-color-hover;
border-color: $success-color-hover;
}
}
}
}
}
// Overrides for the courseware page.
.view-courseware {
.verification-sock {
margin-top: 0;
border-top: none;
border-bottom: none;
.action-toggle-verification-sock {
top: (-1 * $baseline * 5/4);
&:not(.active) {
color: $button-bg-hover-color;
background-color: $success-color;
box-shadow: none;
border: 1px solid $success-color;
&:hover {
background-color: $success-color-hover;
}
}
}
.verification-main-panel {
border-top: 0;
border-bottom: 1px solid $lms-border-color;
}
}
}