_header.scss 7.68 KB
Newer Older
1
// studio - elements - global header
2 3
// ====================

4
.wrapper-header {
5
  @extend %ui-depth3;
6 7
  position: relative;
  width: 100%;
8
  box-shadow: 0 1px 2px 0 $shadow-l1;
9 10 11
  margin: 0;
  padding: 0 $baseline;
  background: $white;
12

13
  header.primary {
14
    @include box-sizing(border-box);
15 16 17 18 19 20
    @include clearfix();
    max-width: $fg-max-width;
    min-width: $fg-min-width;
    width: flex-grid(12);
    margin: 0 auto;
  }
21

22
  // ====================
23

24
  // basic layout
25 26 27 28 29
  .wrapper-l, .wrapper-r {
    background: $white;
  }

  .wrapper-l {
30
    @include float(left);
31 32 33 34
    width: flex-grid(7,12);
  }

  .wrapper-r {
35
    @include float(right);
36
    width: flex-grid(4,12);
37
    @include text-align(right);
38 39
  }

40 41
  .branding, .info-course, .nav-course, .nav-account, .nav-pitch {
    @include box-sizing(border-box);
42
    display: inline-block;
43
    vertical-align: middle;
44 45
  }

asadiqbal committed
46 47 48 49 50 51 52 53 54 55 56
  .user-language-selector {
    width: 120px;
    display: inline-block;
    margin: 0 10px 0 5px;
    vertical-align: sub;

    .language-selector {
      width: 120px;
    }
  }

57
  .nav-account {
asadiqbal committed
58
    width: auto;
59 60
  }

61 62
  // basic layout - nav items
  nav {
63

64
    > ol > .nav-item {
65
      @extend %t-action3;
66
      @extend %t-strong;
67
      display: inline-block;
68 69
      vertical-align: middle;

70 71 72
      &:last-child {
        margin-right: 0;
      }
73
    }
74 75 76 77 78

    .nav-item a {
      color: $gray-d1;

      &:hover {
79
        color: $uxpl-blue-hover-active;
80 81
      }
    }
82 83
  }

84 85
  // basic layout - dropdowns
  .nav-dd {
86

87
    .title {
88 89
      @extend %t-action2;
      @extend %ui-btn-dd-nav-primary;
90
      @include transition(all $tmg-f2 ease-in-out 0s);
91

92
      .label, .fa-caret-down {
93

94 95
      }

96
      .label {
97

98
      }
99

100
      .fa-caret-down {
101
        opacity: 0.25;
102
      }
103

104
      &:hover {
105

106
        .fa-caret-down {
107 108 109
          opacity: 1.0;
        }
      }
110 111 112

      .nav-sub .nav-item {

113
        .icon {
114 115 116 117 118
          display: inline-block;
          vertical-align: middle;
          margin-right: ($baseline/4);
        }
      }
119
    }
120
  }
121

122
  // ====================
123

124 125
  // specific elements - branding
  .branding {
126
    padding: ($baseline*0.75) 0;
127

128
    a {
129
      display: block;
130

131
      img {
132
        max-height: ($baseline*2);
133 134 135
        display: block;
      }
    }
136
  }
137

138
  // ====================
139

140 141
  // specific elements - course name/info
  .info-course {
142 143
    @include margin-right(flex-gutter());
    @include border-right(1px solid $gray-l4);
144
    padding: ($baseline*0.75) flex-gutter() ($baseline*0.75) 0;
145

146
    .course-org, .course-number {
147
      @extend %t-action4;
148 149
      display: inline-block;
      vertical-align: middle;
150 151 152 153
      max-width: 45%;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
154 155
      opacity: 1.0;
      color: $gray-d3;
156 157 158
    }

    .course-org {
159
      @include margin-right($baseline/4);
160 161
    }

162
    .course-title {
163
      @extend %t-action2;
164
      @extend %t-strong;
165 166 167 168 169
      display: block;
      width: 100%;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
170 171
    }

172
    // entire link
173
    .course-link {
174
      @include transition(color $tmg-f2 ease-in-out 0s);
175
      display: block;
176
      color: $gray-d3;
177

178
      &:hover {
179
        color: $uxpl-blue-hover-active;
180
      }
181
    }
182 183
  }

184
  // ====================
185

186 187
  // specific elements - course nav
  .nav-course {
188
    padding: ($baseline*0.75) 0;
189
  }
190

191
  // ====================
192

193 194
  // specific elements - account-based nav
  .nav-account {
195 196
    position: relative;
    padding: ($baseline*0.75) 0;
197

198
    .nav-sub {
199
      @include text-align(left);
200 201
    }

202
    .nav-account-help {
203

204 205 206
      .wrapper-nav-sub {
        width: ($baseline*10);
      }
207 208
    }

209
    .nav-account-user {
210

211 212 213 214 215
      .title {
        max-width: ($baseline*6.5);

        > .label {
          display: inline-block;
216
          max-width: 84%;
217 218 219 220
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
        }
221
      }
222
    }
asadiqbal committed
223 224 225 226 227 228 229

    .settings-language-form {
      margin-top: 4px;
      .language-selector {
        width: 130px;
      }
    }
230
  }
231

232
  // ====================
233

234 235
  // specific elements - pitch/how it works nav
  .nav-pitch {
236 237 238 239 240 241
    position: relative;
    padding: ($baseline*0.75) 0;

    .nav-sub {
      text-align: left;
    }
242 243
  }
}
244 245 246

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

