_dashboard.scss 8.7 KB
Newer Older
1 2 3
// studio - views - user dashboard
// ====================

4
.view-dashboard {
5

6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
	// temp
	.content {
		margin-bottom: ($baseline*5);

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

	// ====================

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

	.content-primary {
	  width: flex-grid(9, 12);
	  margin-right: flex-gutter();
	}

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

	// ====================

	// elements - notices
	.content .notice-incontext {
		width: flexgrid(9, 9);

	  // CASE: notice has actions {
39
	  &.has-actions, &.list-notices .notice-item.has-actions {
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60

	    .msg, .list-actions {
	      display: inline-block;
	      vertical-align: middle;
	    }

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

	    .list-actions {
	      width: flex-grid(3, 9);
	      text-align: right;
	      margin-top: 0;

	      .action-item {

	      }

	      .action-create-course {
61 62
	      	@extend %btn-primary-green;
	      	@extend %t-action3;
63 64 65 66 67 68 69
	      }
	    }
	  }
	}



70 71
	// elements - course creation rights controls
	.wrapper-creationrights {
72 73 74
		overflow: hidden;

		.ui-toggle-control {
75 76
			@extend %ui-depth2;
			@extend %btn-secondary-gray;
77 78 79 80 81 82 83 84 85 86 87
			@include clearfix();
			display: block;
			text-align: left;

			// STATE: hover - syncing up colors with current so transition is smoother
			&:hover {
				background: $gray-d1;
				color: $white;
			}

			.label {
88
				@extend %t-action3;
89 90 91 92 93 94
				float: left;
				width: flex-grid(8, 9);
				margin: 3px flex-gutter() 0 0;
			}

			.icon-remove-sign {
95
				@extend %t-action1;
96 97
				@include transform(rotate(45deg));
				@include transform-origin(center center);
98
				@include transition(all $tmg-f1 linear 0s);
99 100 101 102 103 104
				float: right;
				text-align: right;
			}
		}

		.ui-toggle-target {
105
			@extend %ui-depth1;
106
			@include transition(opacity $tmg-f1 ease-in-out 0s);
107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133
			position: relative;
			top: -2px;
			display: none;
			opacity: 0;
		}

		// CASE: when the content area is shown
		&.is-shown {

			.ui-toggle-control {
				@include border-bottom-radius(0);

				.icon-remove-sign {
					@include transform(rotate(90deg));
					@include transform-origin(center center);
				}
			}

			.ui-toggle-target {
				display: block;
				opacity: 1.0;
			}
		}


	}

134 135
	// elements - course creation rights controls
	.status-creationrights {
136 137 138
		margin-top: $baseline;

		.title {
139
			@extend %t-title7;
140 141 142 143 144 145 146 147 148
			margin-bottom: ($baseline/4);
			font-weight: 700;
			color: $gray-d1;
		}

		.copy {

		}

149
		.list-actions, .form-actions {
150 151 152 153 154 155 156
      margin-top: ($baseline*0.75);

      .action-item {

      }

      .action-primary {
157 158
        @extend %btn-primary-blue;
        @extend %t-action3;
159
      }
160 161

      // specific - request button
162
      // BT: should we abstract these states out for all buttons like this
163 164 165 166 167 168 169 170 171 172 173 174 175 176
      .action-request {
      	position: relative;
      	overflow: hidden;

      	.icon-cog {
      		@include transition(all $tmg-f1 ease-in-out $tmg-f1);
      		@include font-size(20);
      		position: absolute;
      		top: ($baseline/2);
					left: -($baseline);
      		visibility: hidden;
      		opacity: 0.0;
      	}

177
        // state: submitting
178 179 180 181 182 183 184 185 186
      	&.is-submitting {
      		padding-left: ($baseline*2);

					.icon-cog {
						left: ($baseline*0.75);
						visibility: visible;
						opacity: 1.0;
					}
      	}
187 188 189 190 191 192 193 194 195 196 197 198 199

        // state: has an error
        &.has-error {
          padding-left: ($baseline*2);
          background: $red;
          border-color: $red-d1;

          .icon-cog {
            left: ($baseline*0.75);
            visibility: visible;
            opacity: 1.0;
          }
        }
200
      }
201 202 203 204 205
    }

    .status-update {

    	.label {
206
				@extend %cont-text-sr;
207 208 209
    	}

    	.value {
210
    		border-radius: ($baseline/4);
211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227
    		position: relative;
    		overflow: hidden;
    		padding: ($baseline/5) ($baseline/2);
    		background: $gray;

    		.status-indicator {
    		  position: absolute;
    		  top: 0;
    		  left: 0;
    		  display: block;
    		  width: 100%;
    		  height: ($baseline/4);
    		  opacity: 0.40;
    		}
    	}

			.value-formal, .value-description {
228
				border-radius: ($baseline/10);
229 230 231 232 233 234
				display: inline-block;
				vertical-align: middle;
				color: $white;
			}

    	.value-formal {
235
    		@extend %t-title5;
236 237 238 239 240 241 242 243 244
    		margin: ($baseline/2);
    		font-weight: 700;

    		[class^="icon-"] {
    			margin-right: ($baseline/4);
    		}
    	}

    	.value-description {
245
    		@extend %t-copy-sub1;
246 247
    		position: relative;
    		color: $white;
248
				opacity: 0.85;
249 250 251 252 253 254 255
    	}
    }

		// CASE: rights are not requested yet
		&.is-unrequested {

			.title {
256
				@extend %cont-text-sr;
257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275
			}
		}

		// CASE: status is pending
		&.is-pending {

			.status-update {

				.value {
					background: $orange;
				}

				.status-indicator {
					background: $orange-d1;
				}
			}
		}


276 277
    // CASE: status is denied
    &.is-denied {
278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293

    	.status-update {

    		.value {
    			background: $red-l1;
    		}

    		.status-indicator {
    			background: $red-s1;
    		}
    	}
    }
	}

	// ====================

294
  // ELEM: course listings
295
	.courses {
296
	  margin: $baseline 0;
297 298
	}

299
	.list-courses {
300
		margin-top: $baseline;
301
		border-radius: 3px;
302
		border: 1px solid $gray;
303
		background: $white;
304
		box-shadow: 0 1px 2px $shadow-l1;
305

306
		.course-item {
307 308
      @include box-sizing(border-box);
      width: flex-grid(9, 9);
309
			position: relative;
310
			border-bottom: 1px solid $gray-l1;
311
      padding: $baseline;
312

313 314 315
      // STATE: hover/focus
      &:hover {
        background: $paleYellow;
316

317 318 319 320
        .course-actions .view-live-button {
          opacity: 1.0;
          pointer-events: auto;
        }
321

322 323 324
        .course-title {
          color: $orange-d1;
        }
325

326 327 328 329
        .course-metadata {
          opacity: 1.0;
        }
      }
330

331 332 333 334 335
      .course-link, .course-actions {
        @include box-sizing(border-box);
        display: inline-block;
        vertical-align: middle;
      }
336

337 338
      // encompassing course link
      .course-link {
339
        @extend %ui-depth2;
340 341 342
        width: flex-grid(7, 9);
        margin-right: flex-gutter();
      }
343

344 345
      // course title
      .course-title {
346
        @extend %t-title4;
347 348 349
        margin: 0 ($baseline*2) ($baseline/4) 0;
        font-weight: 300;
      }
350

351 352
      // course metadata
      .course-metadata {
353
        @extend %t-copy-sub1;
354 355 356 357 358 359 360 361 362 363 364 365 366
        @include transition(opacity $tmg-f1 ease-in-out 0);
        color: $gray;
        opacity: 0.75;

        .metadata-item {
          display: inline-block;

          &:after {
            content: "/";
            margin-left: ($baseline/10);
            margin-right: ($baseline/10);
            color: $gray-l4;
          }
367

368 369 370 371 372 373 374 375 376 377
          &:last-child {

            &:after {
              content: "";
              margin-left: 0;
              margin-right: 0;
            }
          }

          .label {
378
            @extend %cont-text-sr;
379 380 381 382 383
          }
        }
      }

      .course-actions {
384
        @extend %ui-depth3;
385 386 387 388 389 390
        position: static;
        width: flex-grid(2, 9);
        text-align: right;

        // view live button
        .view-live-button {
391
          @extend %ui-depth3;
392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407
          @include transition(opacity $tmg-f2 ease-in-out 0);
          @include box-sizing(border-box);
          padding: ($baseline/2);
          opacity: 0.0;
          pointer-events: none;

          &:hover {
            opacity: 1.0;
            pointer-events: auto;
          }
        }

        &:last-child {
          border-bottom: none;
        }
      }
408 409
		}
	}
410

411 412 413 414 415 416 417 418 419 420 421 422 423 424 425
  // ELEM: new user form
  .wrapper-create-course {

    // CASE: when form is animating
    &.animate {

      // STATE: shown
      &.is-shown {
        height: ($baseline*26);

        // STATE: errors
        &.has-errors {
          height: ($baseline*33);
        }
      }
426
    }
427 428 429 430 431 432 433
  }

  // ====================

  // course listings

	.create-course {
434

435
		.row {
436 437
			@include clearfix();
			margin-bottom: ($baseline*0.75);
438
		}
439

440 441 442 443
		.column {
			float: left;
			width: 48%;
		}
444

445 446 447
		.column:first-child {
			margin-right: 4%;
		}
448

449
		label {
450
			@extend %t-title7;
451 452 453
			display: block;
			font-weight: 700;
		}
454

455 456
		.new-course-org,
		.new-course-number,
457 458
		.new-course-name,
		.new-course-run {
459 460
			width: 100%;
		}
461

462
		.new-course-name {
463
			@extend %t-title5;
464 465 466 467 468 469
			font-weight: 300;
		}

		.new-course-save {
			@include blue-button;
		}
470

471 472 473
		.new-course-cancel {
			@include white-button;
		}
474 475 476 477

		.item-details {
			padding-bottom: 0;
		}
478 479 480 481 482 483 484 485 486

	    .wrap-error {
	      @include transition(all $tmg-f2 ease 0s);
	      height: 0;
	      overflow: hidden;
	      opacity: 0;
	    }

	    .wrap-error.is-shown {
487
	      height: 65px;
488 489 490 491 492 493
	      opacity: 1;
	    }

	    .message-status {
	      display: block;
	      margin-bottom: 0;
494 495 496
	      padding: ($baseline*.5) ($baseline*1.5) 8px ($baseline*1.5);
	      font-weight: bold;
	    }
497

498
	}
499
}