_learner-profile.scss 16.8 KB
Newer Older
muzaffaryousaf committed
1 2 3
// lms - application - learner profile
// ====================

4
.learner-achievements {
5 6
  .learner-message {
    @extend %no-content;
7

8
    margin: $baseline*0.75 0;
9

10 11 12 13
    .message-header,
    .message-actions {
      text-align: center;
    }
14

15 16 17 18 19 20
    .message-actions {
      margin-top: $baseline/2;

      .btn-brand {
        color: $white;
      }
21
    }
22
  }
23 24 25
}

.certificate-card {
26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
  display: flex;
  flex-direction: row;
  margin-bottom: $baseline;
  padding: $baseline/2;
  border: 1px;
  border-style: solid;
  background-color: $white;
  cursor: pointer;

  &:hover {
    box-shadow: 0 0 1px 1px $gray-l2;
  }

  .card-logo {
    @include margin-right($baseline);

    width: 100px;
    height: 100px;

    @media (max-width: $learner-profile-container-flex) { // Switch to map-get($grid-breakpoints,md) for bootstrap
      display: none;
47
    }
48 49 50
  }

  .card-content {
51
    color: $body-color;
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
    margin-top: $baseline/2;
  }

  .card-supertitle {
    @extend %t-title6;

    color: $lightest-base-font-color;
  }

  .card-title {
    @extend %t-title5;
    @extend %t-strong;

    margin-bottom: $baseline/2;
  }

  .card-text {
    @extend %t-title8;

    color: $lightest-base-font-color;
  }

  &.mode-audit {
    border-color: $audit-mode-color;
76 77

    .card-logo {
78 79 80
      background-image: url('#{$static-path}/images/certificates/audit.png');
    }
  }
81

82 83 84 85 86
  &.mode-honor {
    border-color: $honor-mode-color;

    .card-logo {
      background-image: url('#{$static-path}/images/certificates/honor.png');
87
    }
88
  }
89

90 91 92 93 94
  &.mode-verified {
    border-color: $verified-mode-color;

    .card-logo {
      background-image: url('#{$static-path}/images/certificates/verified.png');
95
    }
96 97 98 99
  }

  &.mode-professional {
    border-color: $professional-certificate-color;
100

101 102
    .card-logo {
      background-image: url('#{$static-path}/images/certificates/professional.png');
103
    }
104 105
  }
}
106

