_header.scss 6.65 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
  }

46 47 48 49
  .nav-account {
    width: 100%;
  }

50 51
  // basic layout - nav items
  nav {
52

53
    > ol > .nav-item {
54
      @extend %t-action3;
55
      @extend %t-strong;
56
      display: inline-block;
57 58
      vertical-align: middle;

59 60 61
      &:last-child {
        margin-right: 0;
      }
62
    }
63 64 65 66 67 68 69 70

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

      &:hover {
        color: $blue-s1;
      }
    }
71 72
  }

73 74
  // basic layout - dropdowns
  .nav-dd {
75

76
    .title {
77 78
      @extend %t-action2;
      @extend %ui-btn-dd-nav-primary;
79
      @include transition(all $tmg-f2 ease-in-out 0s);
80

81
      .label, .fa-caret-down {
82

83 84
      }

85
      .label {
86

87
      }
88

89
      .fa-caret-down {
90
        opacity: 0.25;
91
      }
92

93
      &:hover {
94

95
        .fa-caret-down {
96 97 98
          opacity: 1.0;
        }
      }
99 100 101

      .nav-sub .nav-item {

102
        .icon {
103 104 105 106 107
          display: inline-block;
          vertical-align: middle;
          margin-right: ($baseline/4);
        }
      }
108
    }
109
  }
110

111
  // ====================
112

113 114
  // specific elements - branding
  .branding {
115
    padding: ($baseline*0.75) 0;
116

117
    a {
118
      display: block;
119

120
      img {
121
        max-height: ($baseline*2);
122 123 124
        display: block;
      }
    }
125
  }
126

127
  // ====================
128

129 130
  // specific elements - course name/info
  .info-course {
131 132
    @include margin-right(flex-gutter());
    @include border-right(1px solid $gray-l4);
133
    padding: ($baseline*0.75) flex-gutter() ($baseline*0.75) 0;
134

135
    .course-org, .course-number {
136
      @extend %t-action4;
137 138
      display: inline-block;
      vertical-align: middle;
139 140 141 142
      max-width: 45%;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
143 144 145 146
      opacity: 0.75;
    }

    .course-org {
147
      @include margin-right($baseline/4);
148 149
    }

150
    .course-title {
151
      @extend %t-action2;
152
      @extend %t-strong;
153 154 155 156 157
      display: block;
      width: 100%;
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
158 159
    }

160
    // entire link
161
    .course-link {
162
      @include transition(color $tmg-f2 ease-in-out 0s);
163
      display: block;
164
      color: $gray-d1;
165

166
      &:hover {
167
        color: $blue-s1;
168
      }
169
    }
170 171
  }

172
  // ====================
173

174 175
  // specific elements - course nav
  .nav-course {
176
    padding: ($baseline*0.75) 0;
177
  }
178

179
  // ====================
180

181 182
  // specific elements - account-based nav
  .nav-account {
183 184
    position: relative;
    padding: ($baseline*0.75) 0;
185

186
    .nav-sub {
187
      @include text-align(left);
188 189
    }

190
    .nav-account-help {
191

192 193 194
      .wrapper-nav-sub {
        width: ($baseline*10);
      }
195 196
    }

197
    .nav-account-user {
198

199 200 201 202 203
      .title {
        max-width: ($baseline*6.5);

        > .label {
          display: inline-block;
204
          max-width: 84%;
205 206 207 208
          overflow: hidden;
          white-space: nowrap;
          text-overflow: ellipsis;
        }
209
      }
210 211
    }
  }
212

213
  // ====================
214

215 216
  // specific elements - pitch/how it works nav
  .nav-pitch {
217 218 219 220 221 222
    position: relative;
    padding: ($baseline*0.75) 0;

    .nav-sub {
      text-align: left;
    }
223 224
  }
}
225 226 227

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

228 229
// CASE: user signed in
.is-signedin {
230

231 232 233
  .wrapper-l {
    width: flex-grid(9,12);
  }
234

235 236 237
  .wrapper-r {
    width: flex-grid(3,12);
  }
238

239
  .branding {
240
    @include margin-right(2%);
241 242 243 244
  }

  .nav-account {
    top: ($baseline/4);
245 246 247 248 249 250 251 252 253 254
  }
}

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

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

  .wrapper-header {

255 256 257 258 259 260 261 262
    .wrapper-l {
      width: flex-grid(9,12);
    }

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

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

267
    .info-course {
268
      width: 25%;
269
      margin-right: 2%;
270
    }
Brian Talbot committed
271

272
    .nav-course {
273
      width: 45%;
274
    }
275 276 277
  }
}

278 279
// ====================

280
// CASE: user not signed in
281 282
.not-signedin,
.view-util {
283

284
  .wrapper-header {
285

286 287 288 289 290 291 292 293
    .wrapper-l {
      width: flex-grid(2,12);
    }

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

294
    .branding {
295
      width: 100%;
296 297 298
    }

    .nav-pitch {
299
      top: ($baseline/4);
300 301 302 303 304 305 306 307 308 309

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

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

      .action-signup {
310 311
        @include blue-button();
        @extend %t-action3;
312
        @extend %t-strong;
313 314 315 316 317
        padding: ($baseline/4) ($baseline/2);
        text-transform: uppercase;
      }

      .action-signin {
318 319
        @include white-button();
        @extend %t-action3;
320
        @extend %t-strong;
321 322 323
        padding: ($baseline/4) ($baseline/2);
        text-transform: uppercase;
      }
324
    }
325
  }
Brian Talbot committed
326
}
327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347

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

// STATE: active/current nav states

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

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

// course content
body.course.outline .nav-course-courseware .title,
body.course.updates .nav-course-courseware .title,
body.course.pages .nav-course-courseware .title,
body.course.uploads .nav-course-courseware .title,

body.course.outline .nav-course-courseware-outline,
body.course.updates .nav-course-courseware-updates,
body.course.pages .nav-course-courseware-pages,
body.course.uploads .nav-course-courseware-uploads,
348
body.course.textbooks .nav-course-courseware-textbooks,
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

// course settings
body.course.schedule .nav-course-settings .title,
body.course.grading .nav-course-settings .title,
body.course.team .nav-course-settings .title,
body.course.advanced .nav-course-settings .title,

body.course.schedule .nav-course-settings-schedule,
body.course.grading .nav-course-settings-grading,
body.course.team .nav-course-settings-team,
body.course.advanced .nav-course-settings-advanced,

// course tools
body.course.import .nav-course-tools .title,
body.course.export .nav-course-tools .title,
body.course.checklists .nav-course-tools .title,

body.course.import .nav-course-tools-import,
body.course.export .nav-course-tools-export,
body.course.checklists .nav-course-tools-checklists,

{
  color: $blue;

  a {
    color: $blue;
    pointer-events: none;
  }
}