blob: 08a6103c89073602857ca0cd78cc9af8bd7e3e28 [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;
18 border: 1px solid black;
19 text-indent: 0;
20 list-style-type: none;
21 margin: 0;
22 padding: 0;
23 border: 1px solid $kwic-border;
Akron08b82d62016-12-05 15:06:05 +010024 font-size: $font-size;
Akron49bfdbf2016-11-22 21:47:33 +010025
26 > li {
27 display: table-row;
28 table-layout: auto;
29 div.meta {
30 position: relative;
31 display: table-cell;
Akron625fe0c2017-05-03 16:15:08 +020032 text-align: left;
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;
36 overflow-y: visible;
Akron3bb91bc2016-12-02 16:43:17 +010037 white-space: nowrap;
Akron67b51812017-05-01 14:10:55 +020038 background-color: lighten($middle-grey, 5%);
39 // @include light-noise;
Akron08b82d62016-12-05 15:06:05 +010040 border: {
Akron46b9f212017-05-01 13:55:17 +020041 color: $dark-grey;
Akron08b82d62016-12-05 15:06:05 +010042 style: solid;
Akron46b9f212017-05-01 13:55:17 +020043 width: 2px 1px 0 0;
44 }
45 &:empty {
46 border-width: 0 1px 0 0;
47 }
48 &.flip {
Akron67b51812017-05-01 14:10:55 +020049 background-color: lighten($middle-grey, 17%);
Akron08b82d62016-12-05 15:06:05 +010050 }
Akron3bb91bc2016-12-02 16:43:17 +010051 color: $nearly-white;
Akron46b9f212017-05-01 13:55:17 +020052 font-size: 75%;
Akron3bb91bc2016-12-02 16:43:17 +010053 padding: 0 5pt;
Akron49bfdbf2016-11-22 21:47:33 +010054 }
Akron97d42802016-11-26 22:45:46 +010055 &:first-of-type div.meta {
Akron08b82d62016-12-05 15:06:05 +010056 border-top-width: 0;
Akron97d42802016-11-26 22:45:46 +010057 }
Akron08b82d62016-12-05 15:06:05 +010058 &:last-of-type div.meta {
59 border-bottom-width: 0;
60 }
Akron49bfdbf2016-11-22 21:47:33 +010061 }
62}
63
64#search > ol > li {
65 border: {
66 style: solid;
67 color: $dark-orange;
68 width: 0;
69 }
70}
71
72#search {
73 div.meta, div.match-main {
74 position: relative;
Akron08b82d62016-12-05 15:06:05 +010075 cursor: pointer;
Akron49bfdbf2016-11-22 21:47:33 +010076 }
77 /*
78 &:not(.active):not(:target) {
79 &:nth-of-type(even) div.main-col {
80 */
81 div.match-main {
82 display: table-cell;
83 z-index: 4;
84 > div.match-wrap {
85 width: 99999%;
86 margin-left: -49999.5%;
87 background-color: $kwic-line-noneven;
88 overflow-x: hidden;
89 overflow-y: visible;
Akron3bb91bc2016-12-02 16:43:17 +010090 white-space: normal;
Akron49bfdbf2016-11-22 21:47:33 +010091 }
92 }
93}
94
95#search ol li:nth-of-type(even) div.match-main div.match-wrap {
96 background-color: $kwic-line-even;
97}
98
99
100div.snippet {
101 text-overflow: ellipsis;
102 text-indent: 0;
103 text-shadow: $light-shadow;
Akron08b82d62016-12-05 15:06:05 +0100104 font-size: 0;
Akron49bfdbf2016-11-22 21:47:33 +0100105 > span, mark {
Akron08b82d62016-12-05 15:06:05 +0100106 font-size: $font-size;
Akron49bfdbf2016-11-22 21:47:33 +0100107 padding: 5pt 0 6pt 0;
108 white-space: no-wrap !important;
109 > span {
110 white-space: no-wrap !important;
111 }
112 }
113 > mark, > span.match {
114 font-weight: bold;
Akron08b82d62016-12-05 15:06:05 +0100115 color: $black;
116 text-shadow: none;
Akron49bfdbf2016-11-22 21:47:33 +0100117 padding-left: 4pt;
118 padding-right: 2pt;
119 }
Akron09e7f1f2018-05-28 14:08:14 +0200120 > span.match > span.cutted::after {
121 content: $fa-cut;
122 font-family: FontAwesome;
123 padding: {
124 left: 4pt;
125 right: 4pt;
126 }
127 color: $light-green;
128 }
Akron49bfdbf2016-11-22 21:47:33 +0100129}
130
131
132
133#search div.matchinfo {
134 display: none;
135}
136
Akronb6685bb2018-02-04 00:44:47 +0100137#search {
138
139 li.active div.matchinfo {
140 display: block;
141 }
142
143 li.active + li.active {
144 border-top: $border-size solid $light-grey;
145 padding-top: 3 * $border-size;
146 > ul.action.right {
147 padding-top: 3 * $border-size;
148 }
149 }
Akron3bb91bc2016-12-02 16:43:17 +0100150}
151
Akronb6685bb2018-02-04 00:44:47 +0100152
153
Akron49bfdbf2016-11-22 21:47:33 +0100154#search div.match-main {
155 position: relative;
156 z-index: 4;
157 > div.match-wrap {
158 margin-left: -49999.5%;
159 width: 99999%;
160 overflow-x: hidden;
161 overflow-y: visible;
162 position: relative;
163 box-sizing: border-box;
164 }
165}
166
167div.snippet.startMore:before,
168div.snippet.endMore:after {
169 content: "…";
170 padding-left: 2pt;
171 padding-right: 2pt;
172}
173
174/**
175 * flag
176 */
177div.snippet div.flag {
178 position: absolute;
179 height: 100%;
Akron3bb91bc2016-12-02 16:43:17 +0100180 top: 0;
181 // margin-left: -49999.5%;
182 // margin-left: 50%;
Akron49bfdbf2016-11-22 21:47:33 +0100183 margin-left: 50%;
184 width: 11px;
185 background-color: $dark-orange;
186 border-right-color: $nearly-white;
187 border-right: 1px solid $darkest-orange;
188}
189
190/**
191 * References
192 */
Akron8b592d42018-01-26 18:33:06 +0100193
Akron49bfdbf2016-11-22 21:47:33 +0100194#search > ol > li p.ref {
195 display: none;
Akron04905352018-01-24 02:06:32 +0100196
Akron8b592d42018-01-26 18:33:06 +0100197 // TEMP! Remove
Akron04905352018-01-24 02:06:32 +0100198 > span.meta {
199 cursor: pointer;
Akron8b592d42018-01-26 18:33:06 +0100200 @include choose-item;
201 margin: $border-size $border-size 0 $border-size !important;
202 text-align: center;
Akron04905352018-01-24 02:06:32 +0100203 text-decoration: none;
204 padding: 0pt 3pt;
Akron8b592d42018-01-26 18:33:06 +0100205 border: {
206 width: $border-size;
207 style: solid;
208 radius: $standard-border-radius;
209 }
210 &:hover {
211 cursor:pointer;
212 @include choose-hover;
213 }
Akron04905352018-01-24 02:06:32 +0100214
Akron8b592d42018-01-26 18:33:06 +0100215 /*
216 color: $nearly-white;
217 */
Akron04905352018-01-24 02:06:32 +0100218 &::after {
Akron8b592d42018-01-26 18:33:06 +0100219 /*
Akron04905352018-01-24 02:06:32 +0100220 font-size: 12pt;
Akron8b592d42018-01-26 18:33:06 +0100221font-family: "FontAwesome";
Akron04905352018-01-24 02:06:32 +0100222 content: $fa-metadata;
Akron8b592d42018-01-26 18:33:06 +0100223 */
224 content: "+Meta";
Akron04905352018-01-24 02:06:32 +0100225 }
226
227 > span {
228 @include blind;
229 }
230 }
Akron49bfdbf2016-11-22 21:47:33 +0100231}
232
Akroneaba63e2018-01-26 19:49:30 +0100233// More is defined in vc.scss
234p.ref div.action.bottom {
Akron8b592d42018-01-26 18:33:06 +0100235 display: inline-block;
236 margin-right: .5em;
237 > span {
238 position: relative;
Akroneaba63e2018-01-26 19:49:30 +0100239 box-shadow: none;
Akron8b592d42018-01-26 18:33:06 +0100240 }
241}
242
Akron49bfdbf2016-11-22 21:47:33 +0100243/**
244 * Active
245 */
Akron2a4e9af2017-12-22 15:45:22 +0100246body.no-js #search > ol > li:active,
247#search > ol > li.active,
248#search > ol > li:target {
249 background-color: $dark-orange;
250 display: block;
251 text-align: left;
252 position: relative;
253 border-width: 2px;
254 white-space: wrap;
255 height: auto;
256 width: auto;
Akron3bb91bc2016-12-02 16:43:17 +0100257
Akron2a4e9af2017-12-22 15:45:22 +0100258 div.match-main > div.match-wrap {
259 cursor: default;
Akron49bfdbf2016-11-22 21:47:33 +0100260 }
Akron3bb91bc2016-12-02 16:43:17 +0100261 span {
Akronbd342982018-01-25 18:01:46 +0100262 display: inline; // !important;
Akron3bb91bc2016-12-02 16:43:17 +0100263 }
264 ul.action {
265 display: block;
266 }
Akron49bfdbf2016-11-22 21:47:33 +0100267 div.match-wrap {
268 min-height: 20pt;
269 div.snippet {
270 background-color: $light-orange;
271 > * {
272 background-color: transparent;
273 }
274 div.flag {
275 display: none;
276 }
277 padding: 2pt 0 5pt 5pt;
278 margin: {
279 top: 0;
280 right: $right-match-distance; // 3em;
281 bottom: 0;
282 left: 0; // 5pt margin-top
283 }
284 > span {
Akron08b82d62016-12-05 15:06:05 +0100285 // color: black;
Akron49bfdbf2016-11-22 21:47:33 +0100286 line-height: 1.4em;
287 width: auto;
288 &.context-left {
289 margin-left: 0;
290 display: inline;
291 overflow: visible;
292 text-align: left;
293 width: auto;
294 }
295 }
296 }
297 }
Akron49bfdbf2016-11-22 21:47:33 +0100298
Akron49bfdbf2016-11-22 21:47:33 +0100299 overflow: hidden;
Akron8b592d42018-01-26 18:33:06 +0100300
Akron49bfdbf2016-11-22 21:47:33 +0100301 div.meta {
Akron97d42802016-11-26 22:45:46 +0100302 display: none;
303 // visibility: hidden;
Akron49bfdbf2016-11-22 21:47:33 +0100304 }
305 div.match-main {
Akron3bb91bc2016-12-02 16:43:17 +0100306 width: 100%;
Akron97d42802016-11-26 22:45:46 +0100307 display: block;
Akron49bfdbf2016-11-22 21:47:33 +0100308 div.match-wrap {
Akron3bb91bc2016-12-02 16:43:17 +0100309 background-color: $dark-orange;
310 width: 100%;
Akron49bfdbf2016-11-22 21:47:33 +0100311 margin-left: 0;
312 overflow-x: visible;
313 white-space: wrap;
314 }
315 }
316 p.ref {
317 display: block;
Akron08b82d62016-12-05 15:06:05 +0100318 color: $nearly-white;
Akron49bfdbf2016-11-22 21:47:33 +0100319 padding: 3pt 10pt 3pt 3pt;
320 padding-right: $right-match-distance;
321 margin: 0pt;
322 width: 100%;
323 bottom: 0;
324 z-index: 30;
325 > span.sigle {
326 font-size: 75%;
327 vertical-align: top;
328 color: $light-orange;
329 float: right;
330 }
331 }
332}
333
334
335
336/**
337 * Right aligned
338 */
339
340#search ol span.context-left {
341 display: inline-block;
342 width: 50.01%;
343 text-align: right;
344}
345
346#search ol.align-right {
347 text-align: right;
348 div.match-main span.context-right {
349 display: inline-block;
350 width: 49.915%;
351 text-align: left;
352 }
353}
354
Akron01231002017-06-29 20:47:58 +0200355// fix empty contexts
356#search ol span.context-left,
357#search ol span.context-right {
358 &:empty::after {
359 content: " ";
360 display: inline-block;
361 }
362}
Akron49bfdbf2016-11-22 21:47:33 +0100363
364/**
365 * Highlights
366 */
367mark {
368 background-color: inherit;
369 color: inherit;
370}
371
372mark > mark,
373em,
374.level-0 {
375 border-bottom-width: 2px;
376 border-bottom-style: solid;
Akron3bb91bc2016-12-02 16:43:17 +0100377 padding-bottom: 0px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100378 font-style: normal;
379}
380
381mark > mark > mark,
382em > em,
383.level-1 {
Akron3bb91bc2016-12-02 16:43:17 +0100384 padding-bottom: 3px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100385}
386
387mark > mark > mark > mark,
388em > em > em,
389.level-2 {
Akron3bb91bc2016-12-02 16:43:17 +0100390 padding-bottom: 6px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100391}
392
393
394#search > ol > li {
395 &:not(.active) mark > mark > mark > mark,
396 &:not(.active) em > em > em {
397 line-height: 180%;
398 }
399 &.active mark > mark > mark > mark,
400 &.active em > em > em {
401 line-height: 250%;
402 }
403}
404
405.class-1 { border-color: $kwic-highlight-1; }
406.class-2 { border-color: $kwic-highlight-2; }
407.class-3 { border-color: $kwic-highlight-3; }
408.class-4 { border-color: $kwic-highlight-4; }
Akron3bb91bc2016-12-02 16:43:17 +0100409
410
411/**
412 * Actions
413 */
414
415ul.action {
416 display: none;
417 // background-color: $dark-orange;
418 font-size: 12pt;
Akron08b82d62016-12-05 15:06:05 +0100419 color: $nearly-white;
Akron3bb91bc2016-12-02 16:43:17 +0100420 text: {
421 shadow: none;
422 indent: 0;
423 }
424 margin: 0;
425 padding: 0;
426 z-index: 5;
427
428 list-style: {
429 type: none;
430 position: inline;
431 }
432 &.right {
433 position: absolute;
Akron08b82d62016-12-05 15:06:05 +0100434 z-index: 4;
Akron3bb91bc2016-12-02 16:43:17 +0100435 width: $right-match-distance;
436 float: right;
437 text-align: center;
438 padding: 0pt 3pt;
439 height: 100%;
440 right: 0;
441 top: 0;
442 li {
443 cursor: pointer;
Akron08b82d62016-12-05 15:06:05 +0100444 color: $nearly-white;
Akron3bb91bc2016-12-02 16:43:17 +0100445 text-decoration: none;
446
447 > span {
448 @include blind;
449 }
450 &.close::after {
451 font-family: "FontAwesome";
452 content: $fa-close;
453 }
454 &.info::after {
455 font-family: "FontAwesome";
456 content: $fa-info;
457 }
458 }
459 }
460}
461