blob: 66f521f1aa0301d253bdf95f6f600c324fa0f46a [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 {
105 padding: 5pt 0 6pt 0;
Akron2b75b132018-08-13 09:47:47 +0200106 font-size: $font-size;
Akron49bfdbf2016-11-22 21:47:33 +0100107 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
Akron2b75b132018-08-13 09:47:47 +0200198 /*
Akron04905352018-01-24 02:06:32 +0100199 > span.meta {
200 cursor: pointer;
Akron8b592d42018-01-26 18:33:06 +0100201 @include choose-item;
202 margin: $border-size $border-size 0 $border-size !important;
203 text-align: center;
Akron04905352018-01-24 02:06:32 +0100204 text-decoration: none;
205 padding: 0pt 3pt;
Akron8b592d42018-01-26 18:33:06 +0100206 border: {
207 width: $border-size;
208 style: solid;
209 radius: $standard-border-radius;
210 }
211 &:hover {
212 cursor:pointer;
213 @include choose-hover;
214 }
Akron04905352018-01-24 02:06:32 +0100215
Akron2b75b132018-08-13 09:47:47 +0200216 // color: $nearly-white;
Akron04905352018-01-24 02:06:32 +0100217 &::after {
Akron2b75b132018-08-13 09:47:47 +0200218 // font-size: 12pt;
219 // font-family: "FontAwesome";
220 // content: $fa-metadata;
Akron8b592d42018-01-26 18:33:06 +0100221 content: "+Meta";
Akron04905352018-01-24 02:06:32 +0100222 }
223
224 > span {
225 @include blind;
226 }
227 }
Akron2b75b132018-08-13 09:47:47 +0200228 */
Akron49bfdbf2016-11-22 21:47:33 +0100229}
230
Akron8b592d42018-01-26 18:33:06 +0100231
Akron49bfdbf2016-11-22 21:47:33 +0100232/**
233 * Active
234 */
Akron2a4e9af2017-12-22 15:45:22 +0100235body.no-js #search > ol > li:active,
236#search > ol > li.active,
237#search > ol > li:target {
238 background-color: $dark-orange;
239 display: block;
240 text-align: left;
241 position: relative;
242 border-width: 2px;
243 white-space: wrap;
244 height: auto;
245 width: auto;
Akron3bb91bc2016-12-02 16:43:17 +0100246
Akron2a4e9af2017-12-22 15:45:22 +0100247 div.match-main > div.match-wrap {
248 cursor: default;
Akron49bfdbf2016-11-22 21:47:33 +0100249 }
Akron2b75b132018-08-13 09:47:47 +0200250 .snippet span {
251 display: inline !important;
Akron3bb91bc2016-12-02 16:43:17 +0100252 }
Akronbfe912c2018-07-17 19:30:52 +0200253 .button-group.button-view {
Akron3bb91bc2016-12-02 16:43:17 +0100254 display: block;
255 }
Akron49bfdbf2016-11-22 21:47:33 +0100256 div.match-wrap {
257 min-height: 20pt;
258 div.snippet {
259 background-color: $light-orange;
260 > * {
261 background-color: transparent;
262 }
263 div.flag {
264 display: none;
265 }
266 padding: 2pt 0 5pt 5pt;
267 margin: {
268 top: 0;
269 right: $right-match-distance; // 3em;
270 bottom: 0;
271 left: 0; // 5pt margin-top
272 }
273 > span {
Akron08b82d62016-12-05 15:06:05 +0100274 // color: black;
Akron49bfdbf2016-11-22 21:47:33 +0100275 line-height: 1.4em;
276 width: auto;
277 &.context-left {
278 margin-left: 0;
279 display: inline;
280 overflow: visible;
281 text-align: left;
282 width: auto;
283 }
284 }
285 }
286 }
Akron49bfdbf2016-11-22 21:47:33 +0100287
Akron49bfdbf2016-11-22 21:47:33 +0100288 overflow: hidden;
Akron8b592d42018-01-26 18:33:06 +0100289
Akron49bfdbf2016-11-22 21:47:33 +0100290 div.meta {
Akron97d42802016-11-26 22:45:46 +0100291 display: none;
292 // visibility: hidden;
Akron49bfdbf2016-11-22 21:47:33 +0100293 }
294 div.match-main {
Akron3bb91bc2016-12-02 16:43:17 +0100295 width: 100%;
Akron97d42802016-11-26 22:45:46 +0100296 display: block;
Akron49bfdbf2016-11-22 21:47:33 +0100297 div.match-wrap {
Akron3bb91bc2016-12-02 16:43:17 +0100298 background-color: $dark-orange;
299 width: 100%;
Akron49bfdbf2016-11-22 21:47:33 +0100300 margin-left: 0;
301 overflow-x: visible;
302 white-space: wrap;
303 }
304 }
305 p.ref {
306 display: block;
Akron08b82d62016-12-05 15:06:05 +0100307 color: $nearly-white;
Akron49bfdbf2016-11-22 21:47:33 +0100308 padding: 3pt 10pt 3pt 3pt;
309 padding-right: $right-match-distance;
310 margin: 0pt;
311 width: 100%;
312 bottom: 0;
313 z-index: 30;
314 > span.sigle {
315 font-size: 75%;
316 vertical-align: top;
317 color: $light-orange;
318 float: right;
319 }
320 }
321}
322
323
324
325/**
326 * Right aligned
327 */
Akron49bfdbf2016-11-22 21:47:33 +0100328#search ol span.context-left {
329 display: inline-block;
330 width: 50.01%;
331 text-align: right;
332}
333
334#search ol.align-right {
335 text-align: right;
Akron2b75b132018-08-13 09:47:47 +0200336
Akron49bfdbf2016-11-22 21:47:33 +0100337 div.match-main span.context-right {
338 display: inline-block;
339 width: 49.915%;
340 text-align: left;
341 }
342}
343
Akron01231002017-06-29 20:47:58 +0200344// fix empty contexts
345#search ol span.context-left,
346#search ol span.context-right {
347 &:empty::after {
348 content: " ";
349 display: inline-block;
350 }
351}
Akron49bfdbf2016-11-22 21:47:33 +0100352
353/**
354 * Highlights
355 */
356mark {
357 background-color: inherit;
358 color: inherit;
359}
360
361mark > mark,
362em,
363.level-0 {
364 border-bottom-width: 2px;
365 border-bottom-style: solid;
Akron3bb91bc2016-12-02 16:43:17 +0100366 padding-bottom: 0px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100367 font-style: normal;
368}
369
370mark > mark > mark,
371em > em,
372.level-1 {
Akron3bb91bc2016-12-02 16:43:17 +0100373 padding-bottom: 3px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100374}
375
376mark > mark > mark > mark,
377em > em > em,
378.level-2 {
Akron3bb91bc2016-12-02 16:43:17 +0100379 padding-bottom: 6px !important;
Akron49bfdbf2016-11-22 21:47:33 +0100380}
381
382
383#search > ol > li {
384 &:not(.active) mark > mark > mark > mark,
385 &:not(.active) em > em > em {
386 line-height: 180%;
387 }
388 &.active mark > mark > mark > mark,
389 &.active em > em > em {
390 line-height: 250%;
391 }
392}
393
394.class-1 { border-color: $kwic-highlight-1; }
395.class-2 { border-color: $kwic-highlight-2; }
396.class-3 { border-color: $kwic-highlight-3; }
397.class-4 { border-color: $kwic-highlight-4; }
Akron3bb91bc2016-12-02 16:43:17 +0100398
399
400/**
401 * Actions
402 */
Akronbfe912c2018-07-17 19:30:52 +0200403#search > ol > li .button-group.button-view {
404 display: none;
405}