pageflow 13.1.0 → 13.2.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pageflow might be problematic. Click here for more details.

Files changed (42) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +17 -45
  3. data/Rakefile +4 -0
  4. data/app/assets/images/pageflow/themes/default/{player_controls/slim/scroller_mask.png → mask_bottom.png} +0 -0
  5. data/app/assets/javascripts/pageflow/base.js +1 -0
  6. data/app/assets/javascripts/pageflow/browser/request_animation_frame_support.js +3 -0
  7. data/app/assets/javascripts/pageflow/components.js +4 -4
  8. data/app/assets/javascripts/pageflow/dist/react-client.js +31320 -0
  9. data/app/assets/javascripts/pageflow/dist/{react.js → react-server.js} +1514 -869
  10. data/app/assets/javascripts/pageflow/editor/views/configuration_editors/audio.js +20 -0
  11. data/app/assets/javascripts/pageflow/react.js +1 -1
  12. data/app/assets/javascripts/pageflow/slideshow/scroller_widget.js +9 -4
  13. data/app/assets/javascripts/pageflow/theme.js +6 -0
  14. data/app/assets/stylesheets/pageflow/mixins/shadow.scss +5 -0
  15. data/app/assets/stylesheets/pageflow/page.scss +0 -11
  16. data/app/assets/stylesheets/pageflow/page_types/audio.scss +0 -4
  17. data/app/assets/stylesheets/pageflow/page_types/video.scss +0 -1
  18. data/app/assets/stylesheets/pageflow/slideshow.scss +8 -0
  19. data/app/assets/stylesheets/pageflow/themes/default/base.scss +1 -0
  20. data/app/assets/stylesheets/pageflow/themes/default/definitions.scss +1 -0
  21. data/app/assets/stylesheets/pageflow/themes/default/mixins/masks.scss +11 -0
  22. data/app/assets/stylesheets/pageflow/themes/default/page.scss +19 -0
  23. data/app/assets/stylesheets/pageflow/themes/default/page/content_text_margin.scss +18 -0
  24. data/app/assets/stylesheets/pageflow/themes/default/page/scroller.scss +5 -0
  25. data/app/assets/stylesheets/pageflow/themes/default/player_controls.scss +2 -0
  26. data/app/assets/stylesheets/pageflow/themes/default/player_controls/shared/menu_bar.scss +6 -0
  27. data/app/assets/stylesheets/pageflow/themes/default/player_controls/slim/scroller.scss +2 -6
  28. data/app/assets/stylesheets/pageflow/themes/default/player_controls/waveform.scss +25 -0
  29. data/app/assets/stylesheets/pageflow/themes/default/player_controls/waveform/info_box.scss +30 -0
  30. data/app/assets/stylesheets/pageflow/themes/default/player_controls/waveform/play_button.scss +31 -0
  31. data/app/assets/stylesheets/pageflow/themes/default/player_controls/waveform/times_display.scss +20 -0
  32. data/app/assets/stylesheets/pageflow/themes/default/player_controls/waveform/wave.scss +29 -0
  33. data/app/assets/stylesheets/pageflow/themes/default/probes.scss +3 -0
  34. data/app/helpers/pageflow/entries_helper.rb +10 -3
  35. data/app/views/layouts/pageflow/_theme_probes.html.erb +1 -0
  36. data/app/views/layouts/pageflow/application.html.erb +1 -0
  37. data/config/initializers/features.rb +1 -0
  38. data/config/locales/de.yml +12 -0
  39. data/config/locales/en.yml +12 -0
  40. data/lib/pageflow/version.rb +1 -1
  41. data/lib/tasks/pageflow_tasks.rake +11 -1
  42. metadata +18 -6
@@ -20,8 +20,28 @@ pageflow.ConfigurationEditorView.register('audio', {
20
20
  });
21
21
 
