_settings.scss 17.6 KB
Newer Older
1 2 3
// studio - views - course settings
// ====================

4
.view-settings {
5 6 7 8 9 10 11

  .content-primary, .content-supplementary {
    @include box-sizing(border-box);
    float: left;
  }

  .content-primary {
12
    @extend %ui-window;
13 14 15 16 17 18 19 20 21 22 23
    width: flex-grid(9, 12);
    margin-right: flex-gutter();
    padding: $baseline ($baseline*1.5);
  }

  // messages - should be synced up with global messages in the future
  .message {
    display: block;
    font-size: 14px;
  }

24
  .message-status {
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
    display: none;
    @include border-top-radius(2px);
    @include box-sizing(border-box);
    border-bottom: 2px solid $yellow;
    margin: 0 0 20px 0;
    padding: 10px 20px;
    font-weight: 500;
    background: $paleYellow;

    .text {
      display: inline-block;
    }

    &.error {
      border-color: shade($red, 50%);
      background: tint($red, 20%);
      color: $white;
    }

    &.confirm {
      border-color: shade($green, 50%);
      background: tint($green, 20%);
      color: $white;
    }

    &.is-shown {
      display: block;
    }
  }

55 56 57 58 59 60
  // notices - used currently for edx mktg
  .notice-workflow {
    margin-top: ($baseline);
  }


61 62 63 64 65 66 67 68 69 70 71 72 73 74
  // in form - elements
  .group-settings {
    margin: 0 0 ($baseline*2) 0;

    header {
      @include clearfix();

      .title-2 {
        width: flex-grid(4, 9);
        margin: 0 flex-gutter() 0 0;
        float: left;
      }

      .tip {
75
        @extend %t-copy-sub2;
76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94
        width: flex-grid(5, 9);
        float: right;
        margin-top: ($baseline/2);
        text-align: right;
        color: $gray-l2;
      }
    }

    // basic layout/elements
    .title-2 {

    }

    .title-3 {

    }

    // in form  -UI hints/tips/messages
    .instructions {
95
      @extend %t-copy-sub1;
96 97 98 99
      margin: 0 0 $baseline 0;
    }

    .tip {
100
      @extend %t-copy-sub2;
101
      @include transition(color $tmg-f2 ease-in-out 0s);
102 103 104 105 106 107
      display: block;
      margin-top: ($baseline/4);
      color: $gray-l3;
    }

    .message-error {
108
      @extend %t-copy-sub1;
109 110 111 112 113 114 115 116 117
      display: block;
      margin-top: ($baseline/4);
      margin-bottom: ($baseline/2);
      color: $red;
    }

    // buttons
    .remove-item {
      @include white-button;
118
      @extend %t-action3;
119 120 121 122
      font-weight: 400;
    }

    .new-button {
123
      // @extend %t-action3; - bad buttons won't render this properly
Brian Talbot committed
124
      @include font-size(14);
125 126 127 128 129 130 131 132 133
    }

    // form basics
    .list-input {
      margin: 0;
      padding: 0;
      list-style: none;

      .field {
134
        margin: 0 0 ($baseline*2) 0;
135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156

        &:last-child {
          margin-bottom: 0;
        }

        &.required {

          label {
            font-weight: 600;
          }

          label:after {
            margin-left: ($baseline/4);
            content: "*";
          }
        }

        label, input, textarea {
          display: block;
        }

        label {
157
          @extend %t-copy-sub1;
158
          @include transition(color $tmg-f2 ease-in-out 0s);
159 160 161 162 163 164 165 166 167
          margin: 0 0 ($baseline/4) 0;
          font-weight: 400;

          &.is-focused {
            color: $blue;
          }
        }

        input, textarea {
168
          @extend %t-copy-base;
169 170
          @include placeholder($gray-l4);
          @include size(100%,100%);
171
          padding: ($baseline/2);
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216

          &.long {
          }

          &.short {
          }

          &.error {
            border-color: $red;
          }

          &:focus {

            + .tip {
              color: $gray;
            }
          }
        }

        textarea.long {
          height: ($baseline*5);
        }

        input[type="checkbox"] {
          display: inline-block;
          margin-right: ($baseline/4);
          width: auto;
          height: auto;

          & + label {
            display: inline-block;
          }
        }
      }

      .field-group {
        @include clearfix();
        margin: 0 0 ($baseline/2) 0;
      }

      // enumerated/grouped lists
      &.enum {

        .field-group {
          @include box-sizing(border-box);
217
          border-radius: 3px;
218 219 220 221
          background: $gray-l5;
          padding: $baseline;

          &:last-child {
222
            padding-bottom: $baseline;
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 248 249 250 251 252
          }

          .actions {
            @include clearfix();
            margin-top: ($baseline/2);
            border-top: 1px solid $gray-l4;
            padding-top: ($baseline/2);

            .remove-item {
              float: right;
            }
          }
        }
      }
    }

    // existing inputs
    .input-existing {
      margin: 0 0 $baseline 0;

      .actions {
        margin: ($baseline/4) 0 0 0;
      }
    }

    // specific fields - basic
    &.basic {

      .list-input {
        @include clearfix();
253
        padding: 0 ($baseline/2);
254 255 256 257 258 259

        .field {
          margin-bottom: 0;
        }
      }

260 261 262 263 264 265 266 267
      // course details that should appear more like content than elements to change
      .field.is-not-editable {

        label {

        }

        input, textarea {
268
          @extend %t-copy-lead1;
269
          box-shadow: none;
270 271 272 273 274 275 276 277
          border: none;
          background: none;
          padding: 0;
          margin: 0;
          font-weight: 600;
        }
      }

278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293
      #field-course-organization {
        float: left;
        width: flex-grid(2, 9);
        margin-right: flex-gutter();
      }

      #field-course-number {
        float: left;
        width: flex-grid(2, 9);
        margin-right: flex-gutter();
      }

      #field-course-name {
        float: left;
        width: flex-grid(5, 9);
      }
