pageflow-progress-navigation-bar 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. checksums.yaml +4 -4
  2. data/.scss-lint.yml +147 -0
  3. data/CHANGELOG.md +29 -0
  4. data/Gemfile +0 -6
  5. data/README.md +2 -2
  6. data/app/assets/javascript/pageflow/progress_navigation_bar.js +7 -1
  7. data/app/assets/javascript/pageflow/progress_navigation_bar/widget.js +97 -43
  8. data/app/assets/stylesheets/pageflow/{progress_navigation_bar.css.scss → progress_navigation_bar.scss} +33 -195
  9. data/app/assets/stylesheets/pageflow/progress_navigation_bar/animations2.scss +82 -0
  10. data/app/assets/stylesheets/pageflow/progress_navigation_bar/cross_dependant_styles.scss +37 -0
  11. data/app/assets/stylesheets/pageflow/progress_navigation_bar/horizontal.scss +234 -0
  12. data/app/assets/stylesheets/pageflow/progress_navigation_bar/mixins.scss +54 -0
  13. data/app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default.scss +273 -0
  14. data/app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/buttons.scss +22 -0
  15. data/app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/credits.scss +9 -0
  16. data/app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/icons/icon_font.scss +206 -0
  17. data/app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/icons/sprite.scss +152 -0
  18. data/app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/menu_boxes.scss +42 -0
  19. data/app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/share_box.scss +9 -0
  20. data/app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/typography.scss +90 -0
  21. data/app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default/widget_margin.scss +23 -0
  22. data/app/assets/stylesheets/pageflow/progress_navigation_bar/vertical.scss +97 -0
  23. data/app/views/pageflow/progress_navigation_bar/_widget.html.erb +7 -3
  24. data/app/views/pageflow/progress_navigation_bar/widget/_bar_top.html.erb +6 -22
  25. data/app/views/pageflow/progress_navigation_bar/widget/_overview_button.html.erb +8 -0
  26. data/app/views/pageflow/progress_navigation_bar/widget/_page.html.erb +1 -2
  27. data/config/locales/de.yml +4 -1
  28. data/config/locales/en.yml +4 -1
  29. data/lib/pageflow-progress-navigation-bar.rb +9 -1
  30. data/lib/pageflow/progress_navigation_bar/horizontal_widget_type.rb +17 -0
  31. data/lib/pageflow/progress_navigation_bar/version.rb +1 -1
  32. data/lib/pageflow/progress_navigation_bar/vertical_widget_type.rb +17 -0
  33. data/lib/pageflow/progress_navigation_bar/widget_type.rb +5 -4
  34. data/pageflow-progress-navigation-bar.gemspec +2 -2
  35. metadata +26 -10
  36. data/app/assets/stylesheets/pageflow/cross_dependant_styles.css.scss +0 -35
  37. data/app/assets/stylesheets/pageflow/progress_navigation_bar/themes/default.css.scss +0 -345
@@ -15,53 +15,12 @@ $nav-active-chapter: #6D772E;
15
15
 
16
16
  $progressbar-mobile-width: 14px;
17
17
 
18
- @import "cross_dependant_styles";
18
+ @import "./progress_navigation_bar/cross_dependant_styles";
19
+ @import "./progress_navigation_bar/mixins";
19
20
  @import "./progress_navigation_bar/animations";
20
-
21
- @mixin pageflow-progress-navigation-bar-small-height {
22
- @media screen and (max-height: 870px) {
23
- @content;
24
- }
25
- }
26
-
27
- @mixin pageflow-progress-mobile-variant {
28
- .has_mobile_platform & {
29
- @content;
30
- }
31
-
32
- @include phone {
33
- @content;
34
- }
35
- }
36
-
37
- @mixin pageflow-progress-navigation-bar-transparent-background {
38
- &:after {
39
- height: 100%;
40
- background-image: none;
41
- width: 100%;
42
- top: 0;
43
- position: absolute;
44
- z-index: -1;
45
- content: "";
46
- }
47
- }
48
-
49
- @mixin pageflow-progress-navigation-bar-box($margin-top, $right) {
50
- visibility: hidden;
51
- margin-top: $margin-top;
52
- background-color: $bg-color;
53
- border: 2px solid $nav-color;
54
- position: absolute;
55
- right: $right;
56
- padding: 15px;
57
- height: auto;
58
- left: initial;
59
-
60
- hr {
61
- border:0;
62
- border-bottom: 1px solid $nav-color;
63
- }
64
- }
21
+ @import "./progress_navigation_bar/animations2";
22
+ @import "./progress_navigation_bar/horizontal";
23
+ @import "./progress_navigation_bar/vertical";
65
24
 
