blob: cbdefde27ab41fa44133129b86c08eab9b8d04bd [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 {
Akron3bb91bc2016-12-02 16:43:17 +0100297 width: 100%;
Akron97d42802016-11-26 22:45:46 +0100298 display: block;
Akron49bfdbf2016-11-22 21:47:33 +0100299 div.match-wrap {
Akron3bb91bc2016-12-02 16:43:17 +0100300 background-color: $dark-orange;
301 width: 100%;
Akron49bfdbf2016-11-22 21:47:33 +0100302 margin-left: 0;
303 overflow-x: visible;
304 white-space: wrap;
305 }
306 }
307 p.ref {
308 display: block;
Akron08b82d62016-12-05 15:06:05 +0100309 color: $nearly-white;
Akron49bfdbf2016-11-22 21:47:33 +0100310 padding: 3pt 10pt 3pt 3pt;
311 padding-right: $right-match-distance;
312 margin: 0pt;
313 width: 100%;
314 bottom: 0;
315 z-index: 30;
316 > span.sigle {
317 font-size: 75%;
318 vertical-align: top;
319 color: $light-orange;
320 float: right;
321 }
322 }
323}
324
325
326
327/**
328 * Right aligned
329 */
Akron49bfdbf2016-11-22 21:47:33 +0100330#search ol span.context-left {
331 display: inline-block;
332 width: 50.01%;
333 text-align: right;
334}
335
336#search ol.align-right {
337 text-align: right;
Akron2b75b132018-08-13 09:47:47 +0200338
Akron49bfdbf2016-11-22 21:47:33 +0100339 div.match-main span.context-right {
340 display: inline-block;
341 width: 49.915%;
342 text-align: left;
343 }
344}
345
Akronad739342018-08-14 13:48:14 +0200346/**
347 * Center aligned
348 */
349#search ol.align-center {
350 display: table;
351 table-layout: fixed;
352 width: 100%;
353
354 div.meta {
355 width: 12em;
356 min-width: 12em;
357 }
358
359 .match-main {
360
361 div.flag {
362 margin-left: 50%;
363 }
364
365 > .match-wrap {
366 margin-left: 0;
367 width: 100% !important;
368 }
369
370 .snippet {
371 position: initial;
372 display: inline-block;
373 left: 50%;
374 transform: translateX(-50%);
375 overflow-x: hidden;
376 white-space: nowrap !important;
377
378 > mark, span.match {
379 display: inline-block;
380 }
381
382 span.context-left {
383 display: inline-block;
384 text-align: right;
385 width: 80000px;
386 margin-left: 60vw;
387 }
388
389 span.context-right {
390 display: inline-block;
391 text-align: left;
392 width: 80000px;
393 }
394 }
395 }
396}
397
398
Akron01231002017-06-29 20:47:58 +0200399// fix empty contexts
400#search ol span.context-left,
401#search ol span.context-right {
402 &:empty::after {
403 content: " ";
404 display: inline-block;
405 }
406}
Akron49bfdbf2016-11-22 21:47:33 +0100407
408/**
409 * Highlights
410 */
411mark {
412 background-color: inherit;
413 color: inherit;
414}
415
416mark > mark,
417em,
418.level-0 {
419 border-bottom-width: 2px;
420 border-bottom-style: solid;
Akron3bb91bc2016-12-02 16:43:17 +0100421 padding-bottom: 0px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100422 font-style: normal;
423}
424
425mark > mark > mark,
426em > em,
427.level-1 {
Akron3bb91bc2016-12-02 16:43:17 +0100428 padding-bottom: 3px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100429}
430
431mark > mark > mark > mark,
432em > em > em,
433.level-2 {
Akron3bb91bc2016-12-02 16:43:17 +0100434 padding-bottom: 6px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100435}
436
437
438#search > ol > li {
439 &:not(.active) mark > mark > mark > mark,
440 &:not(.active) em > em > em {
441 line-height: 180%;
442 }
443 &.active mark > mark > mark > mark,
444 &.active em > em > em {
445 line-height: 250%;
446 }
447}
448
449.class-1 { border-color: $kwic-highlight-1; }
450.class-2 { border-color: $kwic-highlight-2; }
451.class-3 { border-color: $kwic-highlight-3; }
452.class-4 { border-color: $kwic-highlight-4; }
Akron3bb91bc2016-12-02 16:43:17 +0100453
454
455/**
456 * Actions
457 */
Akronbfe912c2018-07-17 19:30:52 +0200458#search > ol > li .button-group.button-view {
459 display: none;
460}