294 295 296

      // course link note
      .note-promotion-courseURL {
297
        box-shadow: 0 2px 1px $shadow-l1;
298
        border-radius: ($baseline/5);
299
        margin-top: ($baseline*1.5);
300
        border: 1px solid $gray-l2;
301 302 303
        padding: ($baseline/2) 0 0 0;

        .title {
304
          @extend %t-copy-sub1;
305 306
          margin: 0 0 ($baseline/10) 0;
          padding: 0 ($baseline/2);
307 308 309 310 311

          .tip {
            display: inline;
            margin-left: ($baseline/4);
          }
312 313 314 315 316 317
        }

        .copy {
          padding: 0 ($baseline/2) ($baseline/2) ($baseline/2);

          .link-courseURL {
318
            @extend %t-copy-lead1;
319 320 321 322 323 324
            @include box-sizing(border-box);
            display: block;
            width: 100%;
            overflow: hidden;
            white-space: nowrap;
            text-overflow: ellipsis;
325 326 327 328 329 330 331 332

            &:hover {

            }
          }
        }

        .list-actions {
333
          box-shadow: inset 0 1px 1px $shadow-l1;
334
          border-top: 1px solid $gray-l2;
335 336 337 338 339
          padding:  ($baseline/2);
          background: $gray-l5;

          .action-primary {
            @include blue-button();
340
            @extend %t-action3;
341
            font-weight: 600;
342

343
            [class^="icon-"] {
344
              @extend %t-icon5;
345 346
              display: inline-block;
              vertical-align: middle;
347
              margin-top: -3px;
348 349 350 351
            }
          }
        }
      }
352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
    }

    // specific fields - schedule
    &.schedule {

      .list-input {
        margin-bottom: ($baseline*1.5);

        &:last-child {
          margin-bottom: 0;
        }
      }

      .field-group {
        @include clearfix();
        border-bottom: 1px solid $gray-l5;
        padding-bottom: ($baseline/2);

        &:last-child {
          border: none;
          padding-bottom: 0;
        }

        .field {
          float: left;
          width: flex-grid(3, 9);
          margin-bottom: ($baseline/4);
          margin-right: flex-gutter();
        }

        .field.time {
          position: relative;

          .tip {
            position: absolute;
            top: 0;
            right: 0;
          }
        }
      }
    }
393

394 395 396 397 398 399
    // specific fields - overview
    #field-course-overview {

      #course-overview {
        height: ($baseline*20);
      }
400 401 402 403 404

      //adds back in CodeMirror border removed due to Unit page styling of component editors
      .CodeMirror {
        border: 1px solid $gray-l2;
      }
