im_reader 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +11 -0
  3. data/Gemfile +9 -0
  4. data/Gemfile.lock +44 -0
  5. data/LICENSE.txt +21 -0
  6. data/README.md +110 -0
  7. data/Rakefile +8 -0
  8. data/app/assets/fonts/im_reader/icons.ttf +0 -0
  9. data/app/assets/fonts/im_reader/icons.woff +0 -0
  10. data/app/assets/fonts/im_reader/icons.woff2 +0 -0
  11. data/app/assets/images/im_reader/logo_colore.svg +26 -0
  12. data/app/assets/javascripts/im_reader/epub.min.js +1 -0
  13. data/app/assets/javascripts/im_reader/jszip.min.js +13 -0
  14. data/app/assets/javascripts/im_reader/reader.js +144 -0
  15. data/app/assets/javascripts/im_reader/semantic/progress.js +793 -0
  16. data/app/assets/javascripts/im_reader/semantic/sidebar.js +1022 -0
  17. data/app/assets/javascripts/im_reader/semantic-ui.js +2 -0
  18. data/app/assets/stylesheets/im_reader/reader.scss +127 -0
  19. data/app/assets/stylesheets/im_reader/semantic/button.scss +3172 -0
  20. data/app/assets/stylesheets/im_reader/semantic/colors.scss +15 -0
  21. data/app/assets/stylesheets/im_reader/semantic/container.scss +154 -0
  22. data/app/assets/stylesheets/im_reader/semantic/grid.scss +2029 -0
  23. data/app/assets/stylesheets/im_reader/semantic/header.scss +719 -0
  24. data/app/assets/stylesheets/im_reader/semantic/icon.scss +2587 -0
  25. data/app/assets/stylesheets/im_reader/semantic/item.scss +482 -0
  26. data/app/assets/stylesheets/im_reader/semantic/menu.scss +2054 -0
  27. data/app/assets/stylesheets/im_reader/semantic/progress.scss +517 -0
  28. data/app/controllers/im_reader/application_controller.rb +8 -0
  29. data/app/controllers/im_reader/epub_reader_controller.rb +62 -0
  30. data/app/views/im_reader/epub_reader/show.html.erb +38 -0
  31. data/app/views/layouts/im_reader/epub_reader.html.erb +23 -0
  32. data/config/locales/de.yml +10 -0
  33. data/config/locales/en.yml +10 -0
  34. data/config/locales/es.yml +10 -0
  35. data/config/locales/fr.yml +10 -0
  36. data/config/locales/pt.yml +10 -0
  37. data/config/routes.rb +4 -0
  38. data/im_reader.gemspec +33 -0
  39. data/lib/im_reader/engine.rb +32 -0
  40. data/lib/im_reader/version.rb +5 -0
  41. data/lib/im_reader.rb +8 -0
  42. data/sig/im_reader.rbs +4 -0
  43. data/spec/im_reader_spec.rb +11 -0
  44. data/spec/spec_helper.rb +15 -0
  45. metadata +115 -0