107 108 109 110 111
.view-profile {
  $profile-image-dimension: 120px;

  .window-wrap,
  .content-wrapper {
112
    background-color: $body-bg;
Harry Rein committed
113 114
    padding: 0;
    margin-top: 0;
115 116
  }

117 118 119 120 121
  .page-banner {
    background-color: $gray-l4;
    max-width: none;

    .user-messages {
122
      max-width: map-get($container-max-widths, xl);
123
      margin: auto;
Harry Rein committed
124
      padding: $baseline/2;
125 126 127
    }
  }

128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144
  .ui-loading-indicator {
    @extend .ui-loading-base;

    padding-bottom: $baseline;

    // center horizontally
    @include margin-left(auto);
    @include margin-right(auto);

    width: ($baseline*5);
  }

  .profile-image-field {
    button {
      background: transparent !important;
      border: none !important;
      padding: 0;
145 146
    }

147 148 149
    .u-field-image {
      padding-top: 0;
      padding-bottom: ($baseline/4);
150 151
    }

152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183
    .image-wrapper {
      width: $profile-image-dimension;
      position: relative;
      margin: auto;

      .image-frame {
        display: block;
        position: relative;
        width: $profile-image-dimension;
        height: $profile-image-dimension;
        border-radius: ($profile-image-dimension/2);
        overflow: hidden;
        border: 3px solid $gray-l6;
        margin-top: $baseline*-0.75;
        background: $white;
      }

      .u-field-upload-button {
        position: absolute;
        top: 0;
        opacity: 0;
        width: $profile-image-dimension;
        height: $profile-image-dimension;
        border-radius: ($profile-image-dimension/2);
        border: 2px dashed transparent;
        background: rgba(229, 241, 247, 0.8);
        color: $link-color;
        text-shadow: none;

        @include transition(all $tmg-f1 ease-in-out 0s);

        z-index: 6;
184

185 186
        i {
          color: $link-color;
187 188
        }

189 190 191
        &:focus,
        &:hover {
          @include show-hover-state();
192

193
          border-color: $link-color;
194 195
        }

196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
        &.in-progress {
          opacity: 1;
        }
      }

      .button-visible {
        @include show-hover-state();
      }

      .upload-button-icon,
      .upload-button-title {
        display: block;
        margin-bottom: ($baseline/4);

        @include transform(translateY(35px));
211

212 213 214
        line-height: 1.3em;
        text-align: center;
        z-index: 7;
215
        color: $body-color;
216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247
      }

      .upload-button-input {
        position: absolute;
        top: 0;

        @include left(0);

        width: $profile-image-dimension;
        border-radius: ($profile-image-dimension/2);
        height: 100%;
        cursor: pointer;
        z-index: 5;
        outline: 0;
        opacity: 0;
      }

      .u-field-remove-button {
        position: relative;
        display: block;
        width: $profile-image-dimension;
        margin-top: ($baseline / 4);
        padding: ($baseline / 5) 0 0;
        text-align: center;
        opacity: 0;
        transition: opacity 0.5s;
      }

      &:hover,
      &:active {
        .u-field-remove-button {
          opacity: 1;
248
        }
249
      }
250
    }
251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268
  }

  .wrapper-profile {
    min-height: 200px;
    background-color: $gray-l6;

    .ui-loading-indicator {
      margin-top: 100px;
    }
  }

  .profile-self {
    .wrapper-profile-field-account-privacy {
      @include clearfix();
      @include box-sizing(border-box);

      width: 100%;
      margin: 0 auto;
269
      border-bottom: 1px solid $gray-l3;
270
      background-color: $gray-l4;
Harry Rein committed
271
      padding: ($baseline*0.75) 5%;
272 273 274 275 276 277

      .u-field-account_privacy {
        @extend .container;

        border: none;
        box-shadow: none;
278
        padding: 0;
Harry Rein committed
279
        margin: 0;
280 281 282 283 284

        @media (max-width: $learner-profile-container-flex) { // Switch to map-get($grid-breakpoints,md) for bootstrap
          max-width: calc(100% - 40px);
          min-width: auto;
        }
285 286 287 288
      }

      .u-field-title {
        @extend %t-strong;
289

290
        width: auto;
291
        color: $body-color;
292 293 294 295 296 297
        cursor: text;
        text-shadow: none; // override bad lms styles on labels
      }

      .u-field-value {
        width: auto;
298

299 300 301 302 303 304 305 306
        @include margin-left($baseline/2);
      }

      .u-field-message {
        @include float(left);

        width: 100%;
        padding: 0;
307
        color: $body-color;
308 309 310

        .u-field-message-notification {
          color: $gray-d2;
311
        }
312
      }
313
    }
314
  }
muzaffaryousaf committed
315

316 317
  .wrapper-profile-sections {
    @extend .container;
Harry Rein committed
318
    @include padding($baseline*1.5, 5%, $baseline*1.5, 5%);
319

320
    display: flex;
321
    min-width: 0;
Harry Rein committed
322
    max-width: 100%;
323 324 325

    @media (max-width: $learner-profile-container-flex) { // Switch to map-get($grid-breakpoints,md) for bootstrap
      @include margin-left(0);
326

327
      flex-wrap: wrap;
muzaffaryousaf committed
328
    }
329
  }
muzaffaryousaf committed
330

331
  .profile-header {
332
    max-width: map-get($container-max-widths, xl);
333
    margin: auto;
Harry Rein committed
334
    padding: $baseline 5% 0;
muzaffaryousaf committed
335

336 337 338
    .header {
      @extend %t-title4;
      @extend %t-ultrastrong;
339

340 341
      display: inline-block;
    }
342

343 344 345 346
    .subheader {
      @extend %t-title6;
    }
  }
347

348 349
  .wrapper-profile-section-container-one {
    @media (max-width: $learner-profile-container-flex) { // Switch to map-get($grid-breakpoints,md) for bootstrap
Harry Rein committed
350
      width: 100%;
351
    }
352

353 354 355 356 357 358 359 360 361 362 363
    .wrapper-profile-section-one {
      width: 300px;
      background-color: $white;
      border-top: 5px solid $blue;
      padding-bottom: $baseline;

      @media (max-width: $learner-profile-container-flex) { // Switch to map-get($grid-breakpoints,md) for bootstrap
        @include margin-left(0);

        width: 100%;
      }
364

365 366 367 368 369 370 371 372 373 374 375 376 377 378 379
      .profile-section-one-fields {
        margin: 0 $baseline/2;

        .social-links {
          @include padding($baseline/4, 0, 0, $baseline/4);

          font-size: 2rem;

          & > span {
            color: $gray-l4;
          }

          a {
            .fa-facebook-square {
              color: $facebook-blue;
380 381
            }

382 383
            .fa-twitter-square {
              color: $twitter-blue;
384 385
            }

386 387
            .fa-linkedin-square {
              color: $linkedin-blue;
388
            }
389
          }
390 391
        }

392 393
        .u-field {
          font-weight: $font-semibold;
muzaffaryousaf committed
394

395
          @include padding(0, 0, 0, 3px);
muzaffaryousaf committed
396

397
          color: $body-color;
398 399 400 401 402 403 404 405 406 407
          margin-top: $baseline/5;

          .u-field-value,
          .u-field-title {
            font-weight: 500;
            width: calc(100% - 40px);
            color: $lightest-base-font-color;
          }

          .u-field-value-readonly {
408
            font-family: $font-family-sans-serif;
409 410
            color: $darkest-base-font-color;
          }
muzaffaryousaf committed
411

412 413 414 415 416
          &.u-field-dropdown {
            position: relative;

            &:not(.editable-never) {
              cursor: pointer;
muzaffaryousaf committed
417
            }
418
          }
muzaffaryousaf committed
419

420 421 422
          &:not(.u-field-readonly) {
            &.u-field-value {
              @extend %t-weight3;
muzaffaryousaf committed
423 424
            }

425 426 427
            &:not(:last-child) {
              padding-bottom: $baseline/4;
              border-bottom: 1px solid $border-color;
428

429 430 431 432
              &:hover.mode-placeholder {
                padding-bottom: $baseline/5;
                border-bottom: 2px dashed $link-color;
              }
muzaffaryousaf committed
433
            }
434
          }
muzaffaryousaf committed
435 436
        }

437 438 439
        & > .u-field {
          &:not(:first-child) {
            font-size: $body-font-size;
440
            color: $body-color;
441 442 443
            font-weight: $font-light;
            margin-bottom: 0;
          }
444

445 446 447
          &:first-child {
            @extend %t-title4;
            @extend %t-weight4;
448

449 450
            font-size: em(24);
          }
451 452
        }

453 454
        select {
          width: 85%;
455 456
        }

457 458 459 460 461 462 463 464 465 466
        .u-field-message {
          @include right(0);

          position: absolute;
          top: 0;
          width: 20px;

          .icon {
            vertical-align: baseline;
          }
467
        }
468
      }
muzaffaryousaf committed
469
    }
470
  }
muzaffaryousaf committed
471

472

473 474 475
  .wrapper-profile-section-container-two {
    @include float(left);
    @include padding-left($baseline);
muzaffaryousaf committed
476

477
    font-family: $font-family-sans-serif;
478
    flex-grow: 1;
479 480 481 482

    @media (max-width: $learner-profile-container-flex) { // Switch to map-get($grid-breakpoints,md) for bootstrap
      width: 90%;
      margin-top: $baseline;
Harry Rein committed
483
      padding: 0;
muzaffaryousaf committed
484 485
    }

486 487
    .u-field-textarea {
      @include padding(0, ($baseline*0.75), ($baseline*0.75), 0);
488

489 490 491 492 493 494 495 496 497 498 499 500 501 502
      margin-bottom: ($baseline/2);

      @media (max-width: $learner-profile-container-flex) { // Switch to map-get($grid-breakpoints,md) for bootstrap
        @include padding-left($baseline/4);
      }

      .u-field-header {
        position: relative;

        .u-field-message {
          @include right(0);

          top: $baseline/4;
          position: absolute;
503
        }
504
      }
muzaffaryousaf committed
505

506 507 508 509
      &.editable-toggle {
        cursor: pointer;
      }
    }
510

511 512
    .u-field-title {
      @extend %t-title6;
513

514 515 516 517 518
      display: inline-block;
      margin-top: 0;
      margin-bottom: ($baseline/4);
      color: $gray-d3;
      width: 100%;
519
      font: $font-semibold 1.4em/1.4em $font-family-sans-serif;
520
    }
521

522 523
    .u-field-value {
      @extend %t-copy-base;
524

525 526
      width: 100%;
      overflow: auto;
muzaffaryousaf committed
527

528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543
      textarea {
        width: 100%;
        background-color: transparent;
        border-radius: 5px;
        border-color: $gray-d1;
        resize: none;
        white-space: pre-line;
        outline: 0;
        box-shadow: none;
        -webkit-appearance: none;
      }

      a {
        color: inherit;
      }
    }
muzaffaryousaf committed
544

545 546
    .u-field-message {
      @include float(right);
547

548
      width: auto;
muzaffaryousaf committed
549

550 551 552 553
      .message-can-edit {
        position: absolute;
      }
    }
554

555 556 557 558
    .u-field.mode-placeholder {
      padding: $baseline;
      margin: $baseline*0.75 0;
      border: 2px dashed $gray-l3;
muzaffaryousaf committed
559

560 561
      i {
        font-size: 12px;
562

563
        @include padding-right(5px);
muzaffaryousaf committed
564

565
        vertical-align: middle;
566
        color: $body-color;
567
      }
muzaffaryousaf committed
568

569 570 571 572
      .u-field-title {
        width: 100%;
        text-align: center;
      }
573

574 575 576
      .u-field-value {
        text-align: center;
        line-height: 1.5em;
577

578
        @extend %t-copy-sub1;
579

580
        color: $body-color;
581
      }
582

583 584 585 586 587 588
      &:hover {
        border: 2px dashed $link-color;

        .u-field-title,
        i {
          color: $link-color;
589
        }
590 591 592 593 594
      }
    }

    .wrapper-u-field {
      font-size: $body-font-size;
595
      color: $body-color;
596 597

      .u-field-header .u-field-title {
598
        color: $body-color;
599 600 601 602 603
      }

      .u-field-footer {
        .field-textarea-character-count {
          @extend %t-weight1;
604

605 606 607
          @include float(right);

          margin-top: $baseline/4;
608
        }
609
      }
610 611
    }

612 613 614 615
    .profile-private-message {
      @include padding-left($baseline*0.75);

      line-height: 3em;
616
    }
617 618 619 620 621 622 623 624 625 626 627 628 629 630
  }

  .badge-paging-header {
    padding-top: $baseline;
  }

  .page-content-nav {
    @extend %page-content-nav;
  }

  .badge-set-display {
    @extend .container;

    padding: 0;
631

632 633 634 635 636
    .badge-list {
      // We're using a div instead of ul for accessibility, so we have to match the style
      // used by ul.
      margin: 1em 0;
      padding: 0 0 0 40px;
637 638
    }

639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654
    .badge-display {
      width: 50%;
      display: inline-block;
      vertical-align: top;
      padding: 2em 0;

      .badge-image-container {
        padding-right: $baseline;
        margin-left: 1em;
        width: 20%;
        vertical-align: top;
        display: inline-block;

        img.badge {
          width: 100%;
        }
655

656 657 658 659 660 661
        .accomplishment-placeholder {
          border: 4px dotted $gray-l4;
          border-radius: 50%;
          display: block;
          width: 100%;
          padding-bottom: 100%;
662
        }
663
      }
664

665 666 667 668 669 670 671 672 673 674 675 676 677
      .badge-details {
        @extend %t-copy-sub1;
        @extend %t-regular;

        max-width: 70%;
        display: inline-block;
        color: $gray-d1;

        .badge-name {
          @extend %t-strong;
          @extend %t-copy-base;

          color: $gray-d3;
678
        }
679 680 681 682

        .badge-description {
          padding-bottom: $baseline;
          line-height: 1.5em;
muzaffaryousaf committed
683
        }
684

685 686 687
        .badge-date-stamp {
          @extend %t-copy-sub1;
        }
688

689 690 691 692 693 694 695 696
        .find-button-container {
          border: 1px solid $blue-l1;
          padding: ($baseline / 2) $baseline ($baseline / 2) $baseline;
          display: inline-block;
          border-radius: 5px;
          font-weight: bold;
          color: $blue-s3;
        }
697

698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715
        .share-button {
          @extend %t-action3;
          @extend %button-reset;

          background: $gray-l6;
          color: $gray-d1;
          padding: ($baseline / 4) ($baseline / 2);
          margin-bottom: ($baseline / 2);
          display: inline-block;
          border-radius: 5px;
          border: 2px solid $gray-d1;
          cursor: pointer;
          transition: background 0.5s;

          .share-prefix {
            display: inline-block;
            vertical-align: middle;
          }
716

717 718
          .share-icon-container {
            display: inline-block;
719

720 721 722
            img.icon-mozillaopenbadges {
              max-width: 1.5em;
              margin-right: 0.25em;
723
            }
724
          }
725

726 727 728 729 730 731 732 733
          &:hover {
            background: $gray-l4;
          }

          &:active {
            box-shadow: inset 0 4px 15px 0 $black-t2;
            transition: none;
          }
734
        }
735
      }
736 737
    }

738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826
    .badge-placeholder {
      background-color: $gray-l7;
      box-shadow: inset 0 0 4px 0 $gray-l4;
    }
  }

  // ------------------------------
  // #BADGES MODAL
  // ------------------------------
  .badges-overlay {
    @extend %ui-depth1;

    position: fixed;
    top: 0;
    left: 0;
    background-color: $dark-trans-bg; /* dim the background */
    width: 100%;
    height: 100%;
    vertical-align: middle;

    .badges-modal {
      @extend %t-copy-lead1;
      @extend %ui-depth2;

      color: $lighter-base-font-color;
      box-sizing: content-box;
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%, -50%);
      width: 80%;
      max-width: 700px;
      max-height: calc(100% - 100px);
      margin-right: auto;
      margin-left: auto;
      border-top: rem(10) solid $blue-l2;
      background: $light-gray3;
      padding-right: ($baseline * 2);
      padding-left: ($baseline * 2);
      padding-bottom: ($baseline);
      overflow-x: hidden;

      .modal-header {
        margin-top: ($baseline / 2);
        margin-bottom: ($baseline / 2);
      }

      .close {
        @extend %button-reset;
        @extend %t-strong;

        color: $lighter-base-font-color;
        position: absolute;
        right: ($baseline);
        top: $baseline;
        cursor: pointer;
        padding: ($baseline / 4) ($baseline / 2);

        @include transition(all $tmg-f2 ease-in-out 0s);

        &:focus,
        &:hover {
          background-color: $blue-d2;
          border-radius: 3px;
          color: $white;
        }
      }

      .badges-steps {
        display: table;
      }

      .image-container {
        // Lines the image up with the content of the above list.
        @include ltr {
          @include padding-left(2em);
        }

        @include rtl {
          @include padding-right(1em);

          float: right;
        }
      }

      .backpack-logo {
        @include float(right);
        @include margin-left($baseline);
      }
827
    }
828 829 830 831 832 833 834 835 836
  }

  .modal-hr {
    display: block;
    border: none;
    background-color: $light-gray;
    height: rem(2);
    width: 100%;
  }
muzaffaryousaf committed
837
}