405 406 407 408 409 410 411
    }

    // specific fields - video
    #field-course-introduction-video {

      .input-existing {
        @include box-sizing(border-box);
412
        border-radius: 3px;
413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434
        background: $gray-l5;
        padding: ($baseline/2);

        .actions {
          @include clearfix();
          margin-top: ($baseline/2);
          border-top: 1px solid $gray-l4;
          padding-top: ($baseline/2);

          .remove-item {
            float: right;
          }
        }
      }

      .actions {
        margin-top: ($baseline/2);
        border-top: 1px solid $gray-l5;
        padding-top: ($baseline/2);
      }
    }

435 436
    // specific fields - course image
    #field-course-image {
437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462

      .current-course-image {
        margin-bottom: ($baseline/2);
        padding: ($baseline/2) $baseline;
        background: $gray-l5;
        text-align: center;

        .wrapper-course-image {
          display: block;
          width: 375px;
          height: 200px;
          overflow: hidden;
          margin: 0 auto;
          border: 1px solid $gray-l4;
          box-shadow: 0 1px 1px $shadow-l1;
          padding: ($baseline/2);
          background: $white;
        }

        .course-image {
          display: block;
          width: 100%;
          min-height: 100%;
        }

        .msg {
463
          @extend %t-copy-sub2;
464 465 466
          display: block;
          margin-top: ($baseline/2);
          color: $gray-l3;
467
        }
468 469 470 471 472 473 474 475 476 477 478 479 480
      }

      .wrapper-input {
        @include clearfix();
        width: flex-grid(9,9);

        .input {
          float: left;
          width: flex-grid(6,9);
          margin-right: flex-gutter();
        }

        .action-upload-image {
481
          @extend %ui-btn-flat-outline;
482 483 484 485 486 487
          float: right;
          width: flex-grid(2,9);
          margin-top: ($baseline/4);
          padding: ($baseline/2) $baseline;
        }
      }
488 489
    }

