blob: 6950559ccf91d4541c780543d636c6a16872db8e [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;
Akronbfe912c2018-07-17 19:30:52 +0200145 // > ul.action.right {
146 .button-group.button-view {
Akronb6685bb2018-02-04 00:44:47 +0100147 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
Akron8b592d42018-01-26 18:33:06 +0100233
Akron49bfdbf2016-11-22 21:47:33 +0100234/**
235 * Active
236 */
Akron2a4e9af2017-12-22 15:45:22 +0100237body.no-js #search > ol > li:active,
238#search > ol > li.active,
239#search > ol > li:target {
240 background-color: $dark-orange;
241 display: block;
242 text-align: left;
243 position: relative;
244 border-width: 2px;
245 white-space: wrap;
246 height: auto;
247 width: auto;
Akron3bb91bc2016-12-02 16:43:17 +0100248
Akron2a4e9af2017-12-22 15:45:22 +0100249 div.match-main > div.match-wrap {
250 cursor: default;
Akron49bfdbf2016-11-22 21:47:33 +0100251 }
Akron3bb91bc2016-12-02 16:43:17 +0100252 span {
Akronbd342982018-01-25 18:01:46 +0100253 display: inline; // !important;
Akron3bb91bc2016-12-02 16:43:17 +0100254 }
Akronbfe912c2018-07-17 19:30:52 +0200255 .button-group.button-view {
Akron3bb91bc2016-12-02 16:43:17 +0100256 display: block;
257 }
Akronbfe912c2018-07-17 19:30:52 +0200258/* ul.action {
259 display: block;
260 }
261*/
Akron49bfdbf2016-11-22 21:47:33 +0100262 div.match-wrap {
263 min-height: 20pt;
264 div.snippet {
265 background-color: $light-orange;
266 > * {
267 background-color: transparent;
268 }
269 div.flag {
270 display: none;
271 }
272 padding: 2pt 0 5pt 5pt;
273 margin: {
274 top: 0;
275 right: $right-match-distance; // 3em;
276 bottom: 0;
277 left: 0; // 5pt margin-top
278 }
279 > span {
Akron08b82d62016-12-05 15:06:05 +0100280 // color: black;
Akron49bfdbf2016-11-22 21:47:33 +0100281 line-height: 1.4em;
282 width: auto;
283 &.context-left {
284 margin-left: 0;
285 display: inline;
286 overflow: visible;
287 text-align: left;
288 width: auto;
289 }
290 }
291 }
292 }
Akron49bfdbf2016-11-22 21:47:33 +0100293
Akron49bfdbf2016-11-22 21:47:33 +0100294 overflow: hidden;
Akron8b592d42018-01-26 18:33:06 +0100295
Akron49bfdbf2016-11-22 21:47:33 +0100296 div.meta {
Akron97d42802016-11-26 22:45:46 +0100297 display: none;
298 // visibility: hidden;
Akron49bfdbf2016-11-22 21:47:33 +0100299 }
300 div.match-main {
Akron3bb91bc2016-12-02 16:43:17 +0100301 width: 100%;
Akron97d42802016-11-26 22:45:46 +0100302 display: block;
Akron49bfdbf2016-11-22 21:47:33 +0100303 div.match-wrap {
Akron3bb91bc2016-12-02 16:43:17 +0100304 background-color: $dark-orange;
305 width: 100%;
Akron49bfdbf2016-11-22 21:47:33 +0100306 margin-left: 0;
307 overflow-x: visible;
308 white-space: wrap;
309 }
310 }
311 p.ref {
312 display: block;
Akron08b82d62016-12-05 15:06:05 +0100313 color: $nearly-white;
Akron49bfdbf2016-11-22 21:47:33 +0100314 padding: 3pt 10pt 3pt 3pt;
315 padding-right: $right-match-distance;
316 margin: 0pt;
317 width: 100%;
318 bottom: 0;
319 z-index: 30;
320 > span.sigle {
321 font-size: 75%;
322 vertical-align: top;
323 color: $light-orange;
324 float: right;
325 }
326 }
327}
328
329
330
331/**
332 * Right aligned
333 */
334
335#search ol span.context-left {
336 display: inline-block;
337 width: 50.01%;
338 text-align: right;
339}
340
341#search ol.align-right {
342 text-align: right;
343 div.match-main span.context-right {
344 display: inline-block;
345 width: 49.915%;
346 text-align: left;
347 }
348}
349
Akron01231002017-06-29 20:47:58 +0200350// fix empty contexts
351#search ol span.context-left,
352#search ol span.context-right {
353 &:empty::after {
354 content: " ";
355 display: inline-block;
356 }
357}
Akron49bfdbf2016-11-22 21:47:33 +0100358
359/**
360 * Highlights
361 */
362mark {
363 background-color: inherit;
364 color: inherit;
365}
366
367mark > mark,
368em,
369.level-0 {
370 border-bottom-width: 2px;
371 border-bottom-style: solid;
Akron3bb91bc2016-12-02 16:43:17 +0100372 padding-bottom: 0px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100373 font-style: normal;
374}
375
376mark > mark > mark,
377em > em,
378.level-1 {
Akron3bb91bc2016-12-02 16:43:17 +0100379 padding-bottom: 3px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100380}
381
382mark > mark > mark > mark,
383em > em > em,
384.level-2 {
Akron3bb91bc2016-12-02 16:43:17 +0100385 padding-bottom: 6px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100386}
387
388
389#search > ol > li {
390 &:not(.active) mark > mark > mark > mark,
391 &:not(.active) em > em > em {
392 line-height: 180%;
393 }
394 &.active mark > mark > mark > mark,
395 &.active em > em > em {
396 line-height: 250%;
397 }
398}
399
400.class-1 { border-color: $kwic-highlight-1; }
401.class-2 { border-color: $kwic-highlight-2; }
402.class-3 { border-color: $kwic-highlight-3; }
403.class-4 { border-color: $kwic-highlight-4; }
Akron3bb91bc2016-12-02 16:43:17 +0100404
405
406/**
407 * Actions
408 */
409
Akronbfe912c2018-07-17 19:30:52 +0200410#search > ol > li .button-group.button-view {
411 display: none;
412}
413
414/*
Akron3bb91bc2016-12-02 16:43:17 +0100415ul.action {
Akronbfe912c2018-07-17 19:30:52 +0200416
Akron3bb91bc2016-12-02 16:43:17 +0100417 display: none;
418 // background-color: $dark-orange;
419 font-size: 12pt;
Akron08b82d62016-12-05 15:06:05 +0100420 color: $nearly-white;
Akron3bb91bc2016-12-02 16:43:17 +0100421 text: {
422 shadow: none;
423 indent: 0;
424 }
425 margin: 0;
426 padding: 0;
427 z-index: 5;
428
429 list-style: {
430 type: none;
431 position: inline;
432 }
433 &.right {
434 position: absolute;
Akron08b82d62016-12-05 15:06:05 +0100435 z-index: 4;
Akron3bb91bc2016-12-02 16:43:17 +0100436 width: $right-match-distance;
437 float: right;
438 text-align: center;
439 padding: 0pt 3pt;
440 height: 100%;
441 right: 0;
442 top: 0;
443 li {
444 cursor: pointer;
Akron08b82d62016-12-05 15:06:05 +0100445 color: $nearly-white;
Akron3bb91bc2016-12-02 16:43:17 +0100446 text-decoration: none;
447
448 > span {
449 @include blind;
450 }
451 &.close::after {
452 font-family: "FontAwesome";
453 content: $fa-close;
454 }
455 &.info::after {
456 font-family: "FontAwesome";
457 content: $fa-info;
458 }
459 }
460 }
461}
Akronbfe912c2018-07-17 19:30:52 +0200462*/