]> BookStack Code Mirror - bookstack/blob - resources/assets/sass/_header.scss
Started on a design update
[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 header {
10   position: relative;
11   display: block;
12   z-index: 2;
13   top: 0;
14   background-color: $primary-dark;
15   color: #fff;
16   fill: #fff;
17   border-bottom: 1px solid #DDD;
18   .links {
19     display: inline-block;
20     vertical-align: top;
21   }
22   .links a {
23     display: inline-block;
24     padding: $-m;
25     color: #FFF;
26     fill: #FFF;
27   }
28   .dropdown-container {
29     padding-left: $-m;
30     padding-right: 0;
31   }
32   .avatar, .user-name {
33     display: inline-block;
34   }
35   .avatar {
36     width: 30px;
37     height: 30px;
38   }
39   .user-name {
40     vertical-align: top;
41     padding-top: $-m;
42     position: relative;
43     top: -3px;
44     display: inline-block;
45     cursor: pointer;
46     > * {
47       vertical-align: top;
48     }
49     > span {
50       padding-left: $-xs;
51       display: inline-block;
52       padding-top: $-xxs;
53     }
54     > svg {
55       padding-top: 4px;
56       font-size: 18px;
57     }
58     @include between($l, $xl) {
59       padding-left: $-xs;
60       .name {
61         display: none;
62       }
63     }
64   }
65 }
66
67
68
69 .header-search {
70   display: inline-block;
71 }
72 header .search-box {
73   display: inline-block;
74   margin-top: 10px;
75   input {
76     background-color: rgba(0, 0, 0, 0.2);
77     border: 1px solid rgba(255, 255, 255, 0.3);
78     color: #EEE;
79     z-index: 2;
80   }
81   button {
82     fill: #EEE;
83     z-index: 1;
84     svg {
85       margin-right: 0;
86     }
87   }
88   ::-webkit-input-placeholder { /* Chrome/Opera/Safari */
89     color: #DDD;
90   }
91   ::-moz-placeholder { /* Firefox 19+ */
92     color: #DDD;
93   }
94   :-ms-input-placeholder { /* IE 10+ */
95     color: #DDD;
96   }
97   :-moz-placeholder { /* Firefox 18- */
98     color: #DDD;
99   }
100   @include between($l, $xl) {
101     max-width: 200px;
102   }
103 }
104
105 .logo {
106   display: inline-block;
107   &:hover {
108     color: #FFF;
109     text-decoration: none;
110   }
111 }
112 .logo-text {
113   display: inline-block;
114   font-size: 1.8em;
115   color: #fff;
116   font-weight: 400;
117   padding: 14px $-l 14px 0;
118   vertical-align: top;
119   line-height: 1;
120 }
121 .logo-image {
122   margin: $-xs $-s $-xs 0;
123   vertical-align: top;
124   height: 43px;
125 }
126
127 .mobile-menu-toggle {
128   color: #FFF;
129   fill: #FFF;
130   font-size: 2em;
131   border: 2px solid rgba(255, 255, 255, 0.8);
132   border-radius: 4px;
133   padding: 0 $-xs;
134   position: absolute;
135   right: $-m;
136   top: 8px;
137   line-height: 1;
138   cursor: pointer;
139   user-select: none;
140   svg {
141     margin: 0;
142   }
143 }
144
145 @include smaller-than($l) {
146   header .header-links {
147     display: none;
148     background-color: #FFF;
149     z-index: 10;
150     right: $-m;
151     border-radius: 4px;
152     overflow: hidden;
153     position: absolute;
154     box-shadow: $bs-hover;
155     margin-top: -$-xs;
156     &.show {
157       display: block;
158     }
159   }
160   header .links a, header .dropdown-container ul li a {
161     text-align: left;
162     display: block;
163     padding: $-s $-m;
164     color: $text-dark;
165     fill: $text-dark;
166     svg {
167       margin-right: $-s;
168     }
169     &:hover {
170       background-color: #EEE;
171       color: #444;
172       fill: #444;
173       text-decoration: none;
174     }
175   }
176   header .dropdown-container {
177     display: block;
178     padding-left: 0;
179   }
180   header .links {
181     display: block;
182   }
183   header .dropdown-container ul {
184     display: block !important;
185     position: relative;
186     background-color: transparent;
187     border: 0;
188     padding: 0;
189     margin: 0;
190     box-shadow: none;
191   }
192 }
193
194 .breadcrumbs span.sep {
195   color: #aaa;
196   padding: 0 $-xs;
197 }
198 .faded {
199   a, button, span, span > div {
200     color: #666;
201     fill: #666;
202   }
203   .text-button {
204     opacity: 0.5;
205     transition: all ease-in-out 120ms;
206     &:hover {
207       opacity: 1;
208       text-decoration: none;
209     }
210   }
211 }
212
213 .faded span.faded-text {
214   display: inline-block;
215   padding: $-s;
216 }
217
218 .faded-small {
219   color: #000;
220   fill: #000;
221   font-size: 0.9em;
222   background-color: $primary-faded;
223 }
224
225 .toolbar-container {
226   background-color: #FFF;
227 }
228
229 .breadcrumbs .text-button, .action-buttons .text-button {
230   display: inline-block;
231   padding: $-s;
232   &:last-child {
233     padding-right: 0;
234   }
235   &:first-child {
236     padding-left: 0;
237   }
238 }
239
240
241 .action-buttons .dropdown-container:last-child a {
242   padding-right: 0;
243   padding-left: $-s;
244 }
245 .action-buttons {
246   text-align: right;
247   &.text-left {
248     text-align: left;
249     .text-button {
250       padding-right: $-m;
251       padding-left: 0;
252     }
253   }
254   &.text-center {
255     text-align: center;
256   }
257 }
258
259 @include smaller-than($m) {
260   .breadcrumbs .text-button, .action-buttons .text-button {
261     padding: $-xs $-xs;
262   }
263   .action-buttons .dropdown-container:last-child a {
264     padding-left: $-xs;
265   }
266   .breadcrumbs .text-button {
267     font-size: 0;
268   }
269   .breadcrumbs .text-button svg {
270     font-size: $fs-m;
271   }
272   .breadcrumbs a i {
273     font-size: $fs-m;
274     padding-right: 0;
275   }
276   .breadcrumbs span.sep {
277     padding: 0 $-xxs;
278   }
279   .toolbar .col-xs-1:first-child {
280     padding-right: 0;
281   }
282 }
283
284 .nav-tabs {
285   text-align: center;
286   a, .tab-item {
287     padding: $-m;
288     display: inline-block;
289     color: #666;
290     fill: #666;
291     cursor: pointer;
292     &.selected {
293       border-bottom: 2px solid $primary;
294     }
295   }
296 }
297 .faded-small .nav-tabs a {
298   padding: $-s $-m;
299 }