Skip to content
Snippets Groups Projects
_dashboard.scss 30.6 KiB
Newer Older
// lms - views - user/student dashboard
// ====================

// Table of Contents 
// * +Dashboard - Sidebar
// * +Dashboard - Course Listing
// * +Dashboard - Banner


// +Dashboard - Sidebar
// ==================== 
Matthew Mongeau's avatar
wip
Matthew Mongeau committed
.dashboard {
Matthew Mongeau's avatar
wip
Matthew Mongeau committed

  .profile-sidebar {
    @include float(right);
    @include margin-left(flex-gutter());
    width: flex-grid(3);
Matthew Mongeau's avatar
wip
Matthew Mongeau committed

      border-bottom: none;
      border-radius: ($baseline/4) ($baseline/4) 0 0;
        @extend %t-title6;
        @extend %t-ultrastrong;
        @extend %cont-truncated;
        display: block;
        padding: $baseline $baseline 0;
        border: 1px solid $border-color-2;
        border-top: none;
        border-radius: 0 0 ($baseline/4) ($baseline/4);
        padding: $baseline;
Matthew Mongeau's avatar
wip
Matthew Mongeau committed

          border-bottom: 1px dotted $border-color-2;
          &:last-child {
            border-bottom: none;
            margin-bottom: 0;
            padding-bottom: 0;
          }

Matthew Mongeau's avatar
wip
Matthew Mongeau committed

Matthew Mongeau's avatar
wip
Matthew Mongeau committed
            }
          }
            white-space: nowrap;
            text-overflow: ellipsis;
            overflow: hidden;

            .third-party-auth {
              color: inherit;
              font-weight: inherit;
            .auth-provider {
              width: flex-grid(12);
              display: block;
              margin-top: ($baseline/4);

              .status {
                width: flex-grid(1);
                display: inline-block;
                color: $gray-l2;

                width: flex-grid(9);
                display: inline-block;
              }

              .control {
                width: flex-grid(2);
                display: inline-block;
                text-align: right;

                a:link, a:visited {
                  @extend %t-copy-sub2;
                }
Matthew Mongeau's avatar
wip
Matthew Mongeau committed
        }

        li.order-history {
          span a {
            font-size: 13px;
            line-height: 20px;
          }
        }
Matthew Mongeau's avatar
wip
Matthew Mongeau committed
      }
        padding: 0 0 0 ($baseline/2);
        margin: ($baseline/4) 0;

        .status-item {
          @extend %t-copy-sub2;
          margin-bottom: 7px;
          border-bottom: 0;
          padding: 0;

            display: inline-block;
            vertical-align: top;
            margin: ($baseline/10) ($baseline/4) 0 0;
          }

            color: $alert-color;
          }

          .label {
            @extend %text-sr;
          }

          .course-name {
            @include line-height(12);
            display: inline-block;
            vertical-align: top;
            width: 80%;
            color: inherit;
          }
        }
      }
        .list--nav {
          margin: ($baseline/2) 0 0 0;
          padding: 0;
        .nav__item {
          @extend %t-weight4;
          @include font-size(13);
          margin-left: 26px;
Matthew Mongeau's avatar
wip
Matthew Mongeau committed
  }
Matthew Mongeau's avatar
wip
Matthew Mongeau committed

// +Dashboard - Course Listing
// ==================== 
.dashboard {
    width: flex-grid(9);
Matthew Mongeau's avatar
wip
Matthew Mongeau committed


    .wrapper-header-courses {
      border-bottom: 4px solid $border-color-l4;
      margin-bottom: $baseline;

      .header-courses {
        @extend %t-title5;
        @include padding-right($baseline/2);
      }
    // CASE: empty dashboard
      padding: ($baseline*2) 0;
      text-align: center;

      p {
        color: $lighter-base-font-color;
        font-style: italic;
        text-shadow: 0 1px rgba(255,255,255, 0.6);
        @include background-image($button-bg-image);
        background-color: $button-bg-color;
        border: 1px solid $border-color-2;
        @include box-sizing(border-box);
        color: $base-font-color;
        font-family: $sans-serif;
        display: inline-block;
        padding: 5px 10px;
        text-shadow: 0 1px rgba(255,255,255, 0.6);

          color: $link-color;
          text-decoration: none;
Matthew Mongeau's avatar
wip
Matthew Mongeau committed
        }
      }
    }
        margin-bottom: $baseline;
        border-bottom: 4px solid $border-color-l4;
        padding-bottom: $baseline;
        &:last-child {
          margin-bottom: 0;
          border-bottom: none;
          padding-bottom: 0;
        }
    // UI: individual course item
    .course {
      @include box-sizing(box);
      @include transition(all 0.15s linear 0s);
      @include clearfix();
      padding: ($baseline/2);
        .cover {
          @include box-sizing(border-box);
          @include transition(all 0.15s linear 0s);
          @include float(left);
          @include margin-right(flex-gutter());
          width: flex-grid(3);
          min-width: 150px;
          overflow: hidden;
          display: block;
          position: relative;
          max-height: 100%;
          height: 120px;
          border-radius: ($baseline/10);
          border: 1px solid $dashboard-course-cover-border;
          border-bottom: 4px solid $dashboard-course-cover-border;

          &:before {
            content: "";
            display: block;
            padding-top: 75%; // 4:3 aspect ratio
          img {
            display: block;
            position:  absolute;
            left: 0;
            bottom: 0;
            right: 0;
            width: 100%;
        }

        .wrapper-course-details {
          display: block;
          @include float(left);
          width: flex-grid(9);
          padding: 0;
          height: 120px;
        }
        .course-title {
          border-bottom: 2px solid $gray-l5;

          a, span {
            @extend %t-title3;
            @extend %t-light;
        .course-info {
          display: block;
          @include float(left);
          width: flex-grid(4);
          padding: 0;
          margin-top: ($baseline/2);

          [class*="info-"] {
            color: $gray-d1;
            @extend %t-title6;
            display: inline-block;
          }

          .info-date-block {
            @extend %t-title7;
            color: $gray-l1;
            display: block;
          }
        }

        .wrapper-course-actions {
          display: block;
          @include float(right);
          width: flex-grid(8);
          padding: 0;
          margin-top: ($baseline/2);
        }

        .course-actions {
          position: relative;
          top: 50%;
          transform: translateY(-50%);

          // UI: course item actions

          .action {
            @include box-sizing(border-box);
            @include margin-right($baseline/2);
            display: inline-block;
            float: right;
            min-width: ($baseline*2);
            color: $gray-l3;
            border-radius: 3px;
            padding: 12px;
            border: 1px solid $white;
            
            &:hover, &:focus {
              color: #333;
              border: 1px solid $gray-l4;
            }

            // STATE: is-disabled
            &.is-disabled {
              color: #808080;
              color: $gray-l4;
            }

            // TYPE: facebook share
            &.action-facebook, {
              color: #3b5998;
            }

            // TYPE: twitter share
            &.action-twitter {
              color: #55ACEE;
            }
          }

          // UI: general actions dropdown layout
          .wrapper-action-more {

            .actions-dropdown {
              @extend %ui-no-list;
              @extend %ui-depth1;
              display: none;
              position: absolute;
              top: ($baseline*2);
              left: 17px;
              pointer-events: none;
              min-width: ($baseline*6.5);

              &.is-expanded {
                display: block;
                pointer-events: auto;
              }

              .actions-dropdown-list {
                @extend %ui-no-list;
                display: table;
                @include box-sizing(border-box);
                box-shadow: 0 1px 1px $shadow-l1;
                position: relative;
                width: 100%;
                border-radius: 3px;
                margin: ($baseline/4) 0 0 0;
                border: 1px solid $gray-l3;
                padding: ($baseline/2) ($baseline*0.75);
                background: $white;

                // ui triangle/nub
                &:after,
                &:before {
                  bottom: 100%;
                  @include right(3px);
                  border: solid transparent;
                  content: " ";
                  height: 0;
                  width: 0;
                  position: absolute;
                  pointer-events: none;
                }

                &:after {
                  border-color: $transparent;
                  border-bottom-color: $white;
                  border-width: 6px;
                  @include margin-right(1px);
                }

                &:before {
                  border-color: $transparent;
                  border-bottom-color: $gray-l3;
                  border-width: 7px;
                }
              }

              .actions-item {
                @extend %t-title7;
                display: block;
                margin: 0;

                &.is-hidden {
                  display: none;
                }

                .action {
                  @include margin-right(0);

                  &:hover, &:focus {
                    border: 1px solid transparent;
                   }
                }
              }
            }
          }
        }

          border: 1px solid $border-color-2;
          box-shadow: 0 1px 0 0 rgba(255,255,255, 0.6);
          margin-top: 17px;
          margin-right: flex-gutter();
          width: flex-grid(8);
          float: left;
          @include box-sizing(border-box);
          color: $very-light-text;
          @include button(simple, $button-color);
          @include float(right);
          font: normal 15px/1.6rem $sans-serif;
          letter-spacing: 0;
            @include button(simple, $button-archive-color);
            font: normal 15px/1.6rem $sans-serif;
      // ====================
      // UI: message
      .wrapper-message-primary {
        @include clearfix();
      .messages-list {
        margin: 0;
        padding: 0;
      }
      .message {
        @extend %ui-depth1;
        border-radius: 3px;
        display: none;
        margin: $baseline 0 ($baseline/2) 0;
        padding: ($baseline*0.5) $baseline;
        background: $gray-l5;
        border: 1px solid $gray-l4;
        // STATE: shown
        &.is-shown {
          display: block;
        a {
          font-family: $sans-serif;
        strong {
          font-weight: 700;
        .actions {
          @include clearfix();
          list-style: none;
          margin: 0;
          padding: 0;
        .message-title,
        .message-copy .title {
          @extend %t-title6;
          @extend %t-weight4;
          line-height: 1em;
          margin-bottom: ($baseline/4);
        }
        .message-copy,
        .message-copy .copy {
          @extend %t-copy-sub1;
          margin: 2px 0 0 0;
        // CASE: expandable
        &.is-expandable {
            .message-title, .message-copy {
              margin-bottom: 0;
            }

            .message-title .value, .message-copy {
              @include transition(color $tmg-f2 ease-in-out 0s);
            }

            // STATE: hover
            &:hover {
              cursor: pointer;

              .message-title .value, .message-copy, .ui-toggle-expansion {
                color: $link-color;
              }
            }
          .wrapper-extended {
            @include transition(opacity $tmg-f2 ease-in-out 0);
            display: none;
            opacity: 0.0;
          // STATE: is expanded
          &.is-expanded {

            .ui-toggle-expansion {
              @include transform(rotate(0));
              @include transform-origin(50% 50%);
            }

            .wrapper-extended {
              display: block;
              opacity: 1.0;
            }
        // TYPE: upsell
        .message-upsell {
          .wrapper-tip {
            @include clearfix();
            .message-title {
              float: left;
            }
            .ui-toggle-expansion {
              @include transition(all $tmg-f2 ease-in-out 0s);
              @include transform-origin(50% 50%);
              @include font-size(21);
              display: inline-block;
              vertical-align: middle;
              margin-right: ($baseline/4);
              @include rtl {
                @include transform(rotate(90deg));
              }
              @include ltr {
                @include transform(rotate(-90deg));
              }
            }
            .message-copy {
              float: right;
            }
          }
          .wrapper-extended {
            padding: ($baseline/2) 0;
            .message-copy {
              margin-bottom: $baseline;
            }
          }
          .action-upgrade {
            @extend %btn-primary-green;
            @include clearfix();
            position: relative;
            left: ($baseline/2);
            padding: 8px $baseline 8px ($baseline*2);

            .deco-graphic {
              position: absolute;
              top: -($baseline/4);
              left: -($baseline*0.75);
              width: ($baseline*2);
            }
            span {
              color: $white; // nasty but needed override for poor <span> styling
            }
            .copy, .copy-sub {
              display: inline-block;
              vertical-align: middle;
            }

            .copy {
              @extend %t-action3;
              @extend %t-weight4;
              margin-right: $baseline;
            }

            .copy-sub {
              @extend %t-action4;
              opacity: 0.875;
            }
          }
        // TYPE: status
        .message-status {
          background: tint($yellow,70%);
          border-color: $gray-l3;
          .message-copy {
            @extend %t-copy-sub1;
            margin: 0;
            .grade-value {
              font-size: 1.2rem;
              font-weight: bold;
            }
          }
            .action {
              float: left;
              margin: 0 15px 0 0;
              .btn, .cta {
                display: inline-block;
              }

              .btn {
                @include box-sizing(border-box);
                border-radius: 3px;
                float: left;
                font: normal 0.8rem/1.2rem $sans-serif;
                letter-spacing: 1px;
                padding: 6px 12px;
                text-align: center;

                &.disabled {
                  cursor: default !important;

                  &:hover, &:focus {
                    background: #eee;
                    background-image: -webkit-linear-gradient(top, #EEE 0%, #C2C2C2 50%, #ABABAB 50%, #B0B0B0 100%);
                    background-image: -moz-linear-gradient(top, #EEE 0%, #C2C2C2 50%, #ABABAB 50%, #B0B0B0 100%);
                    background-image: -ms-linear-gradient(top, #EEE 0%, #C2C2C2 50%, #ABABAB 50%, #B0B0B0 100%);
                    background-image: -o-linear-gradient(top, #EEE 0%, #C2C2C2 50%, #ABABAB 50%, #B0B0B0 100%);
                    background-image: linear-gradient(top, #EEE 0%, #C2C2C2 50%, #ABABAB 50%, #B0B0B0 100%);
                  }
                }
              }
              .cta {
                float: left;
                font: normal 0.8rem/1.2rem $sans-serif;
                letter-spacing: 1px;
                padding: 6px 12px;
                text-align: center;
              }
            }
          .exam-registration-number {
            font-family: $sans-serif;
            font-size: 18px;
            a {
              font-family: $sans-serif;
          &.exam-register {
            .message-copy {
              margin-top: ($baseline/4);
              width: 55%;
            }
          &.exam-schedule {
            .exam-button {
              margin-top: ($baseline/4);
            }
          .exam-button {
            @include button(simple, $pink);
            margin-top: 0;
            float: right;
          }
          .contact-button {
            @include button(simple, $pink);
          }
          .button {
            display: inline-block;
            margin-top: ($baseline/2);
            padding: 9px 18px 10px;
            font-size: 13px;
            font-weight: bold;
            letter-spacing: 0;
            &:hover, &:focus {
              text-decoration: none;
            }
          &.course-status-processing {
            background-color: $gray-l5;
            border: 0;
          &.course-status-certnotavailable {
            background-color: $gray-l5;
            border: 0;
          }
          &.course-status-certrendering {
            background-color: $gray-l5;
            border: 0;
          &.course-status-certavailable {
            background-color: $gray-l5;
            border: 0;
            .message-copy {
              width: flex-grid(6, 12);
              position: relative;
              @include float(left);
            }
            .actions-primary {
              width: flex-grid(6, 12);
              position: relative;
              @include float(right);
              .action {
                @include margin(0, 0, ($baseline/2), ($baseline*.75));
                float: none;
                text-align: center;
                &:last-child {
                  margin-bottom: 0;
                }
              .action-certificate .btn {
                @extend %btn-inherited-primary;
                @include box-sizing(border-box);
                float: none;
                border-radius: 3px;
                display: block;
                @include padding(7px, ($baseline*.75), 7px, ($baseline*.75));
                text-align: center;
                a:link, a:visited {
                  color: #fff;
                }
              }
              .action-share .btn {
                display: inline;
                letter-spacing: 0;
              }
            }
          }
          .actions-secondary {
            margin-top: ($baseline/2);
            border-top: 1px solid $gray-l4;
            padding-top: ($baseline/2);
            .action-share {
              @include float(right);
              margin: 0;
            }
          }
          .certificate-explanation {
            @extend %t-copy-sub1;
            margin-top: ($baseline/2);
            border-top: 1px solid $gray-l4;
            padding-top: ($baseline/2);
          .verification-reminder {
            width: flex-grid(8, 12);
            position: relative;
          .verification-cta {
            width: flex-grid(4, 12);
            position: relative;

            .cta {
              @include button(simple, $green-d1);
              @include box-sizing(border-box);
              @include float(right);
              border-radius: 3px;
              display: block;
              font: normal 15px/1.6rem $sans-serif;
              letter-spacing: 0;
              padding: 6px 32px 7px;
              text-align: center;
            }
        // TYPE: pre-requisites 
        .prerequisites {
          @include clearfix;
          .tip {
            font-family: $sans-serif;
            font-size: 1em;
            color: $lighter-base-font-color;
            margin-top: ($baseline/2);
          }
      
      // "enrolled as" status
      .sts-enrollment {
        position: absolute;
        top: 105px;
        @include left(0);
        display: inline-block;
        text-align: center;
        width: 200px;
        .label {
          @extend %text-sr;
        .deco-graphic {
          position: absolute;
          top: -5px;
          right: -8px;
        .sts-enrollment-value {
          @extend %ui-depth1;
          @extend %copy-badge;
          font-size: 0.6em;
          line-height: 1.5em;
          font-weight: 600;
          border-radius: 0;
          padding: 1px ($baseline/2);
          color: white;
        }
      // ====================
      // CASE: "enrolled as" status - professional ed
      &.professional {