]> BookStack Code Mirror - bookstack/blob - resources/assets/sass/_header.scss
Update settings.php
[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   cursor: pointer;
219   &:first-child {
220     border-right: 1px solid #DDD;
221   }
222   &.active {
223     border-bottom-color: currentColor;
224   }
225 }
226
227 .breadcrumbs {
228   display: flex;
229   flex-direction: row;
230   align-items: center;
231   justify-content: flex-start;
232   flex-wrap: wrap;
233   opacity: 0.7;
234   .icon-list-item {
235     width: auto;
236     padding-top: $-xs;
237     padding-bottom: $-xs;
238   }
239   .separator {
240     display: inline-block;
241     fill: #aaa;
242     font-size: 1.6em;
243     line-height: 0.8;
244     margin: -2px 0 0;
245   }
246   &:hover {
247     opacity: 1;
248   }
249 }
250
251 @include smaller-than($l) {
252   .breadcrumbs .icon-list-item {
253     padding: $-xs;
254     > span + span {
255       display: none;
256     }
257     > span:first-child {
258       margin-right: 0;
259     }
260   }
261 }
262
263 .breadcrumb-listing {
264   position: relative;
265   .breadcrumb-listing-toggle {
266     padding: 6px;
267     border: 1px solid transparent;
268     border-radius: 4px;
269     &:hover {
270       border-color: #DDD;
271     }
272   }
273   .svg-icon {
274     margin-right: 0;
275   }
276 }
277
278 .breadcrumb-listing-dropdown {
279   box-shadow: $bs-med;
280   overflow: hidden;
281   min-height: 100px;
282   width: 240px;
283   display: none;
284   position: absolute;
285   z-index: 80;
286   right: -$-m;
287   .breadcrumb-listing-search .svg-icon {
288     position: absolute;
289     left: $-s;
290     top: 11px;
291     fill: #888;
292     pointer-events: none;
293   }
294   .breadcrumb-listing-entity-list {
295     max-height: 400px;
296     overflow-y: scroll;
297     text-align: left;
298   }
299   input {
300     padding-left: $-xl;
301     border-radius: 0;
302     border: 0;
303     border-bottom: 1px solid #DDD;
304   }
305 }
306
307 @include smaller-than($m) {
308   .breadcrumb-listing-dropdown {
309     position: fixed;
310     right: auto;
311     left: $-m;
312   }
313   .breadcrumb-listing-dropdown .breadcrumb-listing-entity-list {
314     max-height: 240px;
315   }
316 }
317
318 .faded {
319   a, button, span, span > div {
320     color: #666;
321     fill: #666;
322   }
323   .text-button {
324     opacity: 0.5;
325     transition: all ease-in-out 120ms;
326     &:hover {
327       opacity: 1;
328       text-decoration: none;
329     }
330   }
331 }
332
333 .faded span.faded-text {
334   display: inline-block;
335   padding: $-s;
336 }
337
338 .action-buttons .text-button {
339   display: inline-block;
340   padding: $-xs $-s;
341   &:last-child {
342     padding-right: 0;
343   }
344   &:first-child {
345     padding-left: 0;
346   }
347 }
348
349
350 .action-buttons .dropdown-container:last-child a {
351   padding-right: 0;
352   padding-left: $-s;
353 }
354 .action-buttons {
355   text-align: right;
356   &.text-left {
357     text-align: left;
358     .text-button {
359       padding-right: $-m;
360       padding-left: 0;
361     }
362   }
363   &.text-center {
364     text-align: center;
365   }
366 }
367
368 @include smaller-than($m) {
369   .action-buttons .text-button {
370     padding: $-xs $-xs;
371   }
372   .action-buttons .dropdown-container:last-child a {
373     padding-left: $-xs;
374   }
375 }
376
377 .nav-tabs {
378   text-align: center;
379   a, .tab-item {
380     padding: $-m;
381     display: inline-block;
382     color: #666;
383     fill: #666;
384     cursor: pointer;
385     &.selected {
386       border-bottom: 2px solid $primary;
387     }
388   }
389 }