247 248
// CASE: user signed in
.is-signedin {
249

250
  .wrapper-l {
asadiqbal committed
251
    width: flex-grid(8,12);
252
  }
253

254
  .wrapper-r {
asadiqbal committed
255
    width: flex-grid(4,12);
256
  }
257

258
  .branding {
259
    @include margin-right(2%);
260 261 262 263
  }

  .nav-account {
    top: ($baseline/4);
264 265 266 267 268 269 270 271 272 273
  }
}

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

// CASE: in course {
.is-signedin.course {

  .wrapper-header {

274
    .wrapper-l {
Qubad786 committed
275
      width: flex-grid(9,12);
276 277 278
    }

    .wrapper-r {
Qubad786 committed
279
      width: flex-grid(3,12);
280 281
    }

282
    .branding {
283
      @include margin-right(2%);
284 285
    }

286
    .info-course {
287
      width: 25%;
288
      margin-right: 2%;
289
    }
Brian Talbot committed
290

291
    .nav-course {
292
      width: 45%;
293
    }
294 295 296
  }
}

297 298
// ====================

299
// CASE: user not signed in
300 301
.not-signedin,
.view-util {
302

303
  .wrapper-header {
304

305 306 307 308 309 310 311 312
    .wrapper-l {
      width: flex-grid(2,12);
    }

    .wrapper-r {
      width: flex-grid(10,12);
    }

313
    .branding {
314
      width: 100%;
315 316 317
    }

    .nav-pitch {
318
      top: ($baseline/4);
319 320 321 322 323 324 325 326 327 328

      .nav-item {
        margin-right: ($baseline/2);

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

      .action-signup {
329 330
        @include blue-button();
        @extend %t-action3;
331
        @extend %t-strong;
332 333 334 335 336
        padding: ($baseline/4) ($baseline/2);
        text-transform: uppercase;
      }

      .action-signin {
337 338
        @include white-button();
        @extend %t-action3;
339
        @extend %t-strong;
340 341 342
        padding: ($baseline/4) ($baseline/2);
        text-transform: uppercase;
      }
343
    }
344
  }
Brian Talbot committed
345
}
346 347 348 349 350 351 352 353 354 355 356 357

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

// STATE: active/current nav states

.nav-item.is-current,
body.howitworks .nav-not-signedin-hiw,

// dashboard
body.dashboard .nav-account-dashboard,

// course content
358 359 360 361 362 363 364 365 366 367 368 369
body.course.view-outline .nav-course-courseware .title,
body.course.view-updates .nav-course-courseware .title,
body.course.view-static-pages .nav-course-courseware .title,
body.course.view-uploads .nav-course-courseware .title,
body.course.view-textbooks .nav-course-courseware .title,
body.course.view-video-uploads .nav-course-courseware .title,

body.course.view-outline .nav-course-courseware-outline,
body.course.view-updates .nav-course-courseware-updates,
body.course.view-static-pages .nav-course-courseware-pages,
body.course.view-uploads .nav-course-courseware-uploads,
body.course.view-textbooks .nav-course-courseware-textbooks,
370
body.course.view-video-uploads .nav-course-courseware-videos,
371 372 373 374

// course settings
body.course.schedule .nav-course-settings .title,
body.course.grading .nav-course-settings .title,
375 376
body.course.view-team .nav-course-settings .title,
body.course.view-group-configurations .nav-course-settings .title,
377
body.course.advanced .nav-course-settings .title,
378
body.course.view-certificates .nav-course-settings .title,
379 380 381

body.course.schedule .nav-course-settings-schedule,
body.course.grading .nav-course-settings-grading,
382 383
body.course.view-team .nav-course-settings-team,
body.course.view-group-configurations .nav-course-settings-group-configurations,
384
body.course.advanced .nav-course-settings-advanced,
385
body.course.view-certificates .nav-course-settings-certificates,
386 387

// course tools
388 389 390 391 392 393 394 395 396 397
body.course.view-import .nav-course-tools .title,
body.course.view-export .nav-course-tools .title,
body.course.view-export-git .nav-course-tools .title,

body.course.view-import .nav-course-tools-import,
body.course.view-export .nav-course-tools-export,
body.course.view-export-git .nav-course-tools-export-git,

// content library settings
body.course.view-team .nav-library-settings .title,
398

399
body.course.view-team .nav-library-settings-team,
400 401

{
402
  color: $uxpl-blue-base;
403 404

  a {
405
    color: $uxpl-blue-base;
406 407 408
    pointer-events: none;
  }
}