66
25
  .progress_navigation_bar {
67
26
  @include unselectable;
@@ -82,31 +41,21 @@ $progressbar-mobile-width: 14px;
82
41
  .navi_hint {
83
42
  text-align: center;
84
43
  color: $nav-hint-color;
85
- font-family: "SourceSansPro";
86
- font-size: 11px;
87
44
  top: 50%;
88
45
  position: absolute;
89
46
  width: 86%;
90
47
  margin-top: 16px;
91
- padding: 0px 7%;
92
- @include pageflow-progress-navigation-bar-small-height {
93
- display: none !important;
94
- }
48
+ padding: 0 7%;
95
49
  }
96
50
 
97
51
  @include pageflow-progress-mobile-variant {
52
+ opacity: 0;
98
53
  width: $progressbar-mobile-width;
99
54
  @include transition(opacity 0.4s ease 0.5s);
100
- opacity: 0;
101
55
  @include transform(translateZ(0));
102
56
  -webkit-backface-visibility: hidden;
103
57
  }
104
58
 
105
- &.show_on_mobile {
106
- opacity: 1;
107
- @include transition(opacity 0.4s ease);
108
- }
109
-
110
59
  position: absolute;
111
60
  right: 0;
112
61
  top: 0;
@@ -120,7 +69,6 @@ $progressbar-mobile-width: 14px;
120
69
  background-image: image-url('pageflow/progress_navigation_bar/indicator.png');
121
70
  position: absolute;
122
71
  right: 60px;
123
- top: 4.05%;
124
72
  @include transition(opacity 0.3s linear);
125
73
  opacity: 1;
126
74
  top: 35px;
@@ -134,6 +82,11 @@ $progressbar-mobile-width: 14px;
134
82
  display: none;
135
83
  }
136
84
  }
85
+
86
+ .header_button {
87
+ display: none;
88
+ }
89
+
137
90
  .navigation_button_area {
138
91
  width: 0;
139
92
  right: 30px;
@@ -147,10 +100,9 @@ $progressbar-mobile-width: 14px;
147
100
  overflow: visible;
148
101
  }
149
102
 
150
-
151
103
  .navigation_bar_buttons {
152
104
  @include transition(opacity 0.15s ease, right 0.3s ease);
153
- left:0;
105
+ left: 0;
154
106
  opacity: 0;
155
107
  width: 87px;
156
108
  position: absolute;
@@ -162,7 +114,7 @@ $progressbar-mobile-width: 14px;
162
114
  border-bottom: 1px solid $nav-button-hr;
163
115
 
164
116
  &:last-child {
165
- border-bottom: 0px solid $nav-button-hr;
117
+ border-bottom: 0 solid $nav-button-hr;
166
118
  }
167
119
  position: relative;
168
120
  @include box-sizing(border-box);
@@ -172,7 +124,7 @@ $progressbar-mobile-width: 14px;
172
124
  }
173
125
 
174
126
  > a {
175
- height:100%;
127
+ height: 100%;
176
128
  width: 100%;
177
129
 
178
130
  span.button {
@@ -185,10 +137,6 @@ $progressbar-mobile-width: 14px;
185
137
  margin: -20px auto 0 23px;
186
138
  }
187
139
  }
188
-
189
- &:hover .navi_hint, &.active .navi_hint {
190
- color: $nav-hint-hover-color;
191
- }
192
140
  }
