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