blob: 76fb330c65d91cc41182cef06013ee89549c7df3 [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 {
Akronf74cd2e2018-08-15 16:26:18 +020026 display: flex;
27 flex-direction: row;
28 flex-wrap: nowrap;
29 align-items: stretch;
30 align-content: stretch;
31
Akron49bfdbf2016-11-22 21:47:33 +010032 div.meta {
33 position: relative;
Akronf74cd2e2018-08-15 16:26:18 +020034 flex: 1 0;
35 min-width: 12em;
36 max-width: 15em;
37
38 // Tiny hack
39 &:before {
40 content:" ";
41 display:inline-block;
42 height:100%;
43 vertical-align:middle;
44 }
45
Akron625fe0c2017-05-03 16:15:08 +020046 text-align: left;
Akronf74cd2e2018-08-15 16:26:18 +020047 // cursor: initial;
Akron97d42802016-11-26 22:45:46 +010048 width: 2px;
Akron49bfdbf2016-11-22 21:47:33 +010049 z-index: 5;
Akronad739342018-08-14 13:48:14 +020050 overflow-y: hidden;
51 overflow-x: hidden;
52 text-overflow: ellipsis;
Akron3bb91bc2016-12-02 16:43:17 +010053 white-space: nowrap;
Akron67b51812017-05-01 14:10:55 +020054 background-color: lighten($middle-grey, 5%);
55 // @include light-noise;
Akron08b82d62016-12-05 15:06:05 +010056 border: {
Akron46b9f212017-05-01 13:55:17 +020057 color: $dark-grey;
Akron08b82d62016-12-05 15:06:05 +010058 style: solid;
Akron46b9f212017-05-01 13:55:17 +020059 width: 2px 1px 0 0;
60 }
61 &:empty {
62 border-width: 0 1px 0 0;
63 }
64 &.flip {
Akron67b51812017-05-01 14:10:55 +020065 background-color: lighten($middle-grey, 17%);
Akron08b82d62016-12-05 15:06:05 +010066 }
Akron3bb91bc2016-12-02 16:43:17 +010067 color: $nearly-white;
Akron46b9f212017-05-01 13:55:17 +020068 font-size: 75%;
Akron3bb91bc2016-12-02 16:43:17 +010069 padding: 0 5pt;
Akron49bfdbf2016-11-22 21:47:33 +010070 }
Akron97d42802016-11-26 22:45:46 +010071 &:first-of-type div.meta {
Akron08b82d62016-12-05 15:06:05 +010072 border-top-width: 0;
Akron97d42802016-11-26 22:45:46 +010073 }
Akron08b82d62016-12-05 15:06:05 +010074 &:last-of-type div.meta {
75 border-bottom-width: 0;
76 }
Akron49bfdbf2016-11-22 21:47:33 +010077 }
78}
79
80#search > ol > li {
81 border: {
82 style: solid;
83 color: $dark-orange;
84 width: 0;
85 }
86}
87
88#search {
89 div.meta, div.match-main {
90 position: relative;
Akron08b82d62016-12-05 15:06:05 +010091 cursor: pointer;
Akron49bfdbf2016-11-22 21:47:33 +010092 }
93 /*
94 &:not(.active):not(:target) {
95 &:nth-of-type(even) div.main-col {
96 */
97 div.match-main {
Akronf74cd2e2018-08-15 16:26:18 +020098 display: block;
99 flex: 7 0;
Akron49bfdbf2016-11-22 21:47:33 +0100100 z-index: 4;
Akronf74cd2e2018-08-15 16:26:18 +0200101 overflow: hidden;
102
Akron49bfdbf2016-11-22 21:47:33 +0100103 > div.match-wrap {
104 width: 99999%;
105 margin-left: -49999.5%;
106 background-color: $kwic-line-noneven;
107 overflow-x: hidden;
108 overflow-y: visible;
Akron3bb91bc2016-12-02 16:43:17 +0100109 white-space: normal;
Akron49bfdbf2016-11-22 21:47:33 +0100110 }
111 }
112}
113
114#search ol li:nth-of-type(even) div.match-main div.match-wrap {
115 background-color: $kwic-line-even;
116}
117
118
119div.snippet {
120 text-overflow: ellipsis;
121 text-indent: 0;
122 text-shadow: $light-shadow;
Akron08b82d62016-12-05 15:06:05 +0100123 font-size: 0;
Akronf74cd2e2018-08-15 16:26:18 +0200124 white-space: nowrap !important;
125
Akron49bfdbf2016-11-22 21:47:33 +0100126 > span, mark {
127 padding: 5pt 0 6pt 0;
Akron2b75b132018-08-13 09:47:47 +0200128 font-size: $font-size;
Akronad739342018-08-14 13:48:14 +0200129 // white-space: nowrap;
Akronf74cd2e2018-08-15 16:26:18 +0200130 // > span {
Akronad739342018-08-14 13:48:14 +0200131 // white-space: nowrap;
Akronf74cd2e2018-08-15 16:26:18 +0200132 // }
Akron49bfdbf2016-11-22 21:47:33 +0100133 }
134 > mark, > span.match {
135 font-weight: bold;
Akron08b82d62016-12-05 15:06:05 +0100136 color: $black;
137 text-shadow: none;
Akron49bfdbf2016-11-22 21:47:33 +0100138 padding-left: 4pt;
139 padding-right: 2pt;
140 }
Akron09e7f1f2018-05-28 14:08:14 +0200141 > span.match > span.cutted::after {
142 content: $fa-cut;
143 font-family: FontAwesome;
144 padding: {
145 left: 4pt;
146 right: 4pt;
147 }
148 color: $light-green;
149 }
Akron49bfdbf2016-11-22 21:47:33 +0100150}
151
152
153
154#search div.matchinfo {
155 display: none;
156}
157
Akronb6685bb2018-02-04 00:44:47 +0100158#search {
Akronb6685bb2018-02-04 00:44:47 +0100159 li.active div.matchinfo {
160 display: block;
161 }
162
163 li.active + li.active {
164 border-top: $border-size solid $light-grey;
165 padding-top: 3 * $border-size;
Akronbfe912c2018-07-17 19:30:52 +0200166 // > ul.action.right {
167 .button-group.button-view {
Akronb6685bb2018-02-04 00:44:47 +0100168 padding-top: 3 * $border-size;
169 }
170 }
Akron3bb91bc2016-12-02 16:43:17 +0100171}
172
Akronb6685bb2018-02-04 00:44:47 +0100173
174
Akronf74cd2e2018-08-15 16:26:18 +0200175/*
Akron49bfdbf2016-11-22 21:47:33 +0100176#search div.match-main {
177 position: relative;
178 z-index: 4;
179 > div.match-wrap {
180 margin-left: -49999.5%;
181 width: 99999%;
182 overflow-x: hidden;
183 overflow-y: visible;
184 position: relative;
185 box-sizing: border-box;
186 }
187}
Akronf74cd2e2018-08-15 16:26:18 +0200188*/
Akron49bfdbf2016-11-22 21:47:33 +0100189
190div.snippet.startMore:before,
191div.snippet.endMore:after {
192 content: "…";
193 padding-left: 2pt;
194 padding-right: 2pt;
195}
196
197/**
198 * flag
199 */
200div.snippet div.flag {
201 position: absolute;
202 height: 100%;
Akron3bb91bc2016-12-02 16:43:17 +0100203 top: 0;
Akronf74cd2e2018-08-15 16:26:18 +0200204 left: 0;
Akron49bfdbf2016-11-22 21:47:33 +0100205 width: 11px;
206 background-color: $dark-orange;
207 border-right-color: $nearly-white;
208 border-right: 1px solid $darkest-orange;
209}
210
211/**
212 * References
213 */
Akron8b592d42018-01-26 18:33:06 +0100214
Akron49bfdbf2016-11-22 21:47:33 +0100215#search > ol > li p.ref {
216 display: none;
217}
218
Akron8b592d42018-01-26 18:33:06 +0100219
Akron49bfdbf2016-11-22 21:47:33 +0100220/**
221 * Active
222 */
Akron2a4e9af2017-12-22 15:45:22 +0100223body.no-js #search > ol > li:active,
224#search > ol > li.active,
225#search > ol > li:target {
226 background-color: $dark-orange;
227 display: block;
228 text-align: left;
229 position: relative;
230 border-width: 2px;
231 white-space: wrap;
232 height: auto;
233 width: auto;
Akron3bb91bc2016-12-02 16:43:17 +0100234
Akron2a4e9af2017-12-22 15:45:22 +0100235 div.match-main > div.match-wrap {
236 cursor: default;
Akron49bfdbf2016-11-22 21:47:33 +0100237 }
Akronf74cd2e2018-08-15 16:26:18 +0200238 .snippet {
239 white-space: normal !important;
240 }
241
Akron2b75b132018-08-13 09:47:47 +0200242 .snippet span {
243 display: inline !important;
Akron3bb91bc2016-12-02 16:43:17 +0100244 }
Akronbfe912c2018-07-17 19:30:52 +0200245 .button-group.button-view {
Akron3bb91bc2016-12-02 16:43:17 +0100246 display: block;
247 }
Akron49bfdbf2016-11-22 21:47:33 +0100248 div.match-wrap {
249 min-height: 20pt;
250 div.snippet {
Akronf74cd2e2018-08-15 16:26:18 +0200251
Akron49bfdbf2016-11-22 21:47:33 +0100252 background-color: $light-orange;
253 > * {
254 background-color: transparent;
255 }
256 div.flag {
257 display: none;
258 }
259 padding: 2pt 0 5pt 5pt;
260 margin: {
261 top: 0;
262 right: $right-match-distance; // 3em;
263 bottom: 0;
264 left: 0; // 5pt margin-top
265 }
266 > span {
Akron49bfdbf2016-11-22 21:47:33 +0100267 line-height: 1.4em;
268 width: auto;
269 &.context-left {
270 margin-left: 0;
271 display: inline;
272 overflow: visible;
273 text-align: left;
274 width: auto;
275 }
276 }
277 }
278 }
Akron49bfdbf2016-11-22 21:47:33 +0100279
Akron49bfdbf2016-11-22 21:47:33 +0100280 overflow: hidden;
Akron8b592d42018-01-26 18:33:06 +0100281
Akron49bfdbf2016-11-22 21:47:33 +0100282 div.meta {
Akron97d42802016-11-26 22:45:46 +0100283 display: none;
284 // visibility: hidden;
Akron49bfdbf2016-11-22 21:47:33 +0100285 }
286 div.match-main {
Akron97d42802016-11-26 22:45:46 +0100287 display: block;
Akronb0e484b2018-08-14 17:06:17 +0200288 width: 100%;
289
Akron49bfdbf2016-11-22 21:47:33 +0100290 div.match-wrap {
Akron3bb91bc2016-12-02 16:43:17 +0100291 background-color: $dark-orange;
292 width: 100%;
Akron49bfdbf2016-11-22 21:47:33 +0100293 margin-left: 0;
294 overflow-x: visible;
295 white-space: wrap;
296 }
297 }
298 p.ref {
299 display: block;
Akron08b82d62016-12-05 15:06:05 +0100300 color: $nearly-white;
Akron49bfdbf2016-11-22 21:47:33 +0100301 padding: 3pt 10pt 3pt 3pt;
302 padding-right: $right-match-distance;
303 margin: 0pt;
304 width: 100%;
305 bottom: 0;
306 z-index: 30;
307 > span.sigle {
308 font-size: 75%;
309 vertical-align: top;
310 color: $light-orange;
311 float: right;
312 }
313 }
314}
315
Akron49bfdbf2016-11-22 21:47:33 +0100316#search ol span.context-left {
317 display: inline-block;
318 width: 50.01%;
319 text-align: right;
320}
321
Akronf74cd2e2018-08-15 16:26:18 +0200322
323/**
324 * Right aligned
325 */
326
Akron49bfdbf2016-11-22 21:47:33 +0100327#search ol.align-right {
328 text-align: right;
Akron2b75b132018-08-13 09:47:47 +0200329
Akron49bfdbf2016-11-22 21:47:33 +0100330 div.match-main span.context-right {
331 display: inline-block;
332 width: 49.915%;
333 text-align: left;
334 }
335}
336
Akronad739342018-08-14 13:48:14 +0200337/**
338 * Center aligned
339 */
340#search ol.align-center {
Akronf74cd2e2018-08-15 16:26:18 +0200341 div.match-main {
342 width: 100% !important;
Akronad739342018-08-14 13:48:14 +0200343
Akronf74cd2e2018-08-15 16:26:18 +0200344 > .match-wrap {
345 margin-left: 0;
346 position: relative;
347 }
Akronad739342018-08-14 13:48:14 +0200348 }
349
Akronf74cd2e2018-08-15 16:26:18 +0200350 li:not(.active) div.snippet {
351 white-space: normal;
352 text-align: center;
353 width: 100000pt;
354 margin-left: -50000pt;
355
356 span.context-left {
357 display: inline-block;
358 text-align: right;
359 width: 40000pt;
360 margin-left: 70vw;
Akronad739342018-08-14 13:48:14 +0200361 }
362
Akronf74cd2e2018-08-15 16:26:18 +0200363 span.context-right {
364 display: inline-block;
365 text-align: left;
366 width: 40000pt;
Akronad739342018-08-14 13:48:14 +0200367 }
368 }
369}
370
371
Akron01231002017-06-29 20:47:58 +0200372// fix empty contexts
373#search ol span.context-left,
374#search ol span.context-right {
375 &:empty::after {
376 content: " ";
377 display: inline-block;
378 }
379}
Akron49bfdbf2016-11-22 21:47:33 +0100380
381/**
382 * Highlights
383 */
384mark {
385 background-color: inherit;
386 color: inherit;
387}
388
389mark > mark,
390em,
391.level-0 {
392 border-bottom-width: 2px;
393 border-bottom-style: solid;
Akron3bb91bc2016-12-02 16:43:17 +0100394 padding-bottom: 0px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100395 font-style: normal;
396}
397
398mark > mark > mark,
399em > em,
400.level-1 {
Akron3bb91bc2016-12-02 16:43:17 +0100401 padding-bottom: 3px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100402}
403
404mark > mark > mark > mark,
405em > em > em,
406.level-2 {
Akron3bb91bc2016-12-02 16:43:17 +0100407 padding-bottom: 6px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100408}
409
410
411#search > ol > li {
412 &:not(.active) mark > mark > mark > mark,
413 &:not(.active) em > em > em {
414 line-height: 180%;
415 }
416 &.active mark > mark > mark > mark,
417 &.active em > em > em {
418 line-height: 250%;
419 }
420}
421
422.class-1 { border-color: $kwic-highlight-1; }
423.class-2 { border-color: $kwic-highlight-2; }
424.class-3 { border-color: $kwic-highlight-3; }
425.class-4 { border-color: $kwic-highlight-4; }
Akron3bb91bc2016-12-02 16:43:17 +0100426
427
428/**
429 * Actions
430 */
Akronbfe912c2018-07-17 19:30:52 +0200431#search > ol > li .button-group.button-view {
432 display: none;
433}