cca6e4a5341d0290d53a46b6eec6b3391e0d7116
[wolnelektury.git] / apps / wolnelektury_core / static / scss / main / book_box.scss
1 @mixin inner-box {
2     display: block;
3     color: black;
4     @include size(margin, 1px);
5     @include size(padding, 8px 10px);
6     @include white-box;
7 }
8
9 .book-mini-box img.cover {
10     @include size(height, 193px);
11     @include size(width, 139px);
12 }
13
14
15 .cover-area {
16     float: left;
17     @include size(margin-right, 15px);
18     @include size(margin-bottom, 5px);
19
20     @include min-screen($S_BOOK_SHORT_FULL) {
21         position: absolute;
22         top: 0;
23         left: 0;
24         margin-right: 0;
25     }
26
27     img.cover {
28         @include size(height, 193px / 2);
29         @include size(width, 139px / 2);
30
31         @include min-screen($S_BOOK_SHORT_MEDIUM) {
32             @include size(height, 193px);
33             @include size(width, 139px);
34         }
35     }
36 }
37
38 .book-mini-box {
39     @include size(width, 161.5px);
40     display: inline-block;
41     vertical-align: top;
42
43     .book-mini-box-inner {
44         @include inner-box;
45         @include size(height, 271px);
46         @include size(margin, 1px);
47         overflow: hidden;
48         a {
49             display: block;
50         }
51     }
52     img.cover {
53         @include size(margin-bottom, 18px);
54     }
55     .language {
56         color: #aaa;
57         float: right;
58         @include mono;
59         @include size(font-size, 10px);
60         text-transform: uppercase;
61         position: relative;
62         @include size(top, -20px);
63     }
64     .desc {
65         margin-left: 0;
66     }
67     .author {
68         @include size(font-size, 11px);
69         @include mono;
70         color: #6d7877;
71         display: block;
72         overflow: hidden;
73         text-overflow: ellipsis;
74         white-space: nowrap;
75     }
76     .title {
77         @include size(font-size, 14px);
78         color: #242424;
79     }
80 }
81
82
83
84 .work-list {
85     margin: 0;
86     padding: 0;
87     list-style: none;
88
89     .Book-item {
90         @include min-screen($S_BOOK_SHORT_FULL) {
91             display: inline-block;
92         }
93         vertical-align: top;
94     }
95 }
96
97
98 .book-box {
99     margin: 0;
100     vertical-align: top;
101
102     /* */
103     a {
104         color: #0D7E85;
105     }
106
107     @include min-screen($S_BOOK_SHORT_FULL) {
108         @include size(width, $W_BOOK_SHORT_FULL);
109     }
110
111     .book-box-inner {
112         position: relative;
113         @include inner-box;
114         @include size(min-height, 197.5px);
115     }
116 }
117
118
119 .book-wide-box {
120     margin: 0;
121     vertical-align: top;
122
123     @media screen and (min-width: 62.5em) {
124         @include size(width, 975px);
125     }
126
127     .book-box-inner {
128         position: relative;
129         @include size(min-height, 244px);
130         @include inner-box;
131         @include size(margin-left, 0);
132         @include size(margin-right, 0);
133
134         .book-left-column { /* FIXME */
135             @media screen and (min-width: 62.5em) {
136                 float: left;
137                 @include size(width, 536px);
138             }
139         }
140
141         .license-icon {
142             display: block;
143             @include size(margin-top, 5px);
144         }
145
146         .book-box-head,
147         .tags,
148         .book-box-tools {
149             @media screen and (min-width: 62.5em) {
150                 @include size(width, 382px);
151             }
152         }
153
154         #theme-list-wrapper {
155             @include min-screen($S_BOOK_SHORT_MEDIUM) {
156                 @include size(margin-left, 154px);
157                 @include size(width, 300px);
158             }
159             margin-bottom: 0;
160
161             p {
162                 @include size(margin-top, 10px);
163                 @include size(margin-bottom, 10px);
164             }
165         }
166
167         .right-column {
168             @include size(margin-top, 16px);
169             // Eat the padding
170             @include size(margin-left, -10px);
171             @include size(margin-right, -10px);
172             max-width: none;
173
174             @media screen and (min-width: 62.5em) {
175                 @include size(width, 415px);
176                 // Eat the padding
177                 @include size(margin-top, -8px);
178             }
179
180             .other-tools,
181             .other-download {
182                 @include size(font-size, 11px);
183                 clear: left;
184                 @include size(margin-top, 25px);
185                 line-height: 1.75em;
186                 @include size(margin-left, 15px);
187
188                 h2 {
189                     margin: 0;
190                     @include size(font-size, 11px);
191                     @include mono;
192                 }
193
194                 @include min-screen($S_BOOK_SHORT_FULL) {
195                     float: left;
196                     clear: none;
197                     @include size(width, 145px);
198                     @include size(margin-top, 50px);
199                     @include size(margin-right, 0);
200                     @include size(margin-bottom, 0);
201                     @include size(margin-left, 5px);
202                 }
203
204                 @include min-screen(1000px) {
205                     @include size(margin-top, 50px);
206                     line-height: 1.2em;
207                 }
208             }
209             .other-download {
210                 @include min-screen($S_BOOK_SHORT_FULL) {
211                     @include size(margin-left, 15px);
212                     @include size(width, 220px);
213                 }
214             }
215         }
216     }
217 }
218
219 /* FIXME: RWD */
220 .picture.book-wide-box .right-column {
221     float: none;
222     @include size(width, 415px);
223     top: 0;
224     @include size(margin-left, 550px);
225     margin-top: 0em;
226 }
227
228
229 .book-box-body {
230     @include size(margin-bottom, 10px);
231     @include min-screen($S_BOOK_SHORT_FULL) {
232         margin-bottom: 0;
233         @include size(height, 170px);
234     }
235     position: relative;
236
237     .book-box-head,
238     .tags,
239     .book-box-tools {
240         @include min-screen($S_BOOK_SHORT_FULL) {
241             margin-left: 154px;
242         }
243     }
244
245     .book-box-head {
246         @include size(padding-top, 14px);
247         @include size(margin-bottom, 10px);
248
249         @include min-screen($S_BOOK_SHORT_FULL) {
250             @include size(min-height, 70px);
251         }
252
253         a {
254             color: black;
255         }
256         .author {
257             @include size(font-size, 11px);
258             @include mono;
259             @include size(line-height, 13.2px);
260             @include size(max-height, 26.4px);
261             overflow: hidden;
262
263             @include min-screen($S_BOOK_SHORT_FULL) {
264                 @include size(max-width, 264px);
265             }
266         }
267         .title {
268             @include size(font-size, 24px);
269             line-height: 1.2em;
270             @include size(margin-top, 7.2px);
271             @include size(margin-bottom, 12px);
272
273             @include min-screen($S_BOOK_SHORT_FULL) {
274                 margin-bottom: 0;
275                 @include size(height, 57.6px);
276                 overflow: hidden;
277             }
278         }
279     }
280
281     .tags {
282         @include size(font-size, 11px);
283         line-height: 1.2em;
284
285         @include min-screen($S_BOOK_SHORT_FULL) {
286             clear: right;
287             @include size(max-height, 57.6px);
288             overflow: hidden;
289         }
290
291         .category {
292             display: block;
293             @include size(margin-top, 6px);
294             @include size(margin-bottom, 6px);
295
296             @include min-screen($S_BOOK_SHORT_FULL) {
297                 display: inline;
298             }
299
300             .mono {
301                 @include mono;
302             }
303
304             .book-box-tag {
305                 @include size(margin-left, 4.4px);
306                 @include size(margin-right, 5.5px);
307             }
308         }
309     }
310
311 }
312
313
314
315 .book-box-tools {
316     @include size(font-size, 11px);
317     margin: 0;
318     padding: 0;
319     list-style: none;
320
321     clear: left;
322
323     @include min-screen($S_BOOK_SHORT_MEDIUM) {
324         clear: none;
325         @include size(margin-left, 139px + 15px);
326     }
327
328     li {
329         @include mono;
330         margin-top: 1em;
331
332         @include min-screen($S_BOOK_SHORT_FULL) {
333             display: inline-block;
334             margin-top: 0;
335         }
336     }
337
338     .book-box-read {
339         @include min-screen($S_BOOK_SHORT_FULL) {
340             @include size(width, 126.5px);
341         }
342
343         a {
344             @include mono;
345         }
346
347         a:before {
348             content: url("/static/img/read.png");
349             @include size(font-size, 25px);
350             @include size(margin-right, 3.71px);
351             vertical-align: middle;
352             font-weight: normal;
353         }
354     }
355
356     .book-box-download {
357         position: relative;
358
359         @include min-screen($S_BOOK_SHORT_FULL) {
360             @include size(width, 93.5px);
361         }
362
363         a {
364             position: relative;
365             z-index: 101;
366
367             @mixin downarrow {
368                 color: #0D7E85;
369
370                 &:before {
371                     content: url("/static/img/download.png");
372                     @include size(font-size, 25px);
373                     @include size(margin-right, 3.71px);
374                     vertical-align: middle;
375                     font-weight: normal;
376                     display: inline;
377                 }
378             }
379
380             &.downarrow {
381                 @include downarrow;
382                 &.hoverclick {
383                     color: black;
384                     &:before {
385                         display: none;
386                     }
387
388                     @include min-screen($S_BOOK_SHORT_FULL) {
389                         @include downarrow;
390                     }
391                 }
392             }
393         }
394
395         .book-box-formats {
396             @include size(padding-left, 19px);
397
398             @include min-screen($S_BOOK_SHORT_FULL) {
399                 display: none;
400                 position: absolute;
401
402                 @include size(width, 180px);
403                 @include size(padding-top, 38px);
404                 @include size(padding-bottom, 9px);
405                 @include size(padding-left, 19px);
406                 @include size(padding-right, 19px);
407
408                 @include white-box;
409
410                 z-index: 100;
411
412                 @include size(top, -16px);
413                 @include size(left, -19px);
414             }
415
416             span {
417                 display: block;
418                 @include size(margin-top, 16px);
419
420                 a {
421                     &:before {
422                         content: url("/static/img/download.png");
423                         @include size(font-size, 25px);
424                         @include size(margin-right, 3.71px);
425                         vertical-align: middle;
426                         font-weight: normal;
427                     }
428                 }
429
430                 @include min-screen($S_BOOK_SHORT_FULL) {
431                     @include size(margin-top, 0);
432
433                     &:first-child {
434                         @include size(margin-top, 16px);
435                     }
436                     a:before {
437                         display:none;
438                     }
439                 }
440             }
441         }
442
443         &:hover .book-box-formats,
444         &.hover .book-box-formats {
445             display: block;
446         }
447     }
448
449     .book-box-audiobook {
450         @include min-screen($S_BOOK_SHORT_FULL) {
451             @include size(width, 77px);
452         }
453
454         a:before {
455             content: url("/static/img/listen.png");
456             @include size(font-size, 25px);
457             @include size(margin-right, 3.71px);
458             vertical-align: middle;
459             font-weight: normal;
460         }
461
462     }
463 }
464
465
466
467
468 .star {
469     @include size(font-size, 22.5px);
470     @include size(margin-right, 11.25px);
471     position: absolute;
472     right: 0;
473
474     button::-moz-focus-inner {
475         padding: 0;
476         border: 0
477     }
478     .if-unlike button {
479         font-size: 1em;
480         font-family: inherit;
481         border: 0;
482         background: none;
483         margin: 0;
484         padding: 0;
485         color: #757575;
486     }
487     .if-like a {
488         display:block;
489         text-align:right;
490         padding: 0;
491     }
492 }
493 .like .if-unlike {
494     display: none;
495 }
496 .unlike .if-like {
497     display: none;
498 }
499
500
501 #book-detail .see-also {
502     h1 {
503         @include size(height, 32px);
504         margin: 0;
505         @include size(padding-top, 19px);
506         @include size(padding-left, 10px);
507
508         @include size(font-size, 11px);
509         @include mono;
510         font-weight: normal;
511
512         @media screen and (min-width: 33em) {
513             @include size(padding-left, 19px);
514         }
515     }
516 }