_header.scss 6.46 KB
Newer Older
1
header.global {
2
  border-bottom: 1px solid $m-gray;
3
  box-shadow: 0 1px 5px 0 rgba(0,0,0, 0.1);
4
  background: $header-bg;
5
  height: 76px;
6
  position: relative;
Matthew Mongeau committed
7
  width: 100%;
8
  z-index: 10;
Matthew Mongeau committed
9

10
  nav {
Matthew Mongeau committed
11
    @include clearfix;
12
    height: 40px;
Matthew Mongeau committed
13
    margin: 0 auto;
14
    padding: 18px 10px 0px;
15 16
    max-width: grid-width(12);
    min-width: 760px;
Matthew Mongeau committed
17 18
  }

19
  h1.logo {
Matthew Mongeau committed
20
    float: left;
21
    margin: -2px 39px 0px 0px;
22 23
    position: relative;

24 25 26 27
    a {
      display: block;
    }
  }
28

29
  ol {
30
    &.left {
31 32 33 34 35 36
      float: left;
    }

    &.guest {
      float: right;
    }
Matthew Mongeau committed
37

38 39 40 41 42
    > li {
      @include inline-block;
      margin-right: 20px;
      position: relative;
      vertical-align: middle;
Matthew Mongeau committed
43

44 45 46 47 48 49 50
      &:last-child {
        margin-right: 0px;
      }

      a {
        letter-spacing: 1px;
        vertical-align: middle;
51
      }
52
    }
Matthew Mongeau committed
53

54 55
    li.secondary {
      > a {
56
        color: $link-color;
57
        display: block;
58
        font-family: $sans-serif;
59
        @include inline-block;
60
        margin: 0px 30px 0px 0px;
61 62 63
        text-decoration: none;
        text-transform: uppercase;
        text-shadow: 0 1px rgba(255,255,255, 0.6);
Matthew Mongeau committed
64

65 66 67
        &:last-child {
          margin-right: 0px;
        }
68

69
        &:hover, &:focus {
70
          color: $base-font-color;
71 72
        }
      }
73
    }
74

75
    li.primary {
76 77
      margin-right: 5px;

78
      > a {
79 80 81
        @include background-image($button-bg-image);
        background-color: $button-bg-color;
        border: 1px solid $border-color-2;
82
        border-radius: 3px;
83
        @include box-sizing(border-box);
84
        box-shadow: 0 1px 0 0 rgba(255,255,255, 0.6);
85 86
        color: $base-font-color;
        display: inline-block;
87
        font-family: $sans-serif;
88
        @include inline-block;
89
        line-height: 1em;
90
        margin: 1px 5px;
91
        padding: 10px 12px;
92 93 94 95
        text-decoration: none;
        text-transform: uppercase;
        text-shadow: 0 1px rgba(255,255,255, 0.6);
        vertical-align: middle;
96

97 98 99 100
        &:last-child {
          margin-right: 0px;
        }

101
        &:hover, &:focus, &:active {
102
          background: $button-bg-hover-color;
Matthew Mongeau committed
103 104 105
        }
      }
    }
106

107 108
    &.user {
      float: right;
Tom Giannattasio committed
109
      margin-top: 4px;
Matthew Mongeau committed
110

111 112 113 114 115 116 117 118 119 120 121 122
      > li.primary {
        display: block;
        float: left;
        margin: 0px;

        > a {
          margin: 0px;
          @include border-right-radius(0px);
        }

        &:last-child {
          > a {
123
            border-radius: 0 4px 4px 0;
124
            border-left: none;
Tom Giannattasio committed
125
            padding: 5px 8px 7px 8px;
126 127 128 129 130 131 132
            
            &.shopping-cart {
              border-radius: 4px;
              border: 1px solid $border-color-2;
              margin-right: 10px;
              padding-bottom: 6px;
            }
133 134 135 136
          }
        }
      }

137
      a.user-link {
Tom Giannattasio committed
138
        padding: 6px 12px 8px 35px;
139
        position: relative;
140
        text-transform: none;
Tom Giannattasio committed
141 142 143
        font-size: 14px;
        font-weight: bold;
        letter-spacing: 0;
Matthew Mongeau committed
144

145
        .avatar {
Tom Giannattasio committed
146 147
          @include background-image(url('../images/small-header-home-icon.png'));
          background-repeat: no-repeat;
148
          height: 26px;
149
          @include inline-block;
150
          left: 8px;
151
          opacity: 0.5;
152 153
          overflow: hidden;
          position: absolute;
154
          top: 4px;
155
          @include transition(all 0.15s linear 0s);
156 157
          width: 26px;
        }
Matthew Mongeau committed
158

159
        &:hover, &:focus {
160 161
          .avatar {
            opacity: 0.8;
Matthew Mongeau committed
162
          }
163 164
        }
      }
Matthew Mongeau committed
165

166
      ul.dropdown-menu {
167
        background: $border-color-4;
168
        border-radius: 4px;
169
        box-shadow: 0 2px 24px 0 rgba(0,0,0, 0.3);
170
        border: 1px solid $border-color-3;
171 172 173
        display: none;
        padding: 5px 10px;
        position: absolute;
174
        right: 0px;
Tom Giannattasio committed
175
        top: 34px;
176
        width: 170px;
177 178 179 180 181
        z-index: 3;

        &.expanded {
          display: block;
        }
Matthew Mongeau committed
182

183 184 185
        &::before {
          background: transparent;
          border: {
186 187
            top: 6px solid $border-color-4;
            right: 6px solid $border-color-4;
188 189
            bottom: 6px solid transparent;
            left: 6px solid transparent;
Matthew Mongeau committed
190
          }
191
          box-shadow: 1px 0 0 0 $border-color-3, 0 -1px 0 0 $border-color-3;
192 193 194 195 196 197 198 199
          content: "";
          display: block;
          height: 0px;
          position: absolute;
          @include transform(rotate(-45deg));
          right: 12px;
          top: -6px;
          width: 0px;
Matthew Mongeau committed
200 201
        }

202 203
        li {
          display: block;
204
          border-top: 1px dotted $border-color-2;
205
          box-shadow: inset 0 1px 0 0 rgba(255,255,255, 0.05);
Matthew Mongeau committed
206

207 208
          &:first-child {
            border: none;
209
            box-shadow: none;
Matthew Mongeau committed
210 211
          }

212
          > a {
213
            border: 1px solid transparent;
214
            border-radius: 3px;
215
            @include box-sizing(border-box);
216
            color: $link-color;
217
            cursor: pointer;
Matthew Mongeau committed
218
            display: block;
219 220 221 222
            margin: 5px 0px;
            overflow: hidden;
            padding: 3px 5px 4px;
            text-overflow: ellipsis;
223
            @include transition(padding 0.15s linear 0s);
224
            white-space: nowrap;
Matthew Mongeau committed
225 226
            width: 100%;

227
            &:hover, &:focus {
228 229
              color: $base-font-color;
              text-decoration: none;
Matthew Mongeau committed
230 231 232 233 234 235
            }
          }
        }
      }
    }
  }
236 237

  .nav-global {
238
    margin-top: ($baseline/2);
239 240 241 242
    list-style: none;

    li {
      display: inline-block;
243 244
      margin: 0 $baseline+1 0 0;
      font-size: em(14);
245 246
      font-weight: 600;
      text-transform: uppercase;
247
      letter-spacing: 0 !important;
248 249 250 251 252 253 254 255

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

      a {
        display:block;
        padding: ($baseline/4);
256
        color: $lighter-base-font-color;
257
        font-weight: 600;
258

259
        &:hover, &:focus, &:active {
260
          text-decoration: none;
261
          color: $link-color;
262 263
        }
      }
264 265 266 267 268

      &.active {

        a {
          text-decoration: none;
269
          color: $link-color;
270 271
        }
      }
272 273 274 275 276 277 278 279 280 281
    }

    // logged in
    &.authenticated {

    }
  }

  .nav-courseware {
    float: right;
282
    margin-top: ($baseline/4);
283 284 285 286 287
    list-style: none;

    li {
      display: inline-block;

288
      .cta {
289
        @extend %m-btn-primary;
290 291 292 293 294 295 296 297
      }
    }

    // logged in
    &.authenticated {

    }
  }
298
}
299

300 301
// marketing site design syncing
.view-register, .view-login {
302

303 304
  header.global nav {
    width: 960px;
305
  }
Matthew Mongeau committed
306
}
307 308

// page-based nav states
309 310 311
.view-howitworks .nav-global-01,
.view-courses .nav-global-02,
.view-schools .nav-global-03,
312 313 314 315
.view-register .nav-global-04 {

  a {
    text-decoration: none;
316
    color: $link-color !important;
317
  }
318
}