blob: 63f143bc29925862a3ca6b1accef13b307419c75 [file] [log] [blame]
Akron49bfdbf2016-11-22 21:47:33 +01001@charset "utf-8";
2@import "../util";
3
4$border-size: 2px;
Akron08b82d62016-12-05 15:06:05 +01005$font-size: 10pt;
Akron49bfdbf2016-11-22 21:47:33 +01006
7#search {
8 position: relative;
9 margin-bottom: 30px;
10 overflow: visible;
Akron3bb91bc2016-12-02 16:43:17 +010011// margin-top: 14pt;
Akron49bfdbf2016-11-22 21:47:33 +010012}
13
14#search > ol {
15 overflow-x: hidden;
16 overflow-y: visible;
17 width: auto;
Akron49bfdbf2016-11-22 21:47:33 +010018 text-indent: 0;
19 list-style-type: none;
20 margin: 0;
21 padding: 0;
Akronbec4a6a2018-07-10 14:45:15 +020022 border: $result-border-size solid $kwic-border;
Akron08b82d62016-12-05 15:06:05 +010023 font-size: $font-size;
Akron49bfdbf2016-11-22 21:47:33 +010024
25 > li {
26 display: table-row;
27 table-layout: auto;
28 div.meta {
29 position: relative;
30 display: table-cell;
Akron625fe0c2017-05-03 16:15:08 +020031 text-align: left;
Akron67b51812017-05-01 14:10:55 +020032 cursor: initial;
Akron97d42802016-11-26 22:45:46 +010033 width: 2px;
Akron49bfdbf2016-11-22 21:47:33 +010034 z-index: 5;
35 overflow-y: visible;
Akron3bb91bc2016-12-02 16:43:17 +010036 white-space: nowrap;
Akron67b51812017-05-01 14:10:55 +020037 background-color: lighten($middle-grey, 5%);
38 // @include light-noise;
Akron08b82d62016-12-05 15:06:05 +010039 border: {
Akron46b9f212017-05-01 13:55:17 +020040 color: $dark-grey;
Akron08b82d62016-12-05 15:06:05 +010041 style: solid;
Akron46b9f212017-05-01 13:55:17 +020042 width: 2px 1px 0 0;
43 }
44 &:empty {
45 border-width: 0 1px 0 0;
46 }
47 &.flip {
Akron67b51812017-05-01 14:10:55 +020048 background-color: lighten($middle-grey, 17%);
Akron08b82d62016-12-05 15:06:05 +010049 }
Akron3bb91bc2016-12-02 16:43:17 +010050 color: $nearly-white;
Akron46b9f212017-05-01 13:55:17 +020051 font-size: 75%;
Akron3bb91bc2016-12-02 16:43:17 +010052 padding: 0 5pt;
Akron49bfdbf2016-11-22 21:47:33 +010053 }
Akron97d42802016-11-26 22:45:46 +010054 &:first-of-type div.meta {
Akron08b82d62016-12-05 15:06:05 +010055 border-top-width: 0;
Akron97d42802016-11-26 22:45:46 +010056 }
Akron08b82d62016-12-05 15:06:05 +010057 &:last-of-type div.meta {
58 border-bottom-width: 0;
59 }
Akron49bfdbf2016-11-22 21:47:33 +010060 }
61}
62
63#search > ol > li {
64 border: {
65 style: solid;
66 color: $dark-orange;
67 width: 0;
68 }
69}
70
71#search {
72 div.meta, div.match-main {
73 position: relative;
Akron08b82d62016-12-05 15:06:05 +010074 cursor: pointer;
Akron49bfdbf2016-11-22 21:47:33 +010075 }
76 /*
77 &:not(.active):not(:target) {
78 &:nth-of-type(even) div.main-col {
79 */
80 div.match-main {
81 display: table-cell;
82 z-index: 4;
83 > div.match-wrap {
84 width: 99999%;
85 margin-left: -49999.5%;
86 background-color: $kwic-line-noneven;
87 overflow-x: hidden;
88 overflow-y: visible;
Akron3bb91bc2016-12-02 16:43:17 +010089 white-space: normal;
Akron49bfdbf2016-11-22 21:47:33 +010090 }
91 }
92}
93
94#search ol li:nth-of-type(even) div.match-main div.match-wrap {
95 background-color: $kwic-line-even;
96}
97
98
99div.snippet {
100 text-overflow: ellipsis;
101 text-indent: 0;
102 text-shadow: $light-shadow;
Akron08b82d62016-12-05 15:06:05 +0100103 font-size: 0;
Akron49bfdbf2016-11-22 21:47:33 +0100104 > span, mark {
Akron08b82d62016-12-05 15:06:05 +0100105 font-size: $font-size;
Akron49bfdbf2016-11-22 21:47:33 +0100106 padding: 5pt 0 6pt 0;
107 white-space: no-wrap !important;
108 > span {
109 white-space: no-wrap !important;
110 }
111 }
112 > mark, > span.match {
113 font-weight: bold;
Akron08b82d62016-12-05 15:06:05 +0100114 color: $black;
115 text-shadow: none;
Akron49bfdbf2016-11-22 21:47:33 +0100116 padding-left: 4pt;
117 padding-right: 2pt;
118 }
Akron09e7f1f2018-05-28 14:08:14 +0200119 > span.match > span.cutted::after {
120 content: $fa-cut;
121 font-family: FontAwesome;
122 padding: {
123 left: 4pt;
124 right: 4pt;
125 }
126 color: $light-green;
127 }
Akron49bfdbf2016-11-22 21:47:33 +0100128}
129
130
131
132#search div.matchinfo {
133 display: none;
134}
135
Akronb6685bb2018-02-04 00:44:47 +0100136#search {
137
138 li.active div.matchinfo {
139 display: block;
140 }
141
142 li.active + li.active {
143 border-top: $border-size solid $light-grey;
144 padding-top: 3 * $border-size;
145 > ul.action.right {
146 padding-top: 3 * $border-size;
147 }
148 }
Akron3bb91bc2016-12-02 16:43:17 +0100149}
150
Akronb6685bb2018-02-04 00:44:47 +0100151
152
Akron49bfdbf2016-11-22 21:47:33 +0100153#search div.match-main {
154 position: relative;
155 z-index: 4;
156 > div.match-wrap {
157 margin-left: -49999.5%;
158 width: 99999%;
159 overflow-x: hidden;
160 overflow-y: visible;
161 position: relative;
162 box-sizing: border-box;
163 }
164}
165
166div.snippet.startMore:before,
167div.snippet.endMore:after {
168 content: "…";
169 padding-left: 2pt;
170 padding-right: 2pt;
171}
172
173/**
174 * flag
175 */
176div.snippet div.flag {
177 position: absolute;
178 height: 100%;
Akron3bb91bc2016-12-02 16:43:17 +0100179 top: 0;
180 // margin-left: -49999.5%;
181 // margin-left: 50%;
Akron49bfdbf2016-11-22 21:47:33 +0100182 margin-left: 50%;
183 width: 11px;
184 background-color: $dark-orange;
185 border-right-color: $nearly-white;
186 border-right: 1px solid $darkest-orange;
187}
188
189/**
190 * References
191 */
Akron8b592d42018-01-26 18:33:06 +0100192
Akron49bfdbf2016-11-22 21:47:33 +0100193#search > ol > li p.ref {
194 display: none;
Akron04905352018-01-24 02:06:32 +0100195
Akron8b592d42018-01-26 18:33:06 +0100196 // TEMP! Remove
Akron04905352018-01-24 02:06:32 +0100197 > span.meta {
198 cursor: pointer;
Akron8b592d42018-01-26 18:33:06 +0100199 @include choose-item;
200 margin: $border-size $border-size 0 $border-size !important;
201 text-align: center;
Akron04905352018-01-24 02:06:32 +0100202 text-decoration: none;
203 padding: 0pt 3pt;
Akron8b592d42018-01-26 18:33:06 +0100204 border: {
205 width: $border-size;
206 style: solid;
207 radius: $standard-border-radius;
208 }
209 &:hover {
210 cursor:pointer;
211 @include choose-hover;
212 }
Akron04905352018-01-24 02:06:32 +0100213
Akron8b592d42018-01-26 18:33:06 +0100214 /*
215 color: $nearly-white;
216 */
Akron04905352018-01-24 02:06:32 +0100217 &::after {
Akron8b592d42018-01-26 18:33:06 +0100218 /*
Akron04905352018-01-24 02:06:32 +0100219 font-size: 12pt;
Akron8b592d42018-01-26 18:33:06 +0100220font-family: "FontAwesome";
Akron04905352018-01-24 02:06:32 +0100221 content: $fa-metadata;
Akron8b592d42018-01-26 18:33:06 +0100222 */
223 content: "+Meta";
Akron04905352018-01-24 02:06:32 +0100224 }
225
226 > span {
227 @include blind;
228 }
229 }
Akron49bfdbf2016-11-22 21:47:33 +0100230}
231
Akroneaba63e2018-01-26 19:49:30 +0100232// More is defined in vc.scss
233p.ref div.action.bottom {
Akron8b592d42018-01-26 18:33:06 +0100234 display: inline-block;
235 margin-right: .5em;
236 > span {
237 position: relative;
Akroneaba63e2018-01-26 19:49:30 +0100238 box-shadow: none;
Akron8b592d42018-01-26 18:33:06 +0100239 }
240}
241
Akron49bfdbf2016-11-22 21:47:33 +0100242/**
243 * Active
244 */
Akron2a4e9af2017-12-22 15:45:22 +0100245body.no-js #search > ol > li:active,
246#search > ol > li.active,
247#search > ol > li:target {
248 background-color: $dark-orange;
249 display: block;
250 text-align: left;
251 position: relative;
252 border-width: 2px;
253 white-space: wrap;
254 height: auto;
255 width: auto;
Akron3bb91bc2016-12-02 16:43:17 +0100256
Akron2a4e9af2017-12-22 15:45:22 +0100257 div.match-main > div.match-wrap {
258 cursor: default;
Akron49bfdbf2016-11-22 21:47:33 +0100259 }
Akron3bb91bc2016-12-02 16:43:17 +0100260 span {
Akronbd342982018-01-25 18:01:46 +0100261 display: inline; // !important;
Akron3bb91bc2016-12-02 16:43:17 +0100262 }
263 ul.action {
264 display: block;
265 }
Akron49bfdbf2016-11-22 21:47:33 +0100266 div.match-wrap {
267 min-height: 20pt;
268 div.snippet {
269 background-color: $light-orange;
270 > * {
271 background-color: transparent;
272 }
273 div.flag {
274 display: none;
275 }
276 padding: 2pt 0 5pt 5pt;
277 margin: {
278 top: 0;
279 right: $right-match-distance; // 3em;
280 bottom: 0;
281 left: 0; // 5pt margin-top
282 }
283 > span {
Akron08b82d62016-12-05 15:06:05 +0100284 // color: black;
Akron49bfdbf2016-11-22 21:47:33 +0100285 line-height: 1.4em;
286 width: auto;
287 &.context-left {
288 margin-left: 0;
289 display: inline;
290 overflow: visible;
291 text-align: left;
292 width: auto;
293 }
294 }
295 }
296 }
Akron49bfdbf2016-11-22 21:47:33 +0100297
Akron49bfdbf2016-11-22 21:47:33 +0100298 overflow: hidden;
Akron8b592d42018-01-26 18:33:06 +0100299
Akron49bfdbf2016-11-22 21:47:33 +0100300 div.meta {
Akron97d42802016-11-26 22:45:46 +0100301 display: none;
302 // visibility: hidden;
Akron49bfdbf2016-11-22 21:47:33 +0100303 }
304 div.match-main {
Akron3bb91bc2016-12-02 16:43:17 +0100305 width: 100%;
Akron97d42802016-11-26 22:45:46 +0100306 display: block;
Akron49bfdbf2016-11-22 21:47:33 +0100307 div.match-wrap {
Akron3bb91bc2016-12-02 16:43:17 +0100308 background-color: $dark-orange;
309 width: 100%;
Akron49bfdbf2016-11-22 21:47:33 +0100310 margin-left: 0;
311 overflow-x: visible;
312 white-space: wrap;
313 }
314 }
315 p.ref {
316 display: block;
Akron08b82d62016-12-05 15:06:05 +0100317 color: $nearly-white;
Akron49bfdbf2016-11-22 21:47:33 +0100318 padding: 3pt 10pt 3pt 3pt;
319 padding-right: $right-match-distance;
320 margin: 0pt;
321 width: 100%;
322 bottom: 0;
323 z-index: 30;
324 > span.sigle {
325 font-size: 75%;
326 vertical-align: top;
327 color: $light-orange;
328 float: right;
329 }
330 }
331}
332
333
334
335/**
336 * Right aligned
337 */
338
339#search ol span.context-left {
340 display: inline-block;
341 width: 50.01%;
342 text-align: right;
343}
344
345#search ol.align-right {
346 text-align: right;
347 div.match-main span.context-right {
348 display: inline-block;
349 width: 49.915%;
350 text-align: left;
351 }
352}
353
Akron01231002017-06-29 20:47:58 +0200354// fix empty contexts
355#search ol span.context-left,
356#search ol span.context-right {
357 &:empty::after {
358 content: " ";
359 display: inline-block;
360 }
361}
Akron49bfdbf2016-11-22 21:47:33 +0100362
363/**
364 * Highlights
365 */
366mark {
367 background-color: inherit;
368 color: inherit;
369}
370
371mark > mark,
372em,
373.level-0 {
374 border-bottom-width: 2px;
375 border-bottom-style: solid;
Akron3bb91bc2016-12-02 16:43:17 +0100376 padding-bottom: 0px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100377 font-style: normal;
378}
379
380mark > mark > mark,
381em > em,
382.level-1 {
Akron3bb91bc2016-12-02 16:43:17 +0100383 padding-bottom: 3px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100384}
385
386mark > mark > mark > mark,
387em > em > em,
388.level-2 {
Akron3bb91bc2016-12-02 16:43:17 +0100389 padding-bottom: 6px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100390}
391
392
393#search > ol > li {
394 &:not(.active) mark > mark > mark > mark,
395 &:not(.active) em > em > em {
396 line-height: 180%;
397 }
398 &.active mark > mark > mark > mark,
399 &.active em > em > em {
400 line-height: 250%;
401 }
402}
403
404.class-1 { border-color: $kwic-highlight-1; }
405.class-2 { border-color: $kwic-highlight-2; }
406.class-3 { border-color: $kwic-highlight-3; }
407.class-4 { border-color: $kwic-highlight-4; }
Akron3bb91bc2016-12-02 16:43:17 +0100408
409
410/**
411 * Actions
412 */
413
414ul.action {
415 display: none;
416 // background-color: $dark-orange;
417 font-size: 12pt;
Akron08b82d62016-12-05 15:06:05 +0100418 color: $nearly-white;
Akron3bb91bc2016-12-02 16:43:17 +0100419 text: {
420 shadow: none;
421 indent: 0;
422 }
423 margin: 0;
424 padding: 0;
425 z-index: 5;
426
427 list-style: {
428 type: none;
429 position: inline;
430 }
431 &.right {
432 position: absolute;
Akron08b82d62016-12-05 15:06:05 +0100433 z-index: 4;
Akron3bb91bc2016-12-02 16:43:17 +0100434 width: $right-match-distance;
435 float: right;
436 text-align: center;
437 padding: 0pt 3pt;
438 height: 100%;
439 right: 0;
440 top: 0;
441 li {
442 cursor: pointer;
Akron08b82d62016-12-05 15:06:05 +0100443 color: $nearly-white;
Akron3bb91bc2016-12-02 16:43:17 +0100444 text-decoration: none;
445
446 > span {
447 @include blind;
448 }
449 &.close::after {
450 font-family: "FontAwesome";
451 content: $fa-close;
452 }
453 &.info::after {
454 font-family: "FontAwesome";
455 content: $fa-info;
456 }
457 }
458 }
459}
460