]> BookStack Code Mirror - bookstack/blob - resources/assets/sass/_header.scss
Removes some unused code.
[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: $-s;
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 .breadcrumbs .text-button, .action-buttons .text-button {
175   display: inline-block;
176   padding: $-s;
177   &:last-child {
178     padding-right: 0;
179   }
180   &:first-child {
181     padding-left: 0;
182   }
183 }
184
185
186 .action-buttons .dropdown-container:last-child a {
187   padding-right: 0;
188   padding-left: $-s;
189 }
190 .action-buttons {
191   text-align: right;
192   &.text-left {
193     text-align: left;
194     .text-button {
195       padding-right: $-m;
196       padding-left: 0;
197     }
198   }
199   &.text-center {
200     text-align: center;
201   }
202 }
203
204 @include smaller-than($m) {
205   .breadcrumbs .text-button, .action-buttons .text-button {
206     padding: $-s $-xs;
207   }
208   .action-buttons .dropdown-container:last-child a {
209     padding-left: $-xs;
210   }
211   .breadcrumbs .text-button {
212     font-size: 0;
213   }
214   .breadcrumbs a i {
215     font-size: $fs-m;
216     padding-right: 0;
217   }
218   .breadcrumbs span.sep {
219     padding: 0 $-xxs;
220   }
221 }
222
223 .nav-tabs {
224   text-align: center;
225   a, .tab-item {
226     padding: $-m;
227     display: inline-block;
228     color: #666;
229     cursor: pointer;
230     &.selected {
231       border-bottom: 2px solid $primary;
232     }
233   }
234 }
235 .faded-small .nav-tabs a {
236   padding: $-s $-m;
237 }