blob: b99057d96dd9e94abf831713d746292202f0d09c [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 }
120}
121
122
123
124#search div.matchinfo {
125 display: none;
126}
127
Akron3bb91bc2016-12-02 16:43:17 +0100128#search li.active div.matchinfo {
129 display: block;
130}
131
Akron49bfdbf2016-11-22 21:47:33 +0100132#search div.match-main {
133 position: relative;
134 z-index: 4;
135 > div.match-wrap {
136 margin-left: -49999.5%;
137 width: 99999%;
138 overflow-x: hidden;
139 overflow-y: visible;
140 position: relative;
141 box-sizing: border-box;
142 }
143}
144
145div.snippet.startMore:before,
146div.snippet.endMore:after {
147 content: "…";
148 padding-left: 2pt;
149 padding-right: 2pt;
150}
151
152/**
153 * flag
154 */
155div.snippet div.flag {
156 position: absolute;
157 height: 100%;
Akron3bb91bc2016-12-02 16:43:17 +0100158 top: 0;
159 // margin-left: -49999.5%;
160 // margin-left: 50%;
Akron49bfdbf2016-11-22 21:47:33 +0100161 margin-left: 50%;
162 width: 11px;
163 background-color: $dark-orange;
164 border-right-color: $nearly-white;
165 border-right: 1px solid $darkest-orange;
166}
167
168/**
169 * References
170 */
Akron8b592d42018-01-26 18:33:06 +0100171
Akron49bfdbf2016-11-22 21:47:33 +0100172#search > ol > li p.ref {
173 display: none;
Akron04905352018-01-24 02:06:32 +0100174
Akron8b592d42018-01-26 18:33:06 +0100175 // TEMP! Remove
Akron04905352018-01-24 02:06:32 +0100176 > span.meta {
177 cursor: pointer;
Akron8b592d42018-01-26 18:33:06 +0100178 @include choose-item;
179 margin: $border-size $border-size 0 $border-size !important;
180 text-align: center;
Akron04905352018-01-24 02:06:32 +0100181 text-decoration: none;
182 padding: 0pt 3pt;
Akron8b592d42018-01-26 18:33:06 +0100183 border: {
184 width: $border-size;
185 style: solid;
186 radius: $standard-border-radius;
187 }
188 &:hover {
189 cursor:pointer;
190 @include choose-hover;
191 }
Akron04905352018-01-24 02:06:32 +0100192
Akron8b592d42018-01-26 18:33:06 +0100193 /*
194 color: $nearly-white;
195 */
Akron04905352018-01-24 02:06:32 +0100196 &::after {
Akron8b592d42018-01-26 18:33:06 +0100197 /*
Akron04905352018-01-24 02:06:32 +0100198 font-size: 12pt;
Akron8b592d42018-01-26 18:33:06 +0100199font-family: "FontAwesome";
Akron04905352018-01-24 02:06:32 +0100200 content: $fa-metadata;
Akron8b592d42018-01-26 18:33:06 +0100201 */
202 content: "+Meta";
Akron04905352018-01-24 02:06:32 +0100203 }
204
205 > span {
206 @include blind;
207 }
208 }
Akron49bfdbf2016-11-22 21:47:33 +0100209}
210
Akron8b592d42018-01-26 18:33:06 +0100211div.action.bottom {
212 display: inline-block;
213 margin-right: .5em;
214 > span {
215 position: relative;
216 }
217}
218
Akron49bfdbf2016-11-22 21:47:33 +0100219/**
220 * Active
221 */
Akron2a4e9af2017-12-22 15:45:22 +0100222body.no-js #search > ol > li:active,
223#search > ol > li.active,
224#search > ol > li:target {
225 background-color: $dark-orange;
226 display: block;
227 text-align: left;
228 position: relative;
229 border-width: 2px;
230 white-space: wrap;
231 height: auto;
232 width: auto;
Akron3bb91bc2016-12-02 16:43:17 +0100233
Akron2a4e9af2017-12-22 15:45:22 +0100234 div.match-main > div.match-wrap {
235 cursor: default;
Akron49bfdbf2016-11-22 21:47:33 +0100236 }
Akron3bb91bc2016-12-02 16:43:17 +0100237 span {
Akronbd342982018-01-25 18:01:46 +0100238 display: inline; // !important;
Akron3bb91bc2016-12-02 16:43:17 +0100239 }
240 ul.action {
241 display: block;
242 }
Akron49bfdbf2016-11-22 21:47:33 +0100243 div.match-wrap {
244 min-height: 20pt;
245 div.snippet {
246 background-color: $light-orange;
247 > * {
248 background-color: transparent;
249 }
250 div.flag {
251 display: none;
252 }
253 padding: 2pt 0 5pt 5pt;
254 margin: {
255 top: 0;
256 right: $right-match-distance; // 3em;
257 bottom: 0;
258 left: 0; // 5pt margin-top
259 }
260 > span {
Akron08b82d62016-12-05 15:06:05 +0100261 // color: black;
Akron49bfdbf2016-11-22 21:47:33 +0100262 line-height: 1.4em;
263 width: auto;
264 &.context-left {
265 margin-left: 0;
266 display: inline;
267 overflow: visible;
268 text-align: left;
269 width: auto;
270 }
271 }
272 }
273 }
Akron49bfdbf2016-11-22 21:47:33 +0100274
Akron49bfdbf2016-11-22 21:47:33 +0100275 overflow: hidden;
Akron8b592d42018-01-26 18:33:06 +0100276
Akron49bfdbf2016-11-22 21:47:33 +0100277 div.meta {
Akron97d42802016-11-26 22:45:46 +0100278 display: none;
279 // visibility: hidden;
Akron49bfdbf2016-11-22 21:47:33 +0100280 }
281 div.match-main {
Akron3bb91bc2016-12-02 16:43:17 +0100282 width: 100%;
Akron97d42802016-11-26 22:45:46 +0100283 display: block;
Akron49bfdbf2016-11-22 21:47:33 +0100284 div.match-wrap {
Akron3bb91bc2016-12-02 16:43:17 +0100285 background-color: $dark-orange;
286 width: 100%;
Akron49bfdbf2016-11-22 21:47:33 +0100287 margin-left: 0;
288 overflow-x: visible;
289 white-space: wrap;
290 }
291 }
292 p.ref {
293 display: block;
Akron08b82d62016-12-05 15:06:05 +0100294 color: $nearly-white;
Akron49bfdbf2016-11-22 21:47:33 +0100295 padding: 3pt 10pt 3pt 3pt;
296 padding-right: $right-match-distance;
297 margin: 0pt;
298 width: 100%;
299 bottom: 0;
300 z-index: 30;
301 > span.sigle {
302 font-size: 75%;
303 vertical-align: top;
304 color: $light-orange;
305 float: right;
306 }
307 }
308}
309
310
311
312/**
313 * Right aligned
314 */
315
316#search ol span.context-left {
317 display: inline-block;
318 width: 50.01%;
319 text-align: right;
320}
321
322#search ol.align-right {
323 text-align: right;
324 div.match-main span.context-right {
325 display: inline-block;
326 width: 49.915%;
327 text-align: left;
328 }
329}
330
Akron01231002017-06-29 20:47:58 +0200331// fix empty contexts
332#search ol span.context-left,
333#search ol span.context-right {
334 &:empty::after {
335 content: " ";
336 display: inline-block;
337 }
338}
Akron49bfdbf2016-11-22 21:47:33 +0100339
340/**
341 * Highlights
342 */
343mark {
344 background-color: inherit;
345 color: inherit;
346}
347
348mark > mark,
349em,
350.level-0 {
351 border-bottom-width: 2px;
352 border-bottom-style: solid;
Akron3bb91bc2016-12-02 16:43:17 +0100353 padding-bottom: 0px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100354 font-style: normal;
355}
356
357mark > mark > mark,
358em > em,
359.level-1 {
Akron3bb91bc2016-12-02 16:43:17 +0100360 padding-bottom: 3px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100361}
362
363mark > mark > mark > mark,
364em > em > em,
365.level-2 {
Akron3bb91bc2016-12-02 16:43:17 +0100366 padding-bottom: 6px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100367}
368
369
370#search > ol > li {
371 &:not(.active) mark > mark > mark > mark,
372 &:not(.active) em > em > em {
373 line-height: 180%;
374 }
375 &.active mark > mark > mark > mark,
376 &.active em > em > em {
377 line-height: 250%;
378 }
379}
380
381.class-1 { border-color: $kwic-highlight-1; }
382.class-2 { border-color: $kwic-highlight-2; }
383.class-3 { border-color: $kwic-highlight-3; }
384.class-4 { border-color: $kwic-highlight-4; }
Akron3bb91bc2016-12-02 16:43:17 +0100385
386
387/**
388 * Actions
389 */
390
391ul.action {
392 display: none;
393 // background-color: $dark-orange;
394 font-size: 12pt;
Akron08b82d62016-12-05 15:06:05 +0100395 color: $nearly-white;
Akron3bb91bc2016-12-02 16:43:17 +0100396 text: {
397 shadow: none;
398 indent: 0;
399 }
400 margin: 0;
401 padding: 0;
402 z-index: 5;
403
404 list-style: {
405 type: none;
406 position: inline;
407 }
408 &.right {
409 position: absolute;
Akron08b82d62016-12-05 15:06:05 +0100410 z-index: 4;
Akron3bb91bc2016-12-02 16:43:17 +0100411 width: $right-match-distance;
412 float: right;
413 text-align: center;
414 padding: 0pt 3pt;
415 height: 100%;
416 right: 0;
417 top: 0;
418 li {
419 cursor: pointer;
Akron08b82d62016-12-05 15:06:05 +0100420 color: $nearly-white;
Akron3bb91bc2016-12-02 16:43:17 +0100421 text-decoration: none;
422
423 > span {
424 @include blind;
425 }
426 &.close::after {
427 font-family: "FontAwesome";
428 content: $fa-close;
429 }
430 &.info::after {
431 font-family: "FontAwesome";
432 content: $fa-info;
433 }
434 }
435 }
436}
437