193
141
  }
194
142
  }
@@ -200,7 +148,7 @@ $progressbar-mobile-width: 14px;
200
148
  height: 10%;
201
149
 
202
150
  &.mute {
203
- height :20%;
151
+ height: 20%;
204
152
  }
205
153
  }
206
154
  }
@@ -214,7 +162,7 @@ $progressbar-mobile-width: 14px;
214
162
  width: 122px;
215
163
 
216
164
  @include pageflow-progress-mobile-variant {
217
- width: 14px;
165
+ width: $progressbar-mobile-width;
218
166
  }
219
167
 
220
168
  .navigation_button_area {
@@ -239,8 +187,8 @@ $progressbar-mobile-width: 14px;
239
187
  &:before {
240
188
  opacity: 0;
241
189
  main & {
242
- @include transition(opacity 0.7s linear);
243
- }
190
+ @include transition(opacity 0.7s linear);
191
+ }
244
192
  }
245
193
  }
246
194
 
@@ -320,17 +268,8 @@ $progressbar-mobile-width: 14px;
320
268
  }
321
269
 
322
270
  .navigation_site_detail {
323
-
324
271
  color: white;
325
- font-size: 1em;
326
- line-height: 1.1em;
327
- font-family: sourcesanspro;
328
-
329
272
  @include pageflow-progress-navigation-bar-box(-40px, 30px);
330
-
331
- img {
332
- margin-top: 12px;
333
- }
334
273
  }
335
274
 
