_main-nav.scss 8.89 KB
Newer Older
Evonne Cheung's avatar
Evonne Cheung committed
1
2
3
4
/*
 * Primary navigation menu
 */
.main-nav {
5
6
    margin-bottom: 0;
    
Evonne Cheung's avatar
Evonne Cheung committed
7
    ul {
8
9
10
11
12
13
        @media (min-width: $screen-md-min) {
            margin:0;
        }
        @media (min-width: $screen-sm-min) and (max-width: $screen-md-min - 1) {
            margin:0;
        }
Evonne Cheung's avatar
Evonne Cheung committed
14
15
    }
    .navbar-header{
16
17
        @media (min-width: $screen-sm-min) {
            margin:0;
Evonne Cheung's avatar
Evonne Cheung committed
18
19
20
21
        }
    }

    .navbar-brand {
Evonne Cheung's avatar
Evonne Cheung committed
22
        padding: 8px 25px;
23
24
25
        margin-left: 0;
        border-bottom: 0;
        
Evonne Cheung's avatar
Evonne Cheung committed
26
27
28
29
        height: auto;
        font-size: $font-size-base;
        background-color: darken(#0162a7, 2%);
        
Evonne Cheung's avatar
Evonne Cheung committed
30
        @media (min-width: $screen-sm-min) {
Evonne Cheung's avatar
Evonne Cheung committed
31
32
33
            padding: 8px;
            margin-right: 5px;
            background-color: transparent;
Evonne Cheung's avatar
Evonne Cheung committed
34
        }
Evonne Cheung's avatar
Evonne Cheung committed
35
36
37
38
39
40
41
        
       &:focus,
       &:hover {
           background-color: rgba(#FFFFFF, 0.2);
           border-radius: 3px;
           color: #FFFFFF;
       }
42
       
Evonne Cheung's avatar
Evonne Cheung committed
43
44
45
46
47
48
       .icon {
            top:3px;
       }
    }

    .nav > li > a {
49
50
51
        border-top: 0;
        border-bottom: 0;
        
Evonne Cheung's avatar
Evonne Cheung committed
52
53
54
55
        @media (min-width: $screen-sm-min) {
            padding: 10px 20px;
        }
        @media (min-width: $screen-sm-min) and (max-width: $screen-md-min - 1) {
Evonne Cheung's avatar
Evonne Cheung committed
56
            padding: 10px 10px;
Evonne Cheung's avatar
Evonne Cheung committed
57
58
59
60
        }
    }
    // Only shown on mobile, or when dropdowns are turned on
    .child-nav {
61
        background-color: transparent;
Evonne Cheung's avatar
Evonne Cheung committed
62
        padding: 0px;
63
        
Evonne Cheung's avatar
Evonne Cheung committed
64
        font-size: $font-size-base;
Evonne Cheung's avatar
Evonne Cheung committed
65
66
67

        li {
            a { //styles that need to override bootstrap specificity
Evonne Cheung's avatar
Evonne Cheung committed
68
69
                padding: 10px 29px 10px 50px;
                color: #FFFFFF;
70
                background-color: darken($brand-primary, 2%);
Evonne Cheung's avatar
Evonne Cheung committed
71
                
Evonne Cheung's avatar
Evonne Cheung committed
72
                &:hover, &:focus {
73
                    color: #FFFFFF;
Evonne Cheung's avatar
Evonne Cheung committed
74
                    background-color: rgba(#FFFFFF, 0.2);
Evonne Cheung's avatar
Evonne Cheung committed
75
76
77
78
79
80
81
                }
            }
        }

       // If this link is the current page or section
        .active > a {
            font-weight: bold;
Evonne Cheung's avatar
Evonne Cheung committed
82
83
84
            background-color: rgba(#FFFFFF, 0.8) !important;
            color: #000;
            
85
86
87
            &:hover, &:focus {
                color: #000;
            }
Evonne Cheung's avatar
Evonne Cheung committed
88
            @media (min-width: $screen-sm-min) {
Evonne Cheung's avatar
Evonne Cheung committed
89
                &:focus,
Evonne Cheung's avatar
Evonne Cheung committed
90
91
92
93
94
95
96
97
98
                &:hover {
                    color: $text-color;
                }
            }
        }
    }

    .has-dropdown {
        @media (min-width: $screen-sm-min) {
Evonne Cheung's avatar
Evonne Cheung committed
99
100
            padding: 0;
            margin: 0; // override default ul
Evonne Cheung's avatar
Evonne Cheung committed
101
            background-color: $dropdown-bg;
Evonne Cheung's avatar
Evonne Cheung committed
102
            border:0;
Evonne Cheung's avatar
Evonne Cheung committed
103
104

            // Links within the dropdown menu
Evonne Cheung's avatar
Evonne Cheung committed
105
106
            > li a {
                padding: 4px 20px;
Evonne Cheung's avatar
Evonne Cheung committed
107
108
109
110
111
            }
        }
    }
}

112
113

// admin menu with static second nav
Evonne Cheung's avatar
Evonne Cheung committed
114
115
.adminnav {
    .nav {
116
117
118
119
120
121
122
123
124
125
126
127
128
129
        > li {
            > a {
                font-size: $font-size-base;
                
                &:focus,
                &:hover {
                    background-color: rgba(#FFFFFF, 0.2);
                }
            }
            &.active {
                > a {
                    &:focus,
                    &:hover {
                        color: $brand-primary;
130
                        background-color: #FFFFFF;
131
132
133
134
135
136
137
138
                    }
                }
            }
            .child-nav {
                font-size: $font-size-base;
            }
            
            .navbar-toggle {
139
140
                background-color: darken($brand-primary, 2%);
                margin-top: 0;
141
142
143
144
145
            }
        }
    }
}

146

147
148
149
// admin menu with dropdown
.dropdown-adminnav {
    .navbar-nav {
Evonne Cheung's avatar
Evonne Cheung committed
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
        > li {
            > a {
                font-size: $font-size-base;
                
                &:focus,
                &:hover {
                    background-color: rgba(#FFFFFF, 0.2);
                }
            }
            &.active {
                > a {
                    &:focus,
                    &:hover {
                        color: #000000;
                    }
                }
            }
            .child-nav {
                font-size: $font-size-base;
169
170
171
172
173
174
175
176
177
178
179
180
181
                > li { 
                    a:focus,
                    a:hover {
                        color: #FFFFFF;
                        background-color: $brand-primary;
                    }  
                    &.active {
                        a:focus,
                        a:hover {
                            color: $brand-primary;
                        }  
                    }
                }
Evonne Cheung's avatar
Evonne Cheung committed
182
183
184
185
186
187
188
189
190
            }
            
            .navbar-toggle {
                background-color: darken(#0162a7, 2%);
            }
        }
    }
}

191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
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

//custom main nav
.main-nav .nav > {
    li > a {
        font-weight: bold;
        color: #FFFFFF;
        
        &:before {
            font-family: 'FontAwesome';
            font-weight: normal;
            padding-right: 5px;
            font-size: 19px;
            color: #FFFFFF;
        }
        &:focus,
        &:hover {
            color: #FFFFFF;
        }
    }
    .home {
        > a {
            background-color: #0591ce;
            color: #FFFFFF;
            &:before {
                content: $fa-var-tachometer;
                color: #FFFFFF;
            }
            &:focus,
            &:hover {
                background-color: lighten(#0591ce, 5%);
            }
        }
        &.active {
            background-color: #FFFFFF;
            > a {
                color: #333333;
                &:before {
                    color: #0591ce;
                }
                &:focus,
                &:hover {
                    background-color: lighten(#0591ce, 5%);
                    color: #FFFFFF;
                }
            }
        }
    }
    .content {
        > a {
            background-color: #ca0238;
            &:before {
                content: $fa-var-pencil-square;
            }
            &:focus,
            &:hover {
                background-color: lighten(#ca0238, 2%);
            }
        }
        &.active {
            > a:before {
                color: #ca0238;
            }
        }
        .navbar-toggle {
            background-color: #ca0238;
            &:focus,
            &:hover {
                background-color: darken(#ca0238, 2%);
            }
        }
        .child-nav {
            li {
                a {
                    color: #FFFFFF;
                    background-color: darken(#ca0238, 2%);
                    &:focus,
                    &:hover {
                        background-color:#ca0238; 
                    }
                }
                &.active a {
                    color: #000000;
                }
            }
        }
    }
    .myportfolio {
        > a {
            background-color: #f29907;
            &:before {
                content: $fa-var-file;
            }
            &:focus,
            &:hover {
                background-color: lighten(#f29907, 2%);
            }
        }
        &.active > a:before {
            color: #f29907;
        }
        .navbar-toggle {
            background-color: #f29907;
            &:focus,
            &:hover {
                background-color: darken(#f29907, 2%);
            }
        }
        .child-nav {
            li {
                a {
                    color: #FFFFFF;
                    background-color: darken(#f29907, 2%);
                    &:focus,
                    &:hover {
                        background-color:#f29907; 
                    }
                }
                &.active a {
                    color: #000000;
                }
            }
        }
    }
    .groups {
        > a {
            background-color: #799323;
            &:before {
                content: $fa-var-users;
            }
            &:focus,
            &:hover {
                background-color: lighten(#799323, 2%);
            }
        }
        &.active > a:before {
            color: #799323;
        }
        .navbar-toggle {
            background-color: #799323;
            &:focus,
            &:hover {
                background-color: darken(#799323, 2%);
            }
        }
        .child-nav {
            li {
                a {
                    color: #FFFFFF;
                    background-color: darken(#799323, 2%);
                    &:focus,
                    &:hover {
                        background-color:#799323; 
                    }
                }
                &.active a {
                    color: #000000;
                }
            }
        }
    }
    .siteadmin {
        > a {
            background-color: #773f97;
            &:before {
                content: $fa-var-cog;
            }
            &:focus,
            &:hover {
                background-color: lighten(#773f97, 2%);
            }
        }
        &.active > a:before {
            color: #773f97;
        }
    }
    .active > a {
        background-color: #FFFFFF;
        &:focus,
        &:hover {
            color: #FFFFFF;
            &:before {
                color: #FFFFFF;
            }
        }
    }
}