22
22
  this.tab('options', function() {
23
+ if (pageflow.features.isEnabled('waveform_player_controls')) {
24
+ this.input('audio_player_controls_variant', pageflow.SelectInputView, {
25
+ values: ['default', 'waveform']
26
+ });
27
+ }
28
+
29
+ this.input('waveform_color', pageflow.ColorInputView, {
30
+ visibleBinding: 'audio_player_controls_variant',
31
+ visibleBindingValue: 'waveform',
32
+
33
+ defaultValue: pageflow.theme.mainColor(),
34
+ swatches: usedWaveformColors()
35
+ });
36
+
23
37
  this.input('autoplay', pageflow.CheckBoxInputView);
24
38
  this.group('options', {canPauseAtmo: true});
25
39
  });
40
+
41
+ function usedWaveformColors() {
42
+ return _.chain(pageflow.pages.map(function(page) {
43
+ return page.configuration.get('waveform_color');
44
+ })).uniq().compact().value();
45
+ }
26
46
  }
27
47
  });
@@ -1,4 +1,4 @@
1
1
  // Files in the dist folder are generated by Webpack in the
2
2
  // node_package directory.
3
3
 
4
- //= require ./dist/react
4
+ //= require ./dist/react-client
@@ -13,12 +13,17 @@
13
13
  doubleBumpThreshold: 500,
14
14
 