336
275
  .navigation_bar_buttons, .navigation_bar_bottom {
@@ -372,7 +311,6 @@ $progressbar-mobile-width: 14px;
372
311
  width: 39px;
373
312
 
374
313
  p {
375
- font-size: 9px;
376
314
  color: $nav-color;
377
315
  margin-bottom: 0;
378
316
  text-align: center;
@@ -387,14 +325,11 @@ $progressbar-mobile-width: 14px;
387
325
  }
388
326
 
389
327
  .navigation_credits_box {
390
- font-size: 1em;
391
328
  min-width: 230px;
392
329
  min-height: 4px;
393
- font-family: "sourcesanspro";
394
- bottom: 0;
395
330
 
396
331
  a {
397
- color: #b4c552;
332
+ color: $nav-hint-hover-color;
398
333
  }
399
334
 
400
335
  a.legal, a.copy {
@@ -475,6 +410,10 @@ $progressbar-mobile-width: 14px;
475
410
  }
476
411
  }
477
412
 
413
+ .navigation_top.deactivated {
414
+ pointer-events: none;
415
+ }
416
+
478
417
  .scroller {
479
418
  top: 0;
480
419
  bottom: 0;
@@ -491,11 +430,6 @@ $progressbar-mobile-width: 14px;
491
430
 
492
431
  ul {
493
432
  position: absolute;
494
- right: 8px;
495
- width: 14px;
496
- top: 50%;
497
- max-height: 100%;
498
- @include transform(translate(0, -50%) !important);
499
433
 
500
434
  @include pageflow-progress-mobile-variant {
501
435
  right: 3px;
@@ -513,47 +447,6 @@ $progressbar-mobile-width: 14px;
513
447
  &.filtered {
514
448
  display: none;
515
449
  }
516
-
517
- &.animate_in {
518
- &.moving_forwards {
519
- @include animation(pageflow-progress-navigation-bar-slide-in-from-bottom 0.4s ease-out);
520
- }
521
-
522
- &.moving_backwards {
523
- @include animation(pageflow-progress-navigation-bar-slide-in-from-top 0.4s ease-out);
524
- }
525
-
526
- &.moving_down {
527
- @include animation(pageflow-progress-navigation-bar-slide-in-from-right 0.4s ease-out);
528
- }
529
-
530
- &.moving_up {
531
- @include animation(pageflow-progress-navigation-bar-slide-in-from-left 0.4s ease-out);
532
- }
533
- }
534
-
535
- &.animate_out {
536
- &.moving_forwards {
537
- @include animation(pageflow-progress-navigation-bar-slide-out-to-top 0.4s ease-in);
538
- opacity: 0;
539
- }
540
-
541
- &.moving_backwards {
542
- @include animation(pageflow-progress-navigation-bar-slide-out-to-bottom 0.4s ease-in);
543
- opacity: 0;
544
- }
545
-
546
- &.moving_down {
547
- @include animation(pageflow-progress-navigation-bar-slide-out-to-left 0.4s ease-in);
548
- @include transform(translate3d(-50px, 0, 0));
549
- }
550
-
551
- &.moving_up {
552
- @include animation(pageflow-progress-navigation-bar-slide-out-to-right 0.4s ease-in);
553
- @include transform(translate3d(50px, 0, 0));
554
- }
555
- }
556
-
557
450
  }
558
451
 
559
452
  a {
@@ -574,40 +467,18 @@ $progressbar-mobile-width: 14px;
574
467
  cursor: default;
575
468
  background-color: $nav-active-page;
576
469
 
577
-
578
470
  img {
579
471
  border-left: 5px solid #A6D513;
580
472
  }
581
473
  }
582
-
583
- /* &:visited {
584
- background-color: #9EA95C;
585
- } */
586
474
  }
587
475
 
588
- /* li.chapter_odd a {
589
- background-color: $nav-dot-odd;
476
+ li.chapter_beginning a {
477
+ background-color: $nav-color;
590
478
 
591
479
  &.in_active_chapter {
592
- background-color: $nav-active-chapter;
480
+ background-color: $nav-active-chapter-beginning;
593
481
  }
594
-
595
- &.active {
596
- background-color: $nav-active-page;
597
- }
598
- } */
599
-
600
- li.chapter_beginning a {
601
- background-color: #949494;
602
-
603
- &.in_active_chapter {
604
- background-color: $nav-active-chapter-beginning;
605
- }
606
-
607
- /* &:visited {
608
- background-color: #9EA95C;
609
- opacity: 0;
610
- } */
611
482
  }
612
483
 
613
484
  img {
@@ -644,7 +515,7 @@ $progressbar-mobile-width: 14px;
644
515
  .volume-control {
645
516
  height: 100%;
646
517
 
647
- &:before, &:after, .volume-level:before {
518
+ .volume-level:before {
648
519
  background-image: image-url('pageflow/progress_navigation_bar/volume_control_sprite.png');
649
520
  position: absolute;
650
521
  width: 28px;
@@ -653,28 +524,12 @@ $progressbar-mobile-width: 14px;
653
524
  background-repeat: no-repeat;
654
525
  top: 8px;
655
526
  }
656
-
657
- &:before {
658
- background-position: -34px top;
659
- left: 32px;
660
- bottom: 6%;
661
- top: initial;
662
- }
663
- &:after {
664
- background-position: -3px top;
665
- left: 32px;
666
- top: 6%;
667
- }
668
- &:after, &:before {
669
- @include pageflow-progress-navigation-bar-small-height {
670
- display: none;
671
- }
672
- }
673
527
  }
674
528
  }
675
529
 
676
530
  .volume-control {
677
- margin: 0px 20px;
531
+ position: relative;
532
+ margin: 0 20px;
678
533
 
679
534
  .volume-slider {
680
535
  width: 5px;
@@ -682,7 +537,7 @@ $progressbar-mobile-width: 14px;
682
537
  background-color: gray;
683
538
  top: 20%;
684
539
  position: absolute;
685
- left: 40px;
540
+ left: 20px;
686
541
 
687
542
  @include pageflow-progress-navigation-bar-small-height {
688
543
  top: 10%;
@@ -691,19 +546,9 @@ $progressbar-mobile-width: 14px;
691
546
  }
692
547
  .volume-level {
693
548
  height: 100%;
694
- background-color: #b4c552;
549
+ background-color: $nav-hint-hover-color;
695
550
  bottom: 0;
696
551
  position: absolute;
697
-
698
- &:before {
699
- display: block;
700
- content: "";
701
- background-position: -66px top;
702
- top: -9px !important;
703
- width: 18px !important;
704
- height: 16px !important;
705
- left: -6px !important;
706
- }
707
552
  }
708
553
  }
709
554
  }
@@ -716,14 +561,7 @@ $progressbar-mobile-width: 14px;
716
561
  }
717
562
 
718
563
  .navigation_site_detail.progress_navigation h2 {
719
- font-size: 1em;
720
- line-height: 1.2em;
721
- margin: 0;
722
-
723
564
  > span {
724
565
  display: block;
725
566
  }
726
- .chapter_number {
727
- font-weight: normal;
728
- }
729
- }
567
+ }
@@ -0,0 +1,82 @@
1
+ $pageflow-progress-navigation-bar-v-translation: 100px;
2
+ $pageflow-progress-navigation-bar-h-translation: 50px;
3
+
4
+ @include keyframes(pageflow-progress-navigation-bar-slide-in-from-top2) {
5
+ 0% {
6
+ @include transform(translate3d(-$pageflow-progress-navigation-bar-v-translation, 0, 0));
7
+ opacity: 0;
8
+ }
9
+ 100% {
10
+ @include transform(translate3d(0, 0, 0));
11
+ opacity: 1;
12
+ }
13
+ }
14
+
15
+ @include keyframes(pageflow-progress-navigation-bar-slide-in-from-bottom2) {
16
+ 0% {
17
+ @include transform(translate3d($pageflow-progress-navigation-bar-v-translation, 0, 0));
18
+ opacity: 0;
19
+ }
20
+ 100% {
21
+ @include transform(translate3d(0, 0, 0));
22
+ opacity: 1;
23
+ }
24
+ }
25
+
26
+ @include keyframes(pageflow-progress-navigation-bar-slide-out-to-top2) {
27
+ 0% {
28
+ @include transform(translate3d(0, 0, 0));
29
+ opacity: 1;
30
+ }
31
+ 100% {
32
+ @include transform(translate3d(-$pageflow-progress-navigation-bar-v-translation, 0, 0));
33
+ opacity: 0;
34
+ }
35
+ }
36
+
37
+ @include keyframes(pageflow-progress-navigation-bar-slide-out-to-bottom2) {
38
+ 0% {
39
+ @include transform(translate3d(0, 0, 0));
40
+ opacity: 1;
41
+ }
42
+ 100% {
43
+ @include transform(translate3d($pageflow-progress-navigation-bar-v-translation, 0, 0));
44
+ opacity: 0;
45
+ }
46
+ }
47
+
48
+ @include keyframes(pageflow-progress-navigation-bar-slide-in-from-right2) {
49
+ 0% {
50
+ @include transform(translate3d(0, $pageflow-progress-navigation-bar-h-translation, 0));
51
+ }
52
+ 100% {
53
+ @include transform(translate3d(0, 0, 0));
54
+ }
55
+ }
56
+
57
+ @include keyframes(pageflow-progress-navigation-bar-slide-in-from-left2) {
58
+ 0% {
59
+ @include transform(translate3d(0, -$pageflow-progress-navigation-bar-h-translation, 0));
60
+ }
61
+ 100% {
62
+ @include transform(translate3d(0, 0, 0));
63
+ }
64
+ }
65
+
66
+ @include keyframes(pageflow-progress-navigation-bar-slide-out-to-right2) {
67
+ 0% {
68
+ @include transform(translate3d(0, 0, 0));
69
+ }
70
+ 100% {
71
+ @include transform(translate3d(0, $pageflow-progress-navigation-bar-h-translation, 0));
72
+ }
73
+ }
74
+
75
+ @include keyframes(pageflow-progress-navigation-bar-slide-out-to-left2) {
76
+ 0% {
77
+ @include transform(translate3d(0, 0, 0));
78
+ }
79
+ 100% {
80
+ @include transform(translate3d(0, -$pageflow-progress-navigation-bar-h-translation, 0));
81
+ }
82
+ }