blob: c45123123fa5ba849178c8ed6abc75fbc9020d4d [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;
Akronad739342018-08-14 13:48:14 +020032 vertical-align: middle;
Akron67b51812017-05-01 14:10:55 +020033 cursor: initial;
Akron97d42802016-11-26 22:45:46 +010034 width: 2px;
Akron49bfdbf2016-11-22 21:47:33 +010035 z-index: 5;
Akronad739342018-08-14 13:48:14 +020036 overflow-y: hidden;
37 overflow-x: hidden;
38 text-overflow: ellipsis;
Akron3bb91bc2016-12-02 16:43:17 +010039 white-space: nowrap;
Akron67b51812017-05-01 14:10:55 +020040 background-color: lighten($middle-grey, 5%);
41 // @include light-noise;
Akron08b82d62016-12-05 15:06:05 +010042 border: {
Akron46b9f212017-05-01 13:55:17 +020043 color: $dark-grey;
Akron08b82d62016-12-05 15:06:05 +010044 style: solid;
Akron46b9f212017-05-01 13:55:17 +020045 width: 2px 1px 0 0;
46 }
47 &:empty {
48 border-width: 0 1px 0 0;
49 }
50 &.flip {
Akron67b51812017-05-01 14:10:55 +020051 background-color: lighten($middle-grey, 17%);
Akron08b82d62016-12-05 15:06:05 +010052 }
Akron3bb91bc2016-12-02 16:43:17 +010053 color: $nearly-white;
Akron46b9f212017-05-01 13:55:17 +020054 font-size: 75%;
Akron3bb91bc2016-12-02 16:43:17 +010055 padding: 0 5pt;
Akron49bfdbf2016-11-22 21:47:33 +010056 }
Akron97d42802016-11-26 22:45:46 +010057 &:first-of-type div.meta {
Akron08b82d62016-12-05 15:06:05 +010058 border-top-width: 0;
Akron97d42802016-11-26 22:45:46 +010059 }
Akron08b82d62016-12-05 15:06:05 +010060 &:last-of-type div.meta {
61 border-bottom-width: 0;
62 }
Akron49bfdbf2016-11-22 21:47:33 +010063 }
64}
65
66#search > ol > li {
67 border: {
68 style: solid;
69 color: $dark-orange;
70 width: 0;
71 }
72}
73
74#search {
75 div.meta, div.match-main {
76 position: relative;
Akron08b82d62016-12-05 15:06:05 +010077 cursor: pointer;
Akron49bfdbf2016-11-22 21:47:33 +010078 }
79 /*
80 &:not(.active):not(:target) {
81 &:nth-of-type(even) div.main-col {
82 */
83 div.match-main {
84 display: table-cell;
85 z-index: 4;
86 > div.match-wrap {
87 width: 99999%;
88 margin-left: -49999.5%;
89 background-color: $kwic-line-noneven;
90 overflow-x: hidden;
91 overflow-y: visible;
Akron3bb91bc2016-12-02 16:43:17 +010092 white-space: normal;
Akron49bfdbf2016-11-22 21:47:33 +010093 }
94 }
95}
96
97#search ol li:nth-of-type(even) div.match-main div.match-wrap {
98 background-color: $kwic-line-even;
99}
100
101
102div.snippet {
103 text-overflow: ellipsis;
104 text-indent: 0;
105 text-shadow: $light-shadow;
Akron08b82d62016-12-05 15:06:05 +0100106 font-size: 0;
Akron49bfdbf2016-11-22 21:47:33 +0100107 > span, mark {
108 padding: 5pt 0 6pt 0;
Akron2b75b132018-08-13 09:47:47 +0200109 font-size: $font-size;
Akronad739342018-08-14 13:48:14 +0200110 // white-space: nowrap;
Akron49bfdbf2016-11-22 21:47:33 +0100111 > span {
Akronad739342018-08-14 13:48:14 +0200112 // white-space: nowrap;
Akron49bfdbf2016-11-22 21:47:33 +0100113 }
114 }
115 > mark, > span.match {
116 font-weight: bold;
Akron08b82d62016-12-05 15:06:05 +0100117 color: $black;
118 text-shadow: none;
Akron49bfdbf2016-11-22 21:47:33 +0100119 padding-left: 4pt;
120 padding-right: 2pt;
121 }
Akron09e7f1f2018-05-28 14:08:14 +0200122 > span.match > span.cutted::after {
123 content: $fa-cut;
124 font-family: FontAwesome;
125 padding: {
126 left: 4pt;
127 right: 4pt;
128 }
129 color: $light-green;
130 }
Akron49bfdbf2016-11-22 21:47:33 +0100131}
132
133
134
135#search div.matchinfo {
136 display: none;
137}
138
Akronb6685bb2018-02-04 00:44:47 +0100139#search {
140
141 li.active div.matchinfo {
142 display: block;
143 }
144
145 li.active + li.active {
146 border-top: $border-size solid $light-grey;
147 padding-top: 3 * $border-size;
Akronbfe912c2018-07-17 19:30:52 +0200148 // > ul.action.right {
149 .button-group.button-view {
Akronb6685bb2018-02-04 00:44:47 +0100150 padding-top: 3 * $border-size;
151 }
152 }
Akron3bb91bc2016-12-02 16:43:17 +0100153}
154
Akronb6685bb2018-02-04 00:44:47 +0100155
156
Akron49bfdbf2016-11-22 21:47:33 +0100157#search div.match-main {
158 position: relative;
159 z-index: 4;
160 > div.match-wrap {
161 margin-left: -49999.5%;
162 width: 99999%;
163 overflow-x: hidden;
164 overflow-y: visible;
165 position: relative;
166 box-sizing: border-box;
167 }
168}
169
170div.snippet.startMore:before,
171div.snippet.endMore:after {
172 content: "…";
173 padding-left: 2pt;
174 padding-right: 2pt;
175}
176
177/**
178 * flag
179 */
180div.snippet div.flag {
181 position: absolute;
182 height: 100%;
Akron3bb91bc2016-12-02 16:43:17 +0100183 top: 0;
184 // margin-left: -49999.5%;
185 // margin-left: 50%;
Akron49bfdbf2016-11-22 21:47:33 +0100186 margin-left: 50%;
187 width: 11px;
188 background-color: $dark-orange;
189 border-right-color: $nearly-white;
190 border-right: 1px solid $darkest-orange;
191}
192
193/**
194 * References
195 */
Akron8b592d42018-01-26 18:33:06 +0100196
Akron49bfdbf2016-11-22 21:47:33 +0100197#search > ol > li p.ref {
198 display: none;
Akron04905352018-01-24 02:06:32 +0100199
Akron8b592d42018-01-26 18:33:06 +0100200 // TEMP! Remove
Akron2b75b132018-08-13 09:47:47 +0200201 /*
Akron04905352018-01-24 02:06:32 +0100202 > span.meta {
203 cursor: pointer;
Akron8b592d42018-01-26 18:33:06 +0100204 @include choose-item;
205 margin: $border-size $border-size 0 $border-size !important;
206 text-align: center;
Akron04905352018-01-24 02:06:32 +0100207 text-decoration: none;
208 padding: 0pt 3pt;
Akron8b592d42018-01-26 18:33:06 +0100209 border: {
210 width: $border-size;
211 style: solid;
212 radius: $standard-border-radius;
213 }
214 &:hover {
215 cursor:pointer;
216 @include choose-hover;
217 }
Akron04905352018-01-24 02:06:32 +0100218
Akron2b75b132018-08-13 09:47:47 +0200219 // color: $nearly-white;
Akron04905352018-01-24 02:06:32 +0100220 &::after {
Akron2b75b132018-08-13 09:47:47 +0200221 // font-size: 12pt;
222 // font-family: "FontAwesome";
223 // content: $fa-metadata;
Akron8b592d42018-01-26 18:33:06 +0100224 content: "+Meta";
Akron04905352018-01-24 02:06:32 +0100225 }
226
227 > span {
228 @include blind;
229 }
230 }
Akron2b75b132018-08-13 09:47:47 +0200231 */
Akron49bfdbf2016-11-22 21:47:33 +0100232}
233
Akron8b592d42018-01-26 18:33:06 +0100234
Akron49bfdbf2016-11-22 21:47:33 +0100235/**
236 * Active
237 */
Akron2a4e9af2017-12-22 15:45:22 +0100238body.no-js #search > ol > li:active,
239#search > ol > li.active,
240#search > ol > li:target {
241 background-color: $dark-orange;
242 display: block;
243 text-align: left;
244 position: relative;
245 border-width: 2px;
246 white-space: wrap;
247 height: auto;
248 width: auto;
Akron3bb91bc2016-12-02 16:43:17 +0100249
Akron2a4e9af2017-12-22 15:45:22 +0100250 div.match-main > div.match-wrap {
251 cursor: default;
Akron49bfdbf2016-11-22 21:47:33 +0100252 }
Akron2b75b132018-08-13 09:47:47 +0200253 .snippet span {
254 display: inline !important;
Akron3bb91bc2016-12-02 16:43:17 +0100255 }
Akronbfe912c2018-07-17 19:30:52 +0200256 .button-group.button-view {
Akron3bb91bc2016-12-02 16:43:17 +0100257 display: block;
258 }
Akron49bfdbf2016-11-22 21:47:33 +0100259 div.match-wrap {
260 min-height: 20pt;
261 div.snippet {
262 background-color: $light-orange;
263 > * {
264 background-color: transparent;
265 }
266 div.flag {
267 display: none;
268 }
269 padding: 2pt 0 5pt 5pt;
270 margin: {
271 top: 0;
272 right: $right-match-distance; // 3em;
273 bottom: 0;
274 left: 0; // 5pt margin-top
275 }
276 > span {
Akron49bfdbf2016-11-22 21:47:33 +0100277 line-height: 1.4em;
278 width: auto;
279 &.context-left {
280 margin-left: 0;
281 display: inline;
282 overflow: visible;
283 text-align: left;
284 width: auto;
285 }
286 }
287 }
288 }
Akron49bfdbf2016-11-22 21:47:33 +0100289
Akron49bfdbf2016-11-22 21:47:33 +0100290 overflow: hidden;
Akron8b592d42018-01-26 18:33:06 +0100291
Akron49bfdbf2016-11-22 21:47:33 +0100292 div.meta {
Akron97d42802016-11-26 22:45:46 +0100293 display: none;
294 // visibility: hidden;
Akron49bfdbf2016-11-22 21:47:33 +0100295 }
296 div.match-main {
Akron97d42802016-11-26 22:45:46 +0100297 display: block;
Akronb0e484b2018-08-14 17:06:17 +0200298 width: 100%;
299
Akron49bfdbf2016-11-22 21:47:33 +0100300 div.match-wrap {
Akron3bb91bc2016-12-02 16:43:17 +0100301 background-color: $dark-orange;
302 width: 100%;
Akron49bfdbf2016-11-22 21:47:33 +0100303 margin-left: 0;
304 overflow-x: visible;
305 white-space: wrap;
306 }
307 }
308 p.ref {
309 display: block;
Akron08b82d62016-12-05 15:06:05 +0100310 color: $nearly-white;
Akron49bfdbf2016-11-22 21:47:33 +0100311 padding: 3pt 10pt 3pt 3pt;
312 padding-right: $right-match-distance;
313 margin: 0pt;
314 width: 100%;
315 bottom: 0;
316 z-index: 30;
317 > span.sigle {
318 font-size: 75%;
319 vertical-align: top;
320 color: $light-orange;
321 float: right;
322 }
323 }
324}
325
326
327
328/**
329 * Right aligned
330 */
Akron49bfdbf2016-11-22 21:47:33 +0100331#search ol span.context-left {
332 display: inline-block;
333 width: 50.01%;
334 text-align: right;
335}
336
337#search ol.align-right {
338 text-align: right;
Akron2b75b132018-08-13 09:47:47 +0200339
Akron49bfdbf2016-11-22 21:47:33 +0100340 div.match-main span.context-right {
341 display: inline-block;
342 width: 49.915%;
343 text-align: left;
344 }
345}
346
Akronb0e484b2018-08-14 17:06:17 +0200347// Complete margin, see main.scss
348// TODO:
349// This, however, needs to be adjusted for embedded views
350// and media!
351$complete-margin: $right-distance + ($standard-margin / 2) + (2 * $result-border-size);
352
353
Akronad739342018-08-14 13:48:14 +0200354/**
355 * Center aligned
356 */
357#search ol.align-center {
358 display: table;
Akronad739342018-08-14 13:48:14 +0200359 width: 100%;
Akronb0e484b2018-08-14 17:06:17 +0200360 max-width: 100%;
361 table-layout: fixed;
Akronad739342018-08-14 13:48:14 +0200362
Akronb0e484b2018-08-14 17:06:17 +0200363 li.active {
364 /*
365 display: table-caption !important;
366 caption-side: inherit;
367 */
368
369 display: block;
370 max-width: calc(100vw - #{$complete-margin});
371 width: calc(100vw - #{$complete-margin});
372
Akronad739342018-08-14 13:48:14 +0200373 }
Akronb0e484b2018-08-14 17:06:17 +0200374
375 li:not(.active) {
Akronad739342018-08-14 13:48:14 +0200376
Akronb0e484b2018-08-14 17:06:17 +0200377 div.meta {
378 width: 13vw;
379 min-width: 12em;
380 max-width: 12em;
Akronad739342018-08-14 13:48:14 +0200381 }
382
Akronb0e484b2018-08-14 17:06:17 +0200383 .match-main {
384
385 div.flag {
386 margin-left: 50%;
387 }
Akronad739342018-08-14 13:48:14 +0200388
Akronb0e484b2018-08-14 17:06:17 +0200389 > .match-wrap {
390 margin-left: 0;
391 width: 100% !important;
Akronad739342018-08-14 13:48:14 +0200392 }
393
Akronb0e484b2018-08-14 17:06:17 +0200394 .snippet {
395 position: initial;
Akronad739342018-08-14 13:48:14 +0200396 display: inline-block;
Akronb0e484b2018-08-14 17:06:17 +0200397 left: 50%;
398 transform: translateX(-50%);
399 overflow-x: hidden;
400 white-space: nowrap !important;
401
402 > mark, span.match {
403 display: inline-block;
404 }
Akronad739342018-08-14 13:48:14 +0200405
Akronb0e484b2018-08-14 17:06:17 +0200406 span.context-left {
407 display: inline-block;
408 text-align: right;
409 width: 80000px;
410 margin-left: 70vw;
411 }
412
413 span.context-right {
414 display: inline-block;
415 text-align: left;
416 width: 80000px;
417 }
Akronad739342018-08-14 13:48:14 +0200418 }
419 }
420 }
421}
422
423
Akron01231002017-06-29 20:47:58 +0200424// fix empty contexts
425#search ol span.context-left,
426#search ol span.context-right {
427 &:empty::after {
428 content: " ";
429 display: inline-block;
430 }
431}
Akron49bfdbf2016-11-22 21:47:33 +0100432
433/**
434 * Highlights
435 */
436mark {
437 background-color: inherit;
438 color: inherit;
439}
440
441mark > mark,
442em,
443.level-0 {
444 border-bottom-width: 2px;
445 border-bottom-style: solid;
Akron3bb91bc2016-12-02 16:43:17 +0100446 padding-bottom: 0px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100447 font-style: normal;
448}
449
450mark > mark > mark,
451em > em,
452.level-1 {
Akron3bb91bc2016-12-02 16:43:17 +0100453 padding-bottom: 3px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100454}
455
456mark > mark > mark > mark,
457em > em > em,
458.level-2 {
Akron3bb91bc2016-12-02 16:43:17 +0100459 padding-bottom: 6px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100460}
461
462
463#search > ol > li {
464 &:not(.active) mark > mark > mark > mark,
465 &:not(.active) em > em > em {
466 line-height: 180%;
467 }
468 &.active mark > mark > mark > mark,
469 &.active em > em > em {
470 line-height: 250%;
471 }
472}
473
474.class-1 { border-color: $kwic-highlight-1; }
475.class-2 { border-color: $kwic-highlight-2; }
476.class-3 { border-color: $kwic-highlight-3; }
477.class-4 { border-color: $kwic-highlight-4; }
Akron3bb91bc2016-12-02 16:43:17 +0100478
479
480/**
481 * Actions
482 */
Akronbfe912c2018-07-17 19:30:52 +0200483#search > ol > li .button-group.button-view {
484 display: none;
485}