15
15
  _create: function() {
16
+ this.eventListenerTarget = this.options.eventListenerTarget ?
17
+ $(this.options.eventListenerTarget) :
18
+ this.element;
19
+
16
20
  this.iscroll = new IScroll(this.element[0], _.extend({
17
21
  mouseWheel: true,
18
22
  bounce: false,
19
23
  keyBindings: true,
20
24
  probeType: 2,
21
- preventDefault: false
25
+ preventDefault: false,
26
+ eventListenerTarget: this.eventListenerTarget[0]
22
27
  }, _.pick(this.options, 'freeScroll', 'scrollX', 'noMouseWheelScrollX')));
23
28
 
24
29
  this.iscroll.disable();
@@ -218,7 +223,7 @@
218
223
  allowRight = false,
219
224
  startX, startY;
220
225
 
221
- this.element.on('touchstart MSPointerDown pointerdown', _.bind(function(event) {
226
+ this.eventListenerTarget.on('touchstart MSPointerDown pointerdown', _.bind(function(event) {
222
227
  var point = event.originalEvent.touches ?
223
228
  event.originalEvent.touches[0] : event.originalEvent;
224
229
 
@@ -233,7 +238,7 @@
233
238
  }
234
239
  }, this));
235
240
 
236
- this.element.on('touchmove MSPointerMove pointermove', _.bind(function(event) {
241
+ this.eventListenerTarget.on('touchmove MSPointerMove pointermove', _.bind(function(event) {
237
242
  var point = event.originalEvent.touches ?
238
243
  event.originalEvent.touches[0] : event.originalEvent;
239
244
 
@@ -266,7 +271,7 @@
266
271
  }
267
272
  }, this));
268
273
 
269
- this.element.on('touchend MSPointerUp pointerup', _.bind(function(event) {
274
+ this.eventListenerTarget.on('touchend MSPointerUp pointerup', _.bind(function(event) {
270
275
  var point = event.originalEvent.touches ?
271
276
  event.originalEvent.changedTouches[0] : event.originalEvent;
272
277
 
@@ -0,0 +1,6 @@
1
+ pageflow.theme = {
2
+ mainColor: function() {
3
+ var probe = document.getElementById('theme_probe-main_color');
4
+ return window.getComputedStyle(probe)['background-color'];
5
+ }
6
+ };
@@ -79,3 +79,8 @@
79
79
  background-image: url(data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiA/Pgo8c3ZnIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgd2lkdGg9IjEwMCUiIGhlaWdodD0iMTAwJSIgdmlld0JveD0iMCAwIDEgMSIgcHJlc2VydmVBc3BlY3RSYXRpbz0ibm9uZSI+CiAgPGxpbmVhckdyYWRpZW50IGlkPSJncmFkLXVjZ2ctZ2VuZXJhdGVkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjAlIiB5MT0iMCUiIHgyPSIwJSIgeTI9IjEwMCUiPgogICAgPHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwIi8+CiAgICA8c3RvcCBvZmZzZXQ9IjElIiBzdG9wLWNvbG9yPSIjMDAwMDAwIiBzdG9wLW9wYWNpdHk9IjAiLz4KICAgIDxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iIzAwMDAwMCIgc3RvcC1vcGFjaXR5PSIwLjciLz4KICA8L2xpbmVhckdyYWRpZW50PgogIDxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxIiBoZWlnaHQ9IjEiIGZpbGw9InVybCgjZ3JhZC11Y2dnLWdlbmVyYXRlZCkiIC8+Cjwvc3ZnPg==);
80
80
  @include linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent, $fallback: transparent);
81
81
  }
82
+
83
+ @mixin shadow-bottom-inverted {
84
+ @include linear-gradient(to top, rgba(255, 255, 255, 0.7), transparent, $fallback: transparent);
85
+ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#007db9e8', endColorstr='#ffffff',GradientType=0 )
86
+ }
@@ -78,14 +78,3 @@
78
78
  }
79
79
  }
80
80
  }
81
-
82
- .contentText {
83
- @include phone {
84
- margin-bottom: 40px;
85
- }
86
- }
87
- .videoPage .contentText, .audioPage .contentText {
88
- @include phone {
89
- margin-bottom: 80px;
90
- }
91
- }
@@ -8,10 +8,6 @@
8
8
  }
9
9
 
10
10
  .js .audioPage {
11
- .contentText {
12
- margin-bottom: 200px;
13
- }
14
-
15
11
  .non_js_audio {
16
12
  display: none;
17
13
  }
@@ -83,7 +83,6 @@
83
83
  .js .page .videoPage {
84
84
  .contentText {
85
85
  padding-top: initial;
86
- margin-bottom: 200px;
87
86
  }
88
87
 
89
88
  .shadow {
@@ -74,6 +74,14 @@
74
74
  bottom: 0;
75
75
  z-index: 1;
76
76
 
77
+ &-wrapper {
78
+ position: absolute;
79
+ top: 0;
80
+ left: 0;
81
+ width: 100%;
82
+ bottom: 0;
83
+ }
84
+
77
85
  > div {
78
86
  position: absolute;
79
87
  @include box-sizing(border-box);
@@ -31,3 +31,4 @@
31
31
  @import "./video_wrapper";
32
32
  @import "./text_track_cues";
33
33
  @import "./slideshow";
34
+ @import "./probes";
@@ -6,5 +6,6 @@
6
6
  @import "./mixins/typography";
7
7
  @import "./mixins/indicator_typography";
8
8
  @import "./mixins/cue_margins";
9
+ @import "./mixins/masks";
9
10
 
10
11
  @import "./animations";
@@ -0,0 +1,11 @@
1
+ // scss-lint:disable VendorPrefix
2
+
3
+ @mixin mask-bottom {
4
+ -webkit-mask-image: image-url("pageflow/themes/default/mask_bottom.png");
5
+ -webkit-mask-position: bottom left;
6
+ -webkit-mask-repeat: repeat-x;
7
+ }
8
+
9
+ @mixin mask-none {
10
+ -webkit-mask-image: none;
11
+ }
@@ -11,6 +11,9 @@ $page-header-typography: () !default;
11
11
  /// Typography for header tagline.
12
12
  $page-header-tagline-typography: () !default;
13
13
 
14
+ /// Typography for header tagline in phone layout.
15
+ $page-header-tagline-phone-typography: () !default;
16
+
14
17
  /// Typography for header title.
15
18
  $page-header-title-typography: () !default;
16
19
 
@@ -26,6 +29,9 @@ $page-header-first-page-title-phone-typography: () !default;
26
29
  /// Typography for header subtitle.
27
30
  $page-header-subtitle-typography: () !default;
28
31
 
32
+ /// Typography for header subtitle in phone layout.
33
+ $page-header-subtitle-phone-typography: () !default;
34
+
29
35
  /// Typography for content text.
30
36
  $page-content-text-typography: () !default;
31
37
 
@@ -86,6 +92,7 @@ $page-content-text-line-height: 1.5em !default;
86
92
  @import "./page/anchors";
87
93
  @import "./page/hyphenate";
88
94
  @import "./page/paddings";
95
+ @import "./page/content_text_margin";
89
96
  @import "./page/scroller";
90
97
  @import "./page/shadow";
91
98
 
@@ -142,6 +149,12 @@ $page-content-text-line-height: 1.5em !default;
142
149
  letter-spacing: 0
143
150
  )
144
151
  );
152
+
153
+ @include phone {
154
+ @include typography(
155
+ $page-header-tagline-phone-typography
156
+ );
157
+ }
145
158
  }
146
159
 
147
160
  .title {
@@ -182,6 +195,12 @@ $page-content-text-line-height: 1.5em !default;
182
195
  margin-bottom: $page-header-subtitle-margin-bottom
183
196
  )
184
197
  );
198
+
199
+ @include phone {
200
+ @include typography(
201
+ $page-header-subtitle-phone-typography
202
+ );
203
+ }
185
204
  }
186
205
  }
187
206
 
@@ -0,0 +1,18 @@
1
+ .contentText {
2
+ // This has to be the default behavior since all non-React pages
3
+ // still do not apply additional modifier classes to the content
4
+ // text
5
+ @include phone {
6
+ margin-bottom: 40px;
7
+ }
8
+
9
+ &-margin_none {
10
+ @include phone {
11
+ margin-bottom: 0;
12
+ }
13
+ }
14
+
15
+ &-margin_for_player_controls {
16
+ margin-bottom: 200px;
17
+ }
18
+ }
@@ -1,3 +1,8 @@
1
1
  .page .scroller {
2
2
  @extend %pageflow_widget_margin_right !optional;
3
3
  }
4
+
5
+ .scroller-clipped_bottom {
6
+ overflow: hidden;
7
+ @include mask-bottom;
8
+ }
@@ -28,6 +28,8 @@ $player-controls-typography: () !default;
28
28
  @import "./player_controls/slim";
29
29
  }
30
30
 
31
+ @import "./player_controls/waveform";
32
+
31
33
  // Extend vjs specific css classes with placeholders:
32
34
 
33
35
  @import "./player_controls/vjs_mapping";
@@ -1,5 +1,7 @@
1
1
  $player-controls-menu-icon-color: #fff !default;
2
2
 
3
+ $player-controls-menu-inverted-icon-color: #333 !default;
4
+
3
5
  $player-controls-menu-popup-background-color: rgba(17, 17, 17, 0.9) !default;
4
6
 
5
7
  $player-controls-menu-popup-link-color: #fff !default;
@@ -62,6 +64,10 @@ $player-controls-quality-menu-annotation-color: #ff0000 !default;
62
64
  fill: $player-controls-menu-icon-color;
63
65
  }
64
66
 
67
+ &-menu_bar-inverted .player_controls-menu_bar_button_icon {
68
+ fill: $player-controls-menu-inverted-icon-color;
69
+ }
70
+
65
71
  &-menu_bar_button-sub_menu_visible .player_controls-quality_menu_button_icon {
66
72
  @include transform(translate(-50%, -50%) rotate(40deg));
67
73
  }
@@ -1,13 +1,9 @@
1
- // scss-lint:disable VendorPrefix
2
-
3
1
  %player_controls {
4
2
  &-scroller-playing {
5
3
  @include desktop {
6
4
  bottom: 80px;
7
5
  overflow: hidden;
8
- -webkit-mask-image: image-url("pageflow/themes/default/player_controls/slim/scroller_mask.png");
9
- -webkit-mask-position: bottom left;
10
- -webkit-mask-repeat: repeat-x;
6
+ @include mask-bottom;
11
7
  }
12
8
  }
13
9
 
@@ -15,7 +11,7 @@
15
11
  &-scroller-fading {
16
12
  @include desktop {
17
13
  bottom: 0;
18
- -webkit-mask-image: none;
14
+ @include mask-none;
19
15
  }
20
16
  }
21
17
  }
@@ -0,0 +1,25 @@
1
+ @import "./waveform/info_box";
2
+ @import "./waveform/play_button";
3
+ @import "./waveform/times_display";
4
+ @import "./waveform/wave";
5
+
6
+ .waveform_player_controls {
7
+ position: absolute;
8
+ left: 0;
9
+ right: 0;
10
+ bottom: 0;
11
+ z-index: 2;
12
+ pointer-events: none;
13
+
14
+ @include shadow-bottom;
15
+
16
+ &-inverted {
17
+ @include shadow-bottom-inverted;
18
+ }
19
+
20
+ &-container {
21
+ padding-top: 10px;
22
+ margin-bottom: 55px;
23
+ width: 100%;
24
+ }
25
+ }
@@ -0,0 +1,30 @@
1
+ $waveform-player-controls-info-box-typography: () !default;
2
+
3
+ .waveform_player_controls {
4
+ &-info_box {
5
+ padding-left: 8%;
6
+ padding-right: 14%;
7
+ margin-top: 10px;
8
+ max-width: 900px;
9
+
10
+ &-title,
11
+ &-description {
12
+ @include typography(
13
+ $waveform-player-controls-info-box-typography, (
14
+ font-size: 1.1em,
15
+ margin: 15px 0
16
+ )
17
+ );
18
+
19
+ display: inline;
20
+ width: auto;
21
+ max-width: none;
22
+ }
23
+
24
+ &-title-with_separator:after {
25
+ content: "\2014";
26
+ display: inline;
27
+ padding: 0 5px;
28
+ }
29
+ }
30
+ }
@@ -0,0 +1,31 @@
1
+ $waveform-player-controls-play-button-fill: #fff !default;
2
+
3
+ $waveform-player-controls-play-button-stroke: #444 !default;
4
+
5
+ $waveform-player-controls-play-button-inverted-fill: #222 !default;
6
+
7
+ $waveform-player-controls-play-button-inverted-stroke: #ddd !default;
8
+
9
+ .waveform_player_controls {
10
+ &-play_button {
11
+ display: block;
12
+ position: absolute;
13
+ top: 50%;
14
+ @include transform(translateY(-50%));
15
+ left: 8%;
16
+ z-index: 2;
17
+
18
+ svg {
19
+ width: 100px;
20
+ height: 100px;
21
+ fill: $waveform-player-controls-play-button-fill;
22
+ stroke: $waveform-player-controls-play-button-stroke;
23
+ stroke-width: 3px;
24
+ }
25
+
26
+ &-inverted svg {
27
+ fill: $waveform-player-controls-play-button-inverted-fill;
28
+ stroke: $waveform-player-controls-play-button-inverted-stroke;
29
+ }
30
+ }
31
+ }
@@ -0,0 +1,20 @@
1
+ $waveform-player-controls-times-display-typography: ();
2
+
3
+ .waveform_player_controls-times_display {
4
+ margin-top: 10px;
5
+ padding-left: 8%;
6
+ @include standard-typography($waveform-player-controls-times-display-typography);
7
+
8
+ &-current_time,
9
+ &-duration {
10
+ display: inline;
11
+ }
12
+
13
+ &-current_time {
14
+ padding-right: 5px;
15
+ }
16
+
17
+ &-duration {
18
+ padding-left: 5px;
19
+ }
20
+ }
@@ -0,0 +1,29 @@
1
+ .waveform_player_controls {
2
+ canvas {
3
+ opacity: 0.8;
4
+ }
5
+
6
+ &-wave_wrapper {
7
+ position: absolute;
8
+ bottom: 0;
9
+ left: 20px;
10
+ right: 20px;
11
+ }
12
+
13
+ &-wave {
14
+ @extend %pageflow_widget_margin_right_max !optional;
15
+
16
+ position: relative;
17
+ z-index: 1;
18
+ pointer-events: all;
19
+ height: 70px;
20
+
21
+ @media (min-height: 600px) {
22
+ height: 150px;
23
+ }
24
+
25
+ @media (min-height: 800px) {
26
+ height: 270px;
27
+ }
28
+ }
29
+ }