]> BookStack Code Mirror - bookstack/blob - resources/assets/sass/_header.scss
Updated existing image tests to reflect changes
[bookstack] / resources / assets / sass / _header.scss
1 /**
2  * Includes the main navigation header and the faded toolbar.
3  */
4
5 header .grid {
6   grid-template-columns: auto min-content auto;
7 }
8
9 @include smaller-than($l) {
10   header .grid {
11     grid-template-columns: 1fr;
12     grid-row-gap: 0;
13   }
14 }
15
16 header {
17   position: relative;
18   display: block;
19   z-index: 6;
20   top: 0;
21   background-color: $primary-dark;
22   color: #fff;
23   fill: #fff;
24   border-bottom: 1px solid #DDD;
25   box-shadow: $bs-card;
26   padding: $-xxs 0;
27   .links {
28     display: inline-block;
29     vertical-align: top;
30   }
31   .links a {
32     display: inline-block;
33     padding: $-m;
34     color: #FFF;
35     fill: #FFF;
36   }
37   .dropdown-container {
38     padding-left: $-m;
39     padding-right: 0;
40   }
41   .avatar, .user-name {
42     display: inline-block;
43   }
44   .avatar {
45     width: 30px;
46     height: 30px;
47   }
48   .user-name {
49     vertical-align: top;
50     padding-top: $-m;
51     position: relative;
52     top: -3px;
53     display: inline-block;
54     cursor: pointer;
55     > * {
56       vertical-align: top;
57     }
58     > span {
59       padding-left: $-xs;
60       display: inline-block;
61       padding-top: $-xxs;
62     }
63     > svg {
64       padding-top: 4px;
65       font-size: 18px;
66     }
67     @include between($l, $xl) {
68       padding-left: $-xs;
69       .name {
70         display: none;
71       }
72     }
73   }
74 }
75
76
77
78 .header-search {
79   display: inline-block;
80 }
81 header .search-box {
82   display: inline-block;
83   margin-top: 10px;
84   input {
85     background-color: rgba(0, 0, 0, 0.2);
86     border: 1px solid rgba(255, 255, 255, 0.2);
87     border-radius: 40px;
88     color: #EEE;
89     z-index: 2;
90     padding-left: 40px;
91   }
92   button {
93     fill: #EEE;
94     z-index: 1;
95     left: 16px;
96     svg {
97       margin-right: 0;
98     }
99   }
100   ::-webkit-input-placeholder { /* Chrome/Opera/Safari */
101     color: #DDD;
102   }
103   ::-moz-placeholder { /* Firefox 19+ */
104     color: #DDD;
105   }
106   :-ms-input-placeholder { /* IE 10+ */
107     color: #DDD;
108   }
109   :-moz-placeholder { /* Firefox 18- */
110     color: #DDD;
111   }
112   @include between($l, $xl) {
113     max-width: 200px;
114   }
115 }
116
117 .logo {
118   display: inline-block;
119   &:hover {
120     color: #FFF;
121     text-decoration: none;
122   }
123 }
124 .logo-text {
125   display: inline-block;
126   font-size: 1.8em;
127   color: #fff;
128   font-weight: 400;
129   padding: 14px $-l 14px 0;
130   vertical-align: top;
131   line-height: 1;
132 }
133 .logo-image {
134   margin: $-xs $-s $-xs 0;
135   vertical-align: top;
136   height: 43px;
137 }
138
139 .mobile-menu-toggle {
140   color: #FFF;
141   fill: #FFF;
142   font-size: 2em;
143   border: 2px solid rgba(255, 255, 255, 0.8);
144   border-radius: 4px;
145   padding: 0 $-xs;
146   position: absolute;
147   right: $-m;
148   top: 13px;
149   line-height: 1;
150   cursor: pointer;
151   user-select: none;
152   svg {
153     margin: 0;
154     bottom: -2px;
155   }
156 }
157
158 @include smaller-than($l) {
159   header .header-links {
160     display: none;
161     background-color: #FFF;
162     z-index: 10;
163     right: $-m;
164     border-radius: 4px;
165     overflow: hidden;
166     position: absolute;
167     box-shadow: $bs-hover;
168     margin-top: -$-xs;
169     &.show {
170       display: block;
171     }
172   }
173   header .links a, header .dropdown-container ul li a {
174     text-align: left;
175     display: block;
176     padding: $-s $-m;
177     color: $text-dark;
178     fill: $text-dark;
179     svg {
180       margin-right: $-s;
181     }
182     &:hover {
183       background-color: #EEE;
184       color: #444;
185       fill: #444;
186       text-decoration: none;
187     }
188   }
189   header .dropdown-container {
190     display: block;
191     padding-left: 0;
192   }
193   header .links {
194     display: block;
195   }
196   header .dropdown-container ul {
197     display: block !important;
198     position: relative;
199     background-color: transparent;
200     border: 0;
201     padding: 0;
202     margin: 0;
203     box-shadow: none;
204   }
205 }
206
207 .tri-layout-mobile-tabs {
208   position: sticky;
209   top: 0;
210   z-index: 5;
211   background-color: #FFF;
212   border-bottom: 1px solid #DDD;
213   box-shadow: $bs-card;
214 }
215 .tri-layout-mobile-tab {
216   text-align: center;
217   border-bottom: 3px solid #BBB;
218   &:first-child {
219     border-right: 1px solid #DDD;
220   }
221   &.active {
222     border-bottom-color: currentColor;
223   }
224 }
225
226 .breadcrumbs {
227   display: flex;
228   flex-direction: row;
229   align-items: center;
230   justify-content: flex-start;
231   flex-wrap: wrap;
232   opacity: 0.7;
233   .icon-list-item {
234     width: auto;
235     padding-top: $-xs;
236     padding-bottom: $-xs;
237   }
238   .separator {
239     display: inline-block;
240     fill: #aaa;
241     font-size: 1.6em;
242     line-height: 0.8;
243     margin: -2px 0 0;
244   }
245   &:hover {
246     opacity: 1;
247   }
248 }
249
250 @include smaller-than($l) {
251   .breadcrumbs .icon-list-item {
252     padding: $-xs;
253     > span + span {
254       display: none;
255     }
256     > span:first-child {
257       margin-right: 0;
258     }
259   }
260 }
261
262 .breadcrumb-listing {
263   position: relative;
264   .breadcrumb-listing-toggle {
265     padding: 6px;
266     border: 1px solid transparent;
267     border-radius: 4px;
268     &:hover {
269       border-color: #DDD;
270     }
271   }
272   .svg-icon {
273     margin-right: 0;
274   }
275 }
276
277 .breadcrumb-listing-dropdown {
278   box-shadow: $bs-med;
279   overflow: hidden;
280   min-height: 100px;
281   width: 240px;
282   display: none;
283   position: absolute;
284   z-index: 80;
285   right: -$-m;
286   .breadcrumb-listing-search .svg-icon {
287     position: absolute;
288     left: $-s;
289     top: 11px;
290     fill: #888;
291     pointer-events: none;
292   }
293   .breadcrumb-listing-entity-list {
294     max-height: 400px;
295     overflow-y: scroll;
296     text-align: left;
297   }
298   input {
299     padding-left: $-xl;
300     border-radius: 0;
301     border: 0;
302     border-bottom: 1px solid #DDD;
303   }
304 }
305
306 @include smaller-than($m) {
307   .breadcrumb-listing-dropdown {
308     position: fixed;
309     right: auto;
310     left: $-m;
311   }
312   .breadcrumb-listing-dropdown .breadcrumb-listing-entity-list {
313     max-height: 240px;
314   }
315 }
316
317 .faded {
318   a, button, span, span > div {
319     color: #666;
320     fill: #666;
321   }
322   .text-button {
323     opacity: 0.5;
324     transition: all ease-in-out 120ms;
325     &:hover {
326       opacity: 1;
327       text-decoration: none;
328     }
329   }
330 }
331
332 .faded span.faded-text {
333   display: inline-block;
334   padding: $-s;
335 }
336
337 .action-buttons .text-button {
338   display: inline-block;
339   padding: $-xs $-s;
340   &:last-child {
341     padding-right: 0;
342   }
343   &:first-child {
344     padding-left: 0;
345   }
346 }
347
348
349 .action-buttons .dropdown-container:last-child a {
350   padding-right: 0;
351   padding-left: $-s;
352 }
353 .action-buttons {
354   text-align: right;
355   &.text-left {
356     text-align: left;
357     .text-button {
358       padding-right: $-m;
359       padding-left: 0;
360     }
361   }
362   &.text-center {
363     text-align: center;
364   }
365 }
366
367 @include smaller-than($m) {
368   .action-buttons .text-button {
369     padding: $-xs $-xs;
370   }
371   .action-buttons .dropdown-container:last-child a {
372     padding-left: $-xs;
373   }
374 }
375
376 .nav-tabs {
377   text-align: center;
378   a, .tab-item {
379     padding: $-m;
380     display: inline-block;
381     color: #666;
382     fill: #666;
383     cursor: pointer;
384     &.selected {
385       border-bottom: 2px solid $primary;
386     }
387   }
388 }