490 491 492 493 494 495 496 497 498 499 500 501 502
    // specific fields - requirements
    &.requirements {

      #field-course-effort {
        width: flex-grid(3, 9);
      }
    }

    // specific fields - grading range (artifact styling)
    &.grade-range {
      margin-bottom: ($baseline*3);

      .grade-controls {
503
        @include clearfix();
504 505 506 507 508 509
        width: flex-grid(9,9);
      }

      .new-grade-button {
        @include box-sizing(border-box);
        @include linear-gradient(top, rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0));
510
        box-shadow: 0 1px 0 rgba(255, 255, 255, .3) inset;
511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598
        width: flex-grid(1,9);
        height: ($baseline*2);
        position: relative;
        display: inline-block;
        vertical-align: middle;
        margin-right: flex-gutter();
        border-radius: 20px;
        border: 1px solid $darkGrey;
        background-color: #d1dae3;
        color: #6d788b;

        .plus-icon {
          position: absolute;
          top: 50%;
          left: 50%;
          margin-left: -6px;
          margin-top: -6px;
        }
      }

      .grade-slider {
        @include box-sizing(border-box);
        width: flex-grid(8,9);
        display: inline-block;
        vertical-align: middle;

        .grade-bar {
          position: relative;
          width: 100%;
          height: ($baseline*2.5);
          background: $lightGrey;

          .increments {
            position: relative;

            li {
              position: absolute;
              top: 52px;
              width: 30px;
              margin-left: -15px;
              font-size: 9px;
              text-align: center;

              &.increment-0 {
                left: 0;
              }

              &.increment-10 {
                left: 10%;
              }

              &.increment-20 {
                left: 20%;
              }

              &.increment-30 {
                left: 30%;
              }

              &.increment-40 {
                left: 40%;
              }

              &.increment-50 {
                left: 50%;
              }

              &.increment-60 {
                left: 60%;
              }

              &.increment-70 {
                left: 70%;
              }

              &.increment-80 {
                left: 80%;
              }

              &.increment-90 {
                left: 90%;
              }

              &.increment-100 {
                left: 100%;
              }
            }
          }
599

600 601 602 603 604 605 606 607 608 609
          .grade-specific-bar {
            height: 50px !important;
          }

          .grades {
            position: relative;

            li {
              position: absolute;
              top: 0;
610
              height: 50px;
611
              text-align: right;
612
              border-radius: 2px;
613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676

              &:hover,
              &.is-dragging {
                .remove-button {
                  display: block;
                }
              }

              &.is-dragging {

              }

              .remove-button {
                display: none;
                position: absolute;
                top: -17px;
                right: 1px;
                height: 17px;
                font-size: 10px;
              }

              &:nth-child(1) {
                background: #4fe696;
              }

              &:nth-child(2) {
                background: #ffdf7e;
              }

              &:nth-child(3) {
                background: #ffb657;
              }

              &:nth-child(4) {
                background: #ef54a1;
              }

              &:nth-child(5),
              &.bar-fail {
                background: #fb336c;
              }

              .letter-grade {
                display: block;
                margin: 10px 15px 0 0;
                font-size: 16px;
                font-weight: 700;
                line-height: 14px;
              }

              .range {
                display: block;
                margin-right: 15px;
                font-size: 10px;
                line-height: 12px;
              }

              .drag-bar {
                position: absolute;
                top: 0;
                right: -1px;
                height: 50px;
                width: 2px;
                background-color: #fff;
677
                box-shadow: -1px 0 3px rgba(0,0,0,0.1);
678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730

                cursor: ew-resize;
                @include transition(none);

                &:hover {
                  width: 6px;
                  right: -2px;
                }
              }
            }
          }
        }
      }
    }

    // specific fields - grading rules
    &.grade-rules {

      #field-course-grading-graceperiod {
        width: flex-grid(3, 9);
      }
    }

    &.assignment-types {

      .list-input {

        &:last-child {
          margin-bottom: 0;
        }
      }

      .field-group {
        @include clearfix();
        width: flex-grid(9, 9);
        margin-bottom: ($baseline*1.5);
        border-bottom: 1px solid $gray-l5;
        padding-bottom: ($baseline*1.5);

        &:last-child {
          border: none;
          padding-bottom: 0;
        }

        .field {
          display: inline-block;
          vertical-align: top;
          width: flex-grid(3, 6);
          margin-bottom: ($baseline/2);
          margin-right: flex-gutter();
        }

        #field-course-grading-assignment-shortname,
731 732
        #field-course-grading-assignment-totalassignments,
        #field-course-grading-assignment-gradeweight,
733 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
        #field-course-grading-assignment-droppable {
          width: flex-grid(2, 6);
        }
      }

      .actions {
        float: left;
        width: flex-grid(9, 9);

        .delete-button {
          margin: 0;
        }
      }
    }

    // specific fields - advanced settings
    &.advanced-policies {

      .field-group {
        margin-bottom: ($baseline*1.5);

        &:last-child {
          border: none;
          padding-bottom: 0;
        }
      }

      .course-advanced-policy-list-item {
        @include clearfix();
        position: relative;

        .field {

          input {
            width: 100%;
          }

          .tip {
771
            @include transition(opacity $tmg-f1 ease-in-out 0s);
772
            opacity: 0.0;
773 774 775 776 777 778 779 780 781 782 783 784 785 786
            position: absolute;
            bottom: ($baseline*1.25);
          }

          input:focus {

            & + .tip {
              opacity: 1.0;
            }
          }

          input.error {

            & + .tip {
787
              opacity: 0.0;
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
            }
          }
        }

        .key, .value {
          float: left;
          margin: 0 0 ($baseline/2) 0;
        }

       .key {
         width: flex-grid(3, 9);
         margin-right: flex-gutter();
        }

        .value {
          width: flex-grid(6, 9);
        }

        .actions {
          float: left;
          width: flex-grid(9, 9);

          .delete-button {
            margin: 0;
          }
        }
      }

      .message-error {
        position: absolute;
        bottom: ($baseline*0.75);
      }

      // specific to code mirror instance in JSON policy editing, need to sync up with other similar code mirror UIs
      .CodeMirror {
823
        @extend %t-copy-base;
824
        @include box-sizing(border-box);
825
        box-shadow: 0 1px 2px rgba(0, 0, 0, .1) inset;
826 827 828 829 830 831 832 833
        @include linear-gradient($lightGrey, tint($lightGrey, 90%));
        padding: 5px 8px;
        border: 1px solid $mediumGrey;
        border-radius: 2px;
        background-color: $lightGrey;
        font-family: 'Open Sans', sans-serif;
        color: $baseFontColor;
        outline: 0;
834 835 836
        height: auto;
        min-height: ($baseline*2.25);
        max-height: ($baseline*10);
837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860

        &.CodeMirror-focused {
          @include linear-gradient($paleYellow, tint($paleYellow, 90%));
          outline: 0;
        }

        // editor color changes just for JSON
        .CodeMirror-lines {

          .cm-string {
            color: #cb9c40;
          }

          pre {
            line-height: 2.0rem;
          }
        }
      }
    }
  }

  .content-supplementary {
    width: flex-grid(3, 12);
  }
861
}