@@ -0,0 +1,719 @@
1
+ /*!
2
+ * # Semantic UI 2.1.4 - Header
3
+ * http://github.com/semantic-org/semantic-ui/
4
+ *
5
+ *
6
+ * Copyright 2015 Contributors
7
+ * Released under the MIT license
8
+ * http://opensource.org/licenses/MIT
9
+ *
10
+ */
11
+
12
+
13
+ /*******************************
14
+ Header
15
+ *******************************/
16
+
17
+
18
+ /* Standard */
19
+ .ui.header {
20
+ border: none;
21
+ margin: calc(2rem - 0.14285em ) 0em 1rem;
22
+ padding: 0em 0em;
23
+ font-family: 'Lato', 'Helvetica Neue', Arial, Helvetica, sans-serif;
24
+ font-weight: bold;
25
+ line-height: 1.2857em;
26
+ text-transform: none;
27
+ color: rgba(0, 0, 0, 0.87);
28
+ }
29
+ .ui.header:first-child {
30
+ margin-top: -0.14285em;
31
+ }
32
+ .ui.header:last-child {
33
+ margin-bottom: 0em;
34
+ }
35
+
36
+ /*--------------
37
+ Sub Header
38
+ ---------------*/
39
+
40
+ .ui.header .sub.header {
41
+ font-weight: normal;
42
+ padding: 0em;
43
+ margin: 0em;
44
+ font-size: 1rem;
45
+ line-height: 1.2em;
46
+ color: rgba(0, 0, 0, 0.6);
47
+ }
48
+
49
+ /*--------------
50
+ Icon
51
+ ---------------*/
52
+
53
+ .ui.header > .icon {
54
+ display: table-cell;
55
+ opacity: 1;
56
+ font-size: 1.5em;
57
+ padding-top: 0.14285em;
58
+ vertical-align: middle;
59
+ }
60
+
61
+ /* With Text Node */
62
+ .ui.header .icon:only-child {
63
+ display: inline-block;
64
+ padding: 0em;
65
+ margin-right: 0.75rem;
66
+ }
67
+
68
+ /*-------------------
69
+ Image
70
+ --------------------*/
71
+
72
+ .ui.header > .image,
73
+ .ui.header > img {
74
+ display: inline-block;
75
+ margin-top: 0.14285em;
76
+ width: 2.5em;
77
+ height: auto;
78
+ vertical-align: middle;
79
+ }
80
+ .ui.header > .image:only-child,
81
+ .ui.header > img:only-child {
82
+ margin-right: 0.75rem;
83
+ }
84
+
85
+ /*--------------
86
+ Content
87
+ ---------------*/
88
+
89
+ .ui.header .content {
90
+ display: inline-block;
91
+ vertical-align: top;
92
+ }
93
+
94
+ /* After Image */
95
+ .ui.header > img + .content,
96
+ .ui.header > .image + .content {
97
+ padding-left: 0.75rem;
98
+ vertical-align: middle;
99
+ }
100
+
101
+ /* After Icon */
102
+ .ui.header > .icon + .content {
103
+ padding-left: 0.75rem;
104
+ display: table-cell;
105
+ vertical-align: middle;
106
+ }
107
+
108
+ /*--------------
109
+ Loose Coupling
110
+ ---------------*/
111
+
112
+ .ui.header .ui.label {
113
+ font-size: '';
114
+ margin-left: 0.5rem;
115
+ vertical-align: middle;
116
+ }
117
+
118
+ /* Positioning */
119
+ .ui.header + p {
120
+ margin-top: 0em;
121
+ }
122
+
123
+
124
+ /*******************************
125
+ Types
126
+ *******************************/
127
+
128
+
129
+ /*--------------
130
+ Page
131
+ ---------------*/
132
+
133
+ h1.ui.header {
134
+ font-size: 2rem;
135
+ }
136
+ h2.ui.header {
137
+ font-size: 1.714rem;
138
+ }
139
+ h3.ui.header {
140
+ font-size: 1.28rem;
141
+ }
142
+ h4.ui.header {
143
+ font-size: 1.071rem;
144
+ }
145
+ h5.ui.header {
146
+ font-size: 1rem;
147
+ }
148
+
149
+ /* Sub Header */
150
+ h1.ui.header .sub.header {
151
+ font-size: 1.14285714rem;
152
+ }
153
+ h2.ui.header .sub.header {
154
+ font-size: 1.14285714rem;
155
+ }
156
+ h3.ui.header .sub.header {
157
+ font-size: 1rem;
158
+ }
159
+ h4.ui.header .sub.header {
160
+ font-size: 1rem;
161
+ }
162
+ h5.ui.header .sub.header {
163
+ font-size: 0.92857143rem;
164
+ }
165
+
166
+ /*--------------
167
+ Content Heading
168
+ ---------------*/
169
+
170
+ .ui.huge.header {
171
+ min-height: 1em;
172
+ font-size: 2em;
173
+ }
174
+ .ui.large.header {
175
+ font-size: 1.714em;
176
+ }
177
+ .ui.medium.header {
178
+ font-size: 1.28em;
179
+ }
180
+ .ui.small.header {
181
+ font-size: 1.071em;
182
+ }
183
+ .ui.tiny.header {
184
+ font-size: 1em;
185
+ }
186
+
187
+ /* Sub Header */
188
+ .ui.huge.header .sub.header {
189
+ font-size: 1.14285714rem;
190
+ }
191
+ .ui.large.header .sub.header {
192
+ font-size: 1.14285714rem;
193
+ }
194
+ .ui.header .sub.header {
195
+ font-size: 1rem;
196
+ }
197
+ .ui.small.header .sub.header {
198
+ font-size: 1rem;
199
+ }
200
+ .ui.tiny.header .sub.header {
201
+ font-size: 0.92857143rem;
202
+ }
203
+
204
+ /*--------------
205
+ Sub Heading
206
+ ---------------*/
207
+
208
+ .ui.sub.header {
209
+ padding: 0em;
210
+ margin-bottom: 0.14285714rem;
211
+ font-weight: bold;
212
+ font-size: 0.85714286em;
213
+ text-transform: uppercase;
214
+ color: '';
215
+ }
216
+ .ui.small.sub.header {
217
+ font-size: 0.71428571em;
218
+ }
219
+ .ui.sub.header {
220
+ font-size: 0.85714286em;
221
+ }
222
+ .ui.large.sub.header {
223
+ font-size: 0.92857143em;
224
+ }
225
+ .ui.huge.sub.header {
226
+ font-size: 1em;
227
+ }
228
+
229
+ /*-------------------
230
+ Icon
231
+ --------------------*/
232
+
233
+ .ui.icon.header {
234
+ display: inline-block;
235
+ text-align: center;
236
+ margin: 2rem 0em 1rem;
237
+ }
238
+ .ui.icon.header:after {
239
+ content: '';
240
+ display: block;
241
+ height: 0px;
242
+ clear: both;
243
+ visibility: hidden;
244
+ }
245
+ .ui.icon.header:first-child {
246
+ margin-top: 0em;
247
+ }
248
+ .ui.icon.header .icon {
249
+ float: none;
250
+ display: block;
251
+ width: auto;
252
+ height: auto;
253
+ line-height: 1;
254
+ padding: 0em;
255
+ font-size: 3em;
256
+ margin: 0em auto 0.5rem;
257
+ opacity: 1;
258
+ }
259
+ .ui.icon.header .content {
260
+ display: block;
261
+ }
262
+ .ui.icon.header .circular.icon {
263
+ font-size: 2em;
264
+ }
265
+ .ui.icon.header .square.icon {
266
+ font-size: 2em;
267
+ }
268
+ .ui.block.icon.header .icon {
269
+ margin-bottom: 0em;
270
+ }
271
+ .ui.icon.header.aligned {
272
+ margin-left: auto;
273
+ margin-right: auto;
274
+ display: block;
275
+ }
276
+
277
+
278
+ /*******************************
279
+ States
280
+ *******************************/
281
+
282
+ .ui.disabled.header {
283
+ opacity: 0.45;
284
+ }
285
+
286
+
287
+ /*******************************
288
+ Variations
289
+ *******************************/
290
+
291
+
292
+ /*-------------------
293
+ Inverted
294
+ --------------------*/
295
+
296
+ .ui.inverted.header {
297
+ color: #ffffff;
298
+ }
299
+ .ui.inverted.header .sub.header {
300
+ color: rgba(255, 255, 255, 0.8);
301
+ }
302
+ .ui.inverted.attached.header {
303
+ background: #545454 -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.05));
304
+ background: #545454 linear-gradient(transparent, rgba(0, 0, 0, 0.05));
305
+ box-shadow: none;
306
+ border-color: transparent;
307
+ }
308
+ .ui.inverted.block.header {
309
+ background: #545454 -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.05));
310
+ background: #545454 linear-gradient(transparent, rgba(0, 0, 0, 0.05));
311
+ box-shadow: none;
312
+ }
313
+ .ui.inverted.block.header {
314
+ border-bottom: none;
315
+ }
316
+
317
+ /*-------------------
318
+ Colors
319
+ --------------------*/
320
+
321
+
322
+ /*--- Red ---*/
323
+
324
+ .ui.red.header {
325
+ color: #db2828 !important;
326
+ }
327
+ a.ui.red.header:hover {
328
+ color: #d01919 !important;
329
+ }
330
+ .ui.red.dividing.header {
331
+ border-bottom: 2px solid #db2828;
332
+ }
333
+
334
+ /* Inverted */
335
+ .ui.inverted.red.header {
336
+ color: #ff695e !important;
337
+ }
338
+ a.ui.inverted.red.header:hover {
339
+ color: #ff5144 !important;
340
+ }
341
+
342
+ /*--- Orange ---*/
343
+
344
+ .ui.orange.header {
345
+ color: #f2711c !important;
346
+ }
347
+ a.ui.orange.header:hover {
348
+ color: #f26202 !important;
349
+ }
350
+ .ui.orange.dividing.header {
351
+ border-bottom: 2px solid #f2711c;
352
+ }
353
+
354
+ /* Inverted */
355
+ .ui.inverted.orange.header {
356
+ color: #ff851b !important;
357
+ }
358
+ a.ui.inverted.orange.header:hover {
359
+ color: #ff7701 !important;
360
+ }
361
+
362
+ /*--- Olive ---*/
363
+
364
+ .ui.olive.header {
365
+ color: #b5cc18 !important;
366
+ }
367
+ a.ui.olive.header:hover {
368
+ color: #a7bd0d !important;
369
+ }
370
+ .ui.olive.dividing.header {
371
+ border-bottom: 2px solid #b5cc18;
372
+ }
373
+
374
+ /* Inverted */
375
+ .ui.inverted.olive.header {
376
+ color: #d9e778 !important;
377
+ }
378
+ a.ui.inverted.olive.header:hover {
379
+ color: #d8ea5c !important;
380
+ }
381
+
382
+ /*--- Yellow ---*/
383
+
384
+ .ui.yellow.header {
385
+ color: #fbbd08 !important;
386
+ }
387
+ a.ui.yellow.header:hover {
388
+ color: #eaae00 !important;
389
+ }
390
+ .ui.yellow.dividing.header {
391
+ border-bottom: 2px solid #fbbd08;
392
+ }
393
+
394
+ /* Inverted */
395
+ .ui.inverted.yellow.header {
396
+ color: #ffe21f !important;
397
+ }
398
+ a.ui.inverted.yellow.header:hover {
399
+ color: #ffdf05 !important;
400
+ }
401
+
402
+ /*--- Green ---*/
403
+
404
+ .ui.green.header {
405
+ color: #21ba45 !important;
406
+ }
407
+ a.ui.green.header:hover {
408
+ color: #16ab39 !important;
409
+ }
410
+ .ui.green.dividing.header {
411
+ border-bottom: 2px solid #21ba45;
412
+ }
413
+
414
+ /* Inverted */
415
+ .ui.inverted.green.header {
416
+ color: #2ecc40 !important;
417
+ }
418
+ a.ui.inverted.green.header:hover {
419
+ color: #22be34 !important;
420
+ }
421
+
422
+ /*--- Teal ---*/
423
+
424
+ .ui.teal.header {
425
+ color: #00b5ad !important;
426
+ }
427
+ a.ui.teal.header:hover {
428
+ color: #009c95 !important;
429
+ }
430
+ .ui.teal.dividing.header {
431
+ border-bottom: 2px solid #00b5ad;
432
+ }
433
+
434
+ /* Inverted */
435
+ .ui.inverted.teal.header {
436
+ color: #6dffff !important;
437
+ }
438
+ a.ui.inverted.teal.header:hover {
439
+ color: #54ffff !important;
440
+ }
441
+
442
+ /*--- Blue ---*/
443
+
444
+ .ui.blue.header {
445
+ color: #2185d0 !important;
446
+ }
447
+ a.ui.blue.header:hover {
448
+ color: #1678c2 !important;
449
+ }
450
+ .ui.blue.dividing.header {
451
+ border-bottom: 2px solid #2185d0;
452
+ }
453
+
454
+ /* Inverted */
455
+ .ui.inverted.blue.header {
456
+ color: #54c8ff !important;
457
+ }
458
+ a.ui.inverted.blue.header:hover {
459
+ color: #3ac0ff !important;
460
+ }
461
+
462
+ /*--- Violet ---*/
463
+
464
+ .ui.violet.header {
465
+ color: #6435c9 !important;
466
+ }
467
+ a.ui.violet.header:hover {
468
+ color: #5829bb !important;
469
+ }
470
+ .ui.violet.dividing.header {
471
+ border-bottom: 2px solid #6435c9;
472
+ }
473
+
474
+ /* Inverted */
475
+ .ui.inverted.violet.header {
476
+ color: #a291fb !important;
477
+ }
478
+ a.ui.inverted.violet.header:hover {
479
+ color: #8a73ff !important;
480
+ }
481
+
482
+ /*--- Purple ---*/
483
+
484
+ .ui.purple.header {
485
+ color: #a333c8 !important;
486
+ }
487
+ a.ui.purple.header:hover {
488
+ color: #9627ba !important;
489
+ }
490
+ .ui.purple.dividing.header {
491
+ border-bottom: 2px solid #a333c8;
492
+ }
493
+
494
+ /* Inverted */
495
+ .ui.inverted.purple.header {
496
+ color: #dc73ff !important;
497
+ }
498
+ a.ui.inverted.purple.header:hover {
499
+ color: #d65aff !important;
500
+ }
501
+
502
+ /*--- Pink ---*/
503
+
504
+ .ui.pink.header {
505
+ color: #e03997 !important;
506
+ }
507
+ a.ui.pink.header:hover {
508
+ color: #e61a8d !important;
509
+ }
510
+ .ui.pink.dividing.header {
511
+ border-bottom: 2px solid #e03997;
512
+ }
513
+
514
+ /* Inverted */
515
+ .ui.inverted.pink.header {
516
+ color: #ff8edf !important;
517
+ }
518
+ a.ui.inverted.pink.header:hover {
519
+ color: #ff74d8 !important;
520
+ }
521
+
522
+ /*--- Brown ---*/
523
+
524
+ .ui.brown.header {
525
+ color: #a5673f !important;
526
+ }
527
+ a.ui.brown.header:hover {
528
+ color: #975b33 !important;
529
+ }
530
+ .ui.brown.dividing.header {
531
+ border-bottom: 2px solid #a5673f;
532
+ }
533
+
534
+ /* Inverted */
535
+ .ui.inverted.brown.header {
536
+ color: #d67c1c !important;
537
+ }
538
+ a.ui.inverted.brown.header:hover {
539
+ color: #c86f11 !important;
540
+ }
541
+
542
+ /*--- Grey ---*/
543
+
544
+ .ui.grey.header {
545
+ color: #767676 !important;
546
+ }
547
+ a.ui.grey.header:hover {
548
+ color: #838383 !important;
549
+ }
550
+ .ui.grey.dividing.header {
551
+ border-bottom: 2px solid #767676;
552
+ }
553
+
554
+ /* Inverted */
555
+ .ui.inverted.grey.header {
556
+ color: #dcddde !important;
557
+ }
558
+ a.ui.inverted.grey.header:hover {
559
+ color: #cfd0d2 !important;
560
+ }
561
+
562
+ /*-------------------
563
+ Aligned
564
+ --------------------*/
565
+
566
+ .ui.left.aligned.header {
567
+ text-align: left;
568
+ }
569
+ .ui.right.aligned.header {
570
+ text-align: right;
571
+ }
572
+ .ui.centered.header,
573
+ .ui.center.aligned.header {
574
+ text-align: center;
575
+ }
576
+ .ui.justified.header {
577
+ text-align: justify;
578
+ }
579
+ .ui.justified.header:after {
580
+ display: inline-block;
581
+ content: '';
582
+ width: 100%;
583
+ }
584
+
585
+ /*-------------------
586
+ Floated
587
+ --------------------*/
588
+
589
+ .ui.floated.header,
590
+ .ui[class*="left floated"].header {
591
+ float: left;
592
+ margin-top: 0em;
593
+ margin-right: 0.5em;
594
+ }
595
+ .ui[class*="right floated"].header {
596
+ float: right;
597
+ margin-top: 0em;
598
+ margin-left: 0.5em;
599
+ }
600
+
601
+ /*-------------------
602
+ Fittted
603
+ --------------------*/
604
+
605
+ .ui.fitted.header {
606
+ padding: 0em;
607
+ }
608
+
609
+ /*-------------------
610
+ Dividing
611
+ --------------------*/
612
+
613
+ .ui.dividing.header {
614
+ padding-bottom: 0.21428571rem;
615
+ border-bottom: 1px solid rgba(34, 36, 38, 0.15);
616
+ }
617
+ .ui.dividing.header .sub.header {
618
+ padding-bottom: 0.21428571rem;
619
+ }
620
+ .ui.dividing.header .icon {
621
+ margin-bottom: 0em;
622
+ }
623
+ .ui.inverted.dividing.header {
624
+ border-bottom-color: rgba(255, 255, 255, 0.1);
625
+ }
626
+
627
+ /*-------------------
628
+ Block
629
+ --------------------*/
630
+
631
+ .ui.block.header {
632
+ background: #f3f4f5;
633
+ padding: 0.71428571rem 1rem;
634
+ box-shadow: none;
635
+ border: 1px solid #d4d4d5;
636
+ border-radius: 0.28571429rem;
637
+ }
638
+ .ui.tiny.block.header {
639
+ font-size: 0.85714286rem;
640
+ }
641
+ .ui.small.block.header {
642
+ font-size: 0.92857143rem;
643
+ }
644
+ .ui.block.header:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
645
+ font-size: 1rem;
646
+ }
647
+ .ui.large.block.header {
648
+ font-size: 1.14285714rem;
649
+ }
650
+ .ui.huge.block.header {
651
+ font-size: 1.42857143rem;
652
+ }
653
+
654
+ /*-------------------
655
+ Attached
656
+ --------------------*/
657
+
658
+ .ui.attached.header {
659
+ background: #ffffff;
660
+ padding: 0.71428571rem 1rem;
661
+ margin-left: -1px;
662
+ margin-right: -1px;
663
+ box-shadow: none;
664
+ border: 1px solid #d4d4d5;
665
+ }
666
+ .ui.attached.block.header {
667
+ background: #f3f4f5;
668
+ }
669
+ .ui.attached:not(.top):not(.bottom).header {
670
+ margin-top: 0em;
671
+ margin-bottom: 0em;
672
+ border-top: none;
673
+ border-radius: 0em;
674
+ }
675
+ .ui.top.attached.header {
676
+ margin-bottom: 0em;
677
+ border-radius: 0.28571429rem 0.28571429rem 0em 0em;
678
+ }
679
+ .ui.bottom.attached.header {
680
+ margin-top: 0em;
681
+ border-top: none;
682
+ border-radius: 0em 0em 0.28571429rem 0.28571429rem;
683
+ }
684
+
685
+ /* Attached Sizes */
686
+ .ui.tiny.attached.header {
687
+ font-size: 0.85714286em;
688
+ }
689
+ .ui.small.attached.header {
690
+ font-size: 0.92857143em;
691
+ }
692
+ .ui.attached.header:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
693
+ font-size: 1em;
694
+ }
695
+ .ui.large.attached.header {
696
+ font-size: 1.14285714em;
697
+ }
698
+ .ui.huge.attached.header {
699
+ font-size: 1.42857143em;
700
+ }
701
+
702
+ /*-------------------
703
+ Sizing
704
+ --------------------*/
705
+
706
+ .ui.header:not(h1):not(h2):not(h3):not(h4):not(h5):not(h6) {
707
+ font-size: 1.28em;
708
+ }
709
+
710
+
711
+ /*******************************
712
+ Theme Overrides
713
+ *******************************/
714
+
715
+
716
+
717
+ /*******************************
718
+ Site Overrides
719
+ *******************************/