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