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

4
.wrapper-header {
5
  @extend %ui-depth3;
6

7 8
  position: relative;
  width: 100%;
9
  box-shadow: 0 1px 2px 0 $shadow-l1;
10 11 12
  margin: 0;
  padding: 0 $baseline;
  background: $white;
13

14
  header.primary {
15
    @include box-sizing(border-box);
16
    @include clearfix();
17

18 19 20 21 22
    max-width: $fg-max-width;
    min-width: $fg-min-width;
    width: flex-grid(12);
    margin: 0 auto;
  }
23

24
  // ====================
25

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

  .wrapper-l {
33
    @include float(left);
34 35

    width: flex-grid(7, 12);
36 37 38
  }

  .wrapper-r {
39
    @include float(right);
40 41 42

    width: flex-grid(4, 12);

43
    @include text-align(right);
44 45
  }

46 47 48 49 50
  .branding,
  .info-course,
  .nav-course,
  .nav-account,
  .nav-pitch {
51
    @include box-sizing(border-box);
52

53
    display: inline-block;
54
    vertical-align: middle;
55 56
  }

asadiqbal committed
57 58 59 60 61 62 63 64 65 66 67
  .user-language-selector {
    width: 120px;
    display: inline-block;
    margin: 0 10px 0 5px;
    vertical-align: sub;

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

68
  .nav-account {
asadiqbal committed
69
    width: auto;
70 71
  }

72 73 74
  // basic layout - nav items
  nav {
    > ol > .nav-item {
75
      @extend %t-action3;
76
      @extend %t-strong;
77

78
      display: inline-block;
79 80
      vertical-align: middle;

81 82 83
      &:last-child {
        margin-right: 0;
      }
84
    }
85 86 87 88 89

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

      &:hover {
90
        color: $uxpl-blue-hover-active;
91 92
      }
    }
93 94
  }

95 96
  // basic layout - dropdowns
  .nav-dd {
97
    .title {
98 99
      @extend %t-action2;
      @extend %ui-btn-dd-nav-primary;
100

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

103
      .fa-caret-down {
104
        opacity: 0.25;
105
      }
106

107
      &:hover {
108
        .fa-caret-down {
109
          opacity: 1;
110 111
        }
      }
112 113

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

123
  // ====================
124

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

129
    a {
130
      display: block;
131

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

139
  // ====================
140

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

146
    padding: ($baseline*0.75) flex-gutter() ($baseline*0.75) 0;
147

148 149
    .course-org,
    .course-number {
150
      @extend %t-action4;
151

152 153
      display: inline-block;
      vertical-align: middle;
154 155 156 157
      max-width: 45%;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
158
      opacity: 1;
159
      color: $gray-d3;
160 161 162
    }

    .course-org {
163
      @include margin-right($baseline/4);
164 165
    }

166
    .course-title {
167
      @extend %t-action2;
168
      @extend %t-strong;
169

170 171 172 173 174
      display: block;
      width: 100%;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
175 176
    }

177
    // entire link
178
    .course-link {
179
      @include transition(color $tmg-f2 ease-in-out 0s);
180

181
      display: block;
182
      color: $gray-d3;
183

184
      &:hover {
185
        color: $uxpl-blue-hover-active;
186
      }
187
    }
188 189
  }

190
  // ====================
191

192 193
  // specific elements - course nav
  .nav-course {
194
    padding: ($baseline*0.75) 0;
195
  }
196

197
  // ====================
198

199 200
  // specific elements - account-based nav
  .nav-account {
201 202
    position: relative;
    padding: ($baseline*0.75) 0;
203

204
    .nav-sub {
205
      @include text-align(left);
206 207
    }

208
    .nav-account-help {
209 210 211
      .wrapper-nav-sub {
        width: ($baseline*10);
      }
212 213
    }

214
    .nav-account-user {
215 216 217 218 219
      .title {
        max-width: ($baseline*6.5);

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

    .settings-language-form {
      margin-top: 4px;
230

asadiqbal committed
231 232 233 234
      .language-selector {
        width: 130px;
      }
    }
235
  }
236

237
  // ====================
238

239 240
  // specific elements - pitch/how it works nav
  .nav-pitch {
241 242 243 244 245 246
    position: relative;
    padding: ($baseline*0.75) 0;

    .nav-sub {
      text-align: left;
    }
247 248
  }
}
249 250 251

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

252 253
// CASE: user signed in
.is-signedin {
254
  .wrapper-l {
255
    width: flex-grid(8, 12);
256
  }
257

258
  .wrapper-r {
259
    width: flex-grid(4, 12);
260
  }
261

262
  .branding {
263
    @include margin-right(2%);
264 265 266 267
  }

  .nav-account {
    top: ($baseline/4);
268 269 270 271 272 273 274 275
  }
}

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

// CASE: in course {
.is-signedin.course {
  .wrapper-header {
276
    .wrapper-l {
277
      width: flex-grid(9, 12);
278 279 280
    }

    .wrapper-r {
281
      width: flex-grid(3, 12);
282 283
    }

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

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

293
    .nav-course {
294
      width: 45%;
295
    }
296 297 298
  }
}

299 300
// ====================

301
// CASE: user not signed in
302 303
.not-signedin,
.view-util {
304
  .wrapper-header {
305
    .wrapper-l {
306
      width: flex-grid(2, 12);
307 308 309
    }

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

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
        @include blue-button();
330

331
        @extend %t-action3;
332
        @extend %t-strong;
333

334 335 336 337 338
        padding: ($baseline/4) ($baseline/2);
        text-transform: uppercase;
      }

      .action-signin {
339
        @include white-button();
340

341
        @extend %t-action3;
342
        @extend %t-strong;
343

344 345 346
        padding: ($baseline/4) ($baseline/2);
        text-transform: uppercase;
      }
347
    }
348
  }
Brian Talbot committed
349
}
350 351 352 353 354 355 356 357

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

// STATE: active/current nav states

.nav-item.is-current,
body.howitworks .nav-not-signedin-hiw,
body.dashboard .nav-account-dashboard,
358 359 360 361 362 363 364 365 366 367 368
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,
369
body.course.view-video-uploads .nav-course-courseware-videos,
370 371
body.course.schedule .nav-course-settings .title,
body.course.grading .nav-course-settings .title,
372 373
body.course.view-team .nav-course-settings .title,
body.course.view-group-configurations .nav-course-settings .title,
374
body.course.advanced .nav-course-settings .title,
375
body.course.view-certificates .nav-course-settings .title,
376 377
body.course.schedule .nav-course-settings-schedule,
body.course.grading .nav-course-settings-grading,
378 379
body.course.view-team .nav-course-settings-team,
body.course.view-group-configurations .nav-course-settings-group-configurations,
380
body.course.advanced .nav-course-settings-advanced,
381 382 383 384 385 386 387 388
body.course.view-certificates .nav-course-settings-certificates,
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,
body.course.view-team .nav-library-settings .title,
389
body.course.view-team .nav-library-settings-team {
390
  color: theme-color("primary");
391 392

  a {
393
    color: theme-color("primary");
394 395 396
    pointer-events: none;
  }
}