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