pageflow 16.0.0 → 16.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (188) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +86 -33
  3. data/README.md +6 -6
  4. data/Rakefile +1 -1
  5. data/admins/pageflow/entry.rb +0 -1
  6. data/admins/pageflow/sites.rb +3 -0
  7. data/app/assets/images/pageflow/admin/icons/published_with_noindex.svg +4 -0
  8. data/app/assets/javascripts/pageflow/dist/ui.js +299 -72
  9. data/app/assets/stylesheets/pageflow/admin/active_admin_patches.scss +1 -1
  10. data/app/assets/stylesheets/pageflow/admin/entries.scss +4 -0
  11. data/app/assets/stylesheets/pageflow/admin/permalink_input.scss +10 -0
  12. data/app/assets/stylesheets/pageflow/admin/publication_state_indicator.scss +4 -0
  13. data/app/assets/stylesheets/pageflow/editor/base.scss +0 -1
  14. data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +61 -7
  15. data/app/assets/stylesheets/pageflow/editor/file_meta_data.scss +12 -1
  16. data/app/assets/stylesheets/pageflow/editor/file_thumbnails.scss +4 -0
  17. data/app/assets/stylesheets/pageflow/editor/help.scss +3 -3
  18. data/app/assets/stylesheets/pageflow/editor/info_box.scss +7 -0
  19. data/app/assets/stylesheets/pageflow/editor/inputs/file_input.scss +0 -5
  20. data/app/assets/stylesheets/pageflow/ui/forms.scss +4 -4
  21. data/app/assets/stylesheets/pageflow/{editor/wysihtml5.scss → ui/input/text_area_input.scss} +13 -1
  22. data/app/assets/stylesheets/pageflow/ui.scss +1 -0
  23. data/app/controllers/pageflow/chapters_controller.rb +2 -2
  24. data/app/controllers/pageflow/editor/entry_publications_controller.rb +5 -1
  25. data/app/controllers/pageflow/editor/file_import_controller.rb +1 -1
  26. data/app/controllers/pageflow/editor/files_controller.rb +1 -1
  27. data/app/controllers/pageflow/entries_controller.rb +12 -2
  28. data/app/controllers/pageflow/feeds_controller.rb +18 -0
  29. data/app/controllers/pageflow/pages_controller.rb +2 -2
  30. data/app/controllers/pageflow/sitemaps_controller.rb +15 -0
  31. data/app/controllers/pageflow/storylines_controller.rb +2 -2
  32. data/app/helpers/pageflow/entries_helper.rb +4 -1
  33. data/app/helpers/pageflow/feeds_helper.rb +66 -0
  34. data/app/helpers/pageflow/meta_tags_helper.rb +2 -1
  35. data/app/helpers/pageflow/page_types_helper.rb +10 -10
  36. data/app/helpers/pageflow/revision_file_helper.rb +3 -3
  37. data/app/helpers/pageflow/social_share_helper.rb +2 -2
  38. data/app/inputs/pageflow_permalink_input.rb +15 -3
  39. data/app/models/concerns/pageflow/entry_publication_states.rb +9 -0
  40. data/app/models/concerns/pageflow/reusable_file.rb +3 -3
  41. data/app/models/concerns/pageflow/uploadable_file.rb +5 -0
  42. data/app/models/pageflow/account.rb +8 -0
  43. data/app/models/pageflow/audio_file_url_templates.rb +2 -1
  44. data/app/models/pageflow/draft_entry.rb +1 -1
  45. data/app/models/pageflow/entries_feed.rb +32 -0
  46. data/app/models/pageflow/entry.rb +7 -5
  47. data/app/models/pageflow/entry_at_revision.rb +2 -0
  48. data/app/models/pageflow/image_file.rb +34 -8
  49. data/app/models/pageflow/image_file_url_templates.rb +7 -1
  50. data/app/models/pageflow/membership.rb +3 -2
  51. data/app/models/pageflow/other_file.rb +5 -0
  52. data/app/models/pageflow/other_file_url_templates.rb +16 -0
  53. data/app/models/pageflow/published_entry.rb +6 -0
  54. data/app/models/pageflow/revision.rb +6 -0
  55. data/app/models/pageflow/site.rb +8 -0
  56. data/app/models/pageflow/sitemaps.rb +14 -0
  57. data/app/models/pageflow/used_file.rb +10 -2
  58. data/app/models/pageflow/video_file_url_templates.rb +3 -1
  59. data/app/models/pageflow/widget.rb +9 -1
  60. data/app/views/admin/entries/_permalink_inputs.html.erb +1 -2
  61. data/app/views/admin/sites/_attributes_table.html.arb +3 -0
  62. data/app/views/admin/sites/_fields.html.erb +6 -0
  63. data/app/views/components/pageflow/admin/extensible_attributes_table.rb +2 -2
  64. data/app/views/components/pageflow/admin/revisions_tab.rb +8 -0
  65. data/app/views/components/pageflow/admin/sites_tab.rb +3 -0
  66. data/app/views/pageflow/editor/config/_seeds.json.jbuilder +2 -0
  67. data/app/views/pageflow/editor/entries/_entry.json.jbuilder +1 -0
  68. data/app/views/pageflow/editor/entry_publications/check.json.jbuilder +1 -0
  69. data/app/views/pageflow/feeds/index.atom.builder +20 -0
  70. data/app/views/pageflow/image_files/_image_file.json.jbuilder +1 -0
  71. data/app/views/pageflow/meta_tags/_entry.html.erb +1 -0
  72. data/app/views/pageflow/sitemaps/index.xml.builder +9 -0
  73. data/config/initializers/features.rb +3 -0
  74. data/config/initializers/paperclip.rb +8 -0
  75. data/config/locales/de.yml +77 -6
  76. data/config/locales/en.yml +79 -4
  77. data/config/routes.rb +3 -0
  78. data/config/spring.rb +1 -1
  79. data/db/migrate/20230120092923_create_other_files.rb +23 -0
  80. data/db/migrate/20230323115745_add_feeds_enabled_to_sites.rb +5 -0
  81. data/db/migrate/20230323154323_add_sitemap_enabled_to_sites.rb +5 -0
  82. data/db/migrate/20230331103823_add_title_to_sites.rb +5 -0
  83. data/db/migrate/20230405103612_add_custom_feed_url_to_sites.rb +5 -0
  84. data/db/migrate/20231024062501_add_output_presences_to_image_files.rb +5 -0
  85. data/db/migrate/20231128124523_add_noindex_to_revisions.rb +5 -0
  86. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +710 -259
  87. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +34 -5
  88. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-client.js +1 -1
  89. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-server.js +1 -1
  90. data/entry_types/paged/app/controllers/pageflow_paged/editor/entries_controller.rb +0 -2
  91. data/entry_types/paged/app/controllers/pageflow_paged/entries_controller.rb +2 -1
  92. data/entry_types/paged/app/views/pageflow_paged/entries/show.html.erb +1 -0
  93. data/entry_types/paged/config/initializers/features.rb +0 -1
  94. data/entry_types/paged/lib/pageflow_paged/engine.rb +13 -1
  95. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/chapters_controller.rb +2 -2
  96. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/content_elements_controller.rb +3 -4
  97. data/entry_types/scrolled/app/controllers/pageflow_scrolled/editor/sections_controller.rb +13 -6
  98. data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +11 -3
  99. data/entry_types/scrolled/app/helpers/pageflow_scrolled/cache_helper.rb +11 -0
  100. data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/entry_json_seed_helper.rb +42 -0
  101. data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +8 -5
  102. data/entry_types/scrolled/app/helpers/pageflow_scrolled/packs_helper.rb +17 -12
  103. data/entry_types/scrolled/app/helpers/pageflow_scrolled/react_server_side_rendering_helper.rb +9 -1
  104. data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +1 -1
  105. data/entry_types/scrolled/app/models/pageflow_scrolled/chapter.rb +23 -0
  106. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +1 -1
  107. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_seed.json.jbuilder +1 -5
  108. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/sections/_section_with_content_elements.json.jbuilder +10 -0
  109. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +44 -41
  110. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_consent_vendors.json.jbuilder +16 -0
  111. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +7 -0
  112. data/entry_types/scrolled/config/initializers/features.rb +5 -0
  113. data/entry_types/scrolled/config/locales/consent_widget.de.yml +4 -0
  114. data/entry_types/scrolled/config/locales/consent_widget.en.yml +4 -0
  115. data/entry_types/scrolled/config/locales/de.yml +225 -8
  116. data/entry_types/scrolled/config/locales/en.yml +239 -2
  117. data/entry_types/scrolled/config/routes.rb +4 -0
  118. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +69 -44
  119. data/entry_types/scrolled/lib/pageflow_scrolled/additional_packs.rb +2 -1
  120. data/entry_types/scrolled/lib/pageflow_scrolled/additional_seed_data.rb +1 -1
  121. data/entry_types/scrolled/lib/pageflow_scrolled/configuration.rb +96 -0
  122. data/entry_types/scrolled/lib/pageflow_scrolled/content_element_consent_vendors.rb +38 -0
  123. data/entry_types/scrolled/lib/pageflow_scrolled/engine.rb +13 -1
  124. data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +30 -0
  125. data/entry_types/scrolled/lib/pageflow_scrolled/react_widget_type.rb +6 -1
  126. data/entry_types/scrolled/lib/pageflow_scrolled/web_app_manifest.rb +1 -1
  127. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/dummy.rake +1 -1
  128. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/storybook.rake +1 -2
  129. data/entry_types/scrolled/package/config/webpack.js +26 -0
  130. data/entry_types/scrolled/package/contentElements-editor.js +330 -32
  131. data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
  132. data/entry_types/scrolled/package/contentElements-frontend.js +920 -145
  133. data/entry_types/scrolled/package/editor.js +819 -239
  134. data/entry_types/scrolled/package/frontend/{EditableInlineText.module-14c7b097.js → EditableInlineText.module-6ee0e024.js} +1975 -1792
  135. data/entry_types/scrolled/package/frontend/PhonePlatformContext-b28d991a.js +32 -0
  136. data/entry_types/scrolled/package/frontend/ToggleFullscreenCornerButton-8242f213.js +107 -0
  137. data/entry_types/scrolled/package/frontend/Viewer-32cd1ac1.js +154 -0
  138. data/entry_types/scrolled/package/frontend/{Viewer-b6becc57.js → Viewer-6e4d14ed.js} +32 -161
  139. data/entry_types/scrolled/package/frontend/arrowRight-e42e6011.js +77 -0
  140. data/entry_types/scrolled/package/frontend/{components-b3160dd7.js → components-24363f97.js} +188 -47
  141. data/entry_types/scrolled/package/frontend/{PhonePlatformContext-f6093cc6.js → i18n-71c39823.js} +191 -111
  142. data/entry_types/scrolled/package/frontend/index-fc4b13e6.js +118 -0
  143. data/entry_types/scrolled/package/frontend/index.css +1 -1
  144. data/entry_types/scrolled/package/frontend/index.js +252 -76
  145. data/entry_types/scrolled/package/frontend/useContentElementEditorState-245f1986.js +52 -0
  146. data/entry_types/scrolled/package/package.json +6 -4
  147. data/entry_types/scrolled/package/testHelpers.js +11 -2
  148. data/entry_types/scrolled/package/values/colors.module.css +15 -0
  149. data/entry_types/scrolled/package/widgets/consentBar.css +1 -0
  150. data/entry_types/scrolled/package/widgets/consentBar.js +426 -0
  151. data/entry_types/scrolled/package/widgets/defaultNavigation.css +2 -2
  152. data/entry_types/scrolled/package/widgets/defaultNavigation.js +39 -4
  153. data/entry_types/scrolled/package/widgets/iconInlineFileRights.css +1 -0
  154. data/entry_types/scrolled/package/widgets/iconInlineFileRights.js +49 -0
  155. data/entry_types/scrolled/package/widgets/textInlineFileRights.css +1 -0
  156. data/entry_types/scrolled/package/widgets/textInlineFileRights.js +37 -0
  157. data/lib/generators/pageflow/resque/resque_generator.rb +1 -1
  158. data/lib/generators/pageflow/resque/templates/resque.rake +1 -1
  159. data/lib/generators/pageflow/resque/templates/resque.rb +1 -1
  160. data/lib/generators/pageflow/routes/routes_generator.rb +1 -1
  161. data/lib/pageflow/ability_mixin.rb +5 -5
  162. data/lib/pageflow/active_admin_can_can_fix.rb +2 -2
  163. data/lib/pageflow/built_in_file_type.rb +7 -0
  164. data/lib/pageflow/configuration.rb +29 -1
  165. data/lib/pageflow/engine.rb +18 -40
  166. data/lib/pageflow/entry_export_import/revision_serialization.rb +1 -1
  167. data/lib/pageflow/file_type.rb +2 -2
  168. data/lib/pageflow/global_config_api.rb +2 -2
  169. data/lib/pageflow/nested_revision_component.rb +23 -5
  170. data/lib/pageflow/page_type.rb +1 -1
  171. data/lib/pageflow/paperclip_processors/webp.rb +63 -0
  172. data/lib/pageflow/rails_version.rb +19 -0
  173. data/lib/pageflow/seeds.rb +10 -7
  174. data/lib/pageflow/user_mixin.rb +1 -1
  175. data/lib/pageflow/version.rb +1 -1
  176. data/lib/pageflow/widget_types.rb +4 -0
  177. data/package/config/jest/index.js +3 -1
  178. data/package/config/webpack5.js +14 -0
  179. data/package/editor.js +410 -181
  180. data/package/frontend.js +34 -4
  181. data/package/testHelpers.js +1 -1
  182. data/package/ui.js +297 -71
  183. data/spec/factories/entries.rb +34 -3
  184. data/spec/factories/sites.rb +3 -0
  185. data/vendor/assets/javascripts/iscroll.js +4 -7
  186. metadata +118 -80
  187. data/app/helpers/pageflow/admin/permalinks_helper.rb +0 -15
  188. data/entry_types/scrolled/package/frontend/arrowRight-78a7cee4.js +0 -42
@@ -5,6 +5,23 @@ en:
5
5
  defaultNavigation:
6
6
  widget_type_name: Default navigation
7
7
  editor:
8
+ file_types:
9
+ audio_files:
10
+ name:
11
+ one: Audio
12
+ other: Audios
13
+ image_files:
14
+ name:
15
+ one: Image
16
+ other: Images
17
+ other_files:
18
+ name:
19
+ one: Other
20
+ other: Other
21
+ video_files:
22
+ name:
23
+ one: Video
24
+ other: Videos
8
25
  widgets:
9
26
  attributes:
10
27
  defaultNavigation:
@@ -22,15 +39,28 @@ en:
22
39
  label: Hide unmute button
23
40
  frontend_v2:
24
41
  feature_name: Frontend v2
42
+ hls_instead_of_dash:
43
+ feature_name: Use HLS instead of DASH for videos
44
+ iconInlineFileRights:
45
+ widget_type_name: Copyright icons
25
46
  iframe_embed_content_element:
26
47
  feature_name: iframe embed content element
48
+ scrolled_entry_fragment_caching:
49
+ feature_name: Pageflow Next Fragment Caching
50
+ textInlineFileRights:
51
+ widget_type_name: Text at element
27
52
  ui:
28
53
  configuration_editor:
29
54
  tabs:
30
55
  defaultNavigation: Default navigation
56
+ widgets:
57
+ roles:
58
+ inlineFileRights: Inline file rights
31
59
  pageflow_scrolled:
32
60
  editor:
33
61
  backdrop_effects:
62
+ autoZoom:
63
+ label: Auto Zoom
34
64
  blur:
35
65
  label: Blur
36
66
  brightness:
@@ -41,6 +71,8 @@ en:
41
71
  label: Grayscale
42
72
  saturate:
43
73
  label: Saturate
74
+ scrollParallax:
75
+ label: Scroll Parallax
44
76
  sepia:
45
77
  label: Sepia
46
78
  blank_entry:
@@ -61,14 +93,35 @@ en:
61
93
  caption:
62
94
  inline_help: The caption of the element will be displayed directly underneath the element.
63
95
  label: Caption
96
+ palette_color:
97
+ blank: "(Auto)"
64
98
  position:
65
- inline_help: 'This setting allows you to control the position of the element in relation to surrounding text blocks: the element can prominently stand alone ("Full Width"), it can be anchored within the text ("Inline") or it can be positioned adjacent to the text ("Sticky"). Sticky elements remain static in the middle of the viewport alongside the text until either the section is scrolled out of the viewport or until they get pushed upwards by the next sticky element of the section. On mobile devices sticky elements automatically get positioned inline. Sticky elements work particularly well on desktop devices in combination with long texts.'
99
+ inline_help: |-
100
+ Control the position of the element in relation to
101
+ surrounding text blocks.
102
+ item_inline_help_texts:
103
+ inline: |-
104
+ Anchor in the text and scroll along with the rest of the
105
+ section's content.
106
+ left: Indent element on the left and let it be surrounded by the section's text.
107
+ right: Indent element on the right and let it be surrounded by the section's text.
108
+ standAlone: |-
109
+ Briefly stay in the middle of the viewport while
110
+ scrolling. This gives the reader a stable position to
111
+ fully view the element. Smaller elements can be given
112
+ more weight that way.
113
+ sticky: |-
114
+ Place beside the text while scrolling. In mobile view,
115
+ sticky elements are automatically turned into inline
116
+ elements. Sticky elements work particularly well in
117
+ desktop view in combination with long text passages.
66
118
  label: Position
67
119
  values:
68
120
  full: Full Width
69
121
  inline: Inline
70
122
  left: Floated left
71
123
  right: Floated right
124
+ standAlone: Stand alone
72
125
  sticky: Sticky
73
126
  wide: Wide
74
127
  typographyVariant:
@@ -77,6 +130,12 @@ en:
77
130
  variant:
78
131
  blank: "(Default)"
79
132
  label: Variant
133
+ width:
134
+ inline_help: |-
135
+ Drag the slider to change the width of the element. Wider
136
+ elements interrupt the text flow and stand prominently on
137
+ their own.
138
+ label: Width
80
139
  content_element_categories:
81
140
  basic:
82
141
  name: Basic
@@ -89,6 +148,58 @@ en:
89
148
  media:
90
149
  name: Media
91
150
  content_elements:
151
+ counter:
152
+ attributes:
153
+ countingSpeed:
154
+ inline_help: Determine the speed of the counting animation.
155
+ label: Counting animation
156
+ values:
157
+ fast: Fast
158
+ medium: Medium
159
+ none: "(None)"
160
+ slow: Slow
161
+ decimalPlaces:
162
+ inline_help: Determine how many decimal places shall be visible.
163
+ label: Decimal places
164
+ entranceAnimation:
165
+ inline_help: Determine how the number becomes visible once it reaches the center of the viewport
166
+ label: Entrance Animation
167
+ values:
168
+ fadeIn: Fade in
169
+ fadeInFromAbove: Fade in from above
170
+ fadeInFromBelow: Fade in from below
171
+ fadeInScaleDown: Fade in and scale down
172
+ fadeInScaleUp: Fade in and scale up
173
+ none: "(None)"
174
+ numberColor:
175
+ label: Color
176
+ startValue:
177
+ inline_help: The counting animation starts with this value
178
+ label: Start value
179
+ targetValue:
180
+ inline_help: Value to display. Final value for counting animation.
181
+ label: Target value
182
+ textSize:
183
+ inline_help: Determine the font size of the number.
184
+ label: Text size
185
+ values:
186
+ large: Large
187
+ medium: Medium
188
+ small: Small
189
+ verySmall: Very small
190
+ unit:
191
+ inline_help: Display a text before or after the number.
192
+ label: Unit
193
+ unitPlacement:
194
+ inline_help: Place the unit before or after the text.
195
+ label: Unit placement
196
+ values:
197
+ leading: Leading ($100)
198
+ trailing: Trailing (100%)
199
+ description: Animated metrics
200
+ name: Counter
201
+ tabs:
202
+ general: Counter
92
203
  dataWrapperChart:
93
204
  attributes:
94
205
  backgroundColor:
@@ -137,6 +248,16 @@ en:
137
248
  attributes:
138
249
  children:
139
250
  label: Text
251
+ color:
252
+ label: Color
253
+ entranceAnimation:
254
+ inline_help: Determine how the heading becomes visible once it reaches the center of the viewport
255
+ label: Entrance Animation
256
+ values:
257
+ fadeIn: Fade in
258
+ fadeInFast: Fade in (Fast)
259
+ fadeInSlow: Fade in (Slow)
260
+ none: "(None)"
140
261
  hyphens:
141
262
  inline_help: |
142
263
  With manual hyphenation, words are only ever separated
@@ -198,6 +319,11 @@ en:
198
319
  portrait: Portrait (9:16)
199
320
  square: Square (1:1)
200
321
  wide: Landscape (16:9)
322
+ requireConsent:
323
+ inline_help: |
324
+ Only load iframe after the visitor has given
325
+ consent to the data processing by the embedded page.
326
+ label: Display privacy opt-in
201
327
  scale:
202
328
  label: Scale
203
329
  values:
@@ -211,9 +337,29 @@ en:
211
337
  inline_help: Used by screen readers to describe the chart as a whole.
212
338
  label: Title
213
339
  description: Embed externally hosted websites
340
+ help_texts:
341
+ missingConsentVendor: |-
342
+ No privacy policy information available for the provider
343
+ of the given URL.
214
344
  name: iframe Embed
215
345
  tabs:
216
346
  general: iframe Embed
347
+ imageGallery:
348
+ attributes:
349
+ enableFullscreenOnDesktop:
350
+ inline_help: |-
351
+ Allow expanding the gallery to fullscreen mode on
352
+ desktop browsers. On mobile devices images are already
353
+ displayed as large as possible by default.
354
+ inline_help_disabled: Not available if position "Full width" has been selected.
355
+ label: Enable fullscreen on desktop
356
+ description: A series of images to flip through
357
+ items:
358
+ add: Add
359
+ label: Items
360
+ name: Image Gallery
361
+ tabs:
362
+ general: Image Gallery
217
363
  inlineAudio:
218
364
  attributes:
219
365
  atmoDuringPlayback:
@@ -268,6 +414,10 @@ en:
268
414
  general: Before/After
269
415
  inlineImage:
270
416
  attributes:
417
+ enableFullscreen:
418
+ inline_help: Enlarge image on click
419
+ inline_help_disabled: Not available if position "Full width" has been selected.
420
+ label: Enable Fullscreen
271
421
  id:
272
422
  label: Image
273
423
  portraitId:
@@ -299,6 +449,17 @@ en:
299
449
  autoplay: Autoplay
300
450
  loop: Loop
301
451
  manual: Manual
452
+ portraitId:
453
+ inline_help: |
454
+ Displayed when the browser viewport is taller than
455
+ wide, for example on phones or tablets in portrait
456
+ orientation. Can be used to supply an alternative to a
457
+ landscape video that makes better use of the available
458
+ space.
459
+ label: Video (Portrait)
460
+ portraitPosterId:
461
+ inline_help: Poster image displayed for the alternative portrait video.
462
+ label: Poster (Portrait)
302
463
  posterId:
303
464
  label: Poster
304
465
  rewindOnUnmute:
@@ -323,12 +484,30 @@ en:
323
484
  name: Question/Answer
324
485
  tabs:
325
486
  general: Question/Answer
487
+ quote:
488
+ attributes:
489
+ color:
490
+ label: Color
491
+ textSize:
492
+ label: Text size
493
+ values:
494
+ large: Large
495
+ medium: Medium
496
+ small: Small
497
+ verySmall: Very Small
498
+ description: Stand-alone quote with attribution
499
+ name: Quote
500
+ tabs:
501
+ general: Quote
326
502
  soundDisclaimer:
327
503
  description: Make sure users unmute before continuing
328
504
  name: Audio Notice
329
505
  tabs:
330
506
  general: Audio Notice
331
507
  textBlock:
508
+ attributes:
509
+ color:
510
+ label: Color
332
511
  description: Text with lists, block quotes and sub-headings
333
512
  help_texts:
334
513
  shortcuts: |
@@ -463,6 +642,9 @@ en:
463
642
  video: Video
464
643
  backdropVideo:
465
644
  label: Background-Video
645
+ backdropVideoMobile:
646
+ inline_help: Displayed when the browser viewport is taller than wide, for example on phones or tablets in portrait orientation. Can be used to supply an alternative to a landscape background video that would otherwise have important parts cropped off.
647
+ label: Background-Video (Portrait)
466
648
  dynamicShadowOpacity:
467
649
  inline_help: Intensity of the shadow which is faded in behind the text to ensure contrast when content is scrolled to intersect with the motif area. Note that this shadow is only visible if motif area and section content do not fit side by side. It's best to switch to phone preview when adjusting this value.
468
650
  inline_help_disabled: Activate "Expose motif area" above to use this setting.
@@ -524,13 +706,25 @@ en:
524
706
  entry_outline:
525
707
  add_chapter: New chapter
526
708
  header: Outline
709
+ inline_file_rights_menu_item:
710
+ label: Hide rights information here
527
711
  insert_content_element:
528
712
  cancel: Cancel
529
713
  header: Insert element
530
714
  no_options: No options available
531
715
  section_item:
532
716
  drag_hint: Drag to move section
717
+ duplicate: Duplicate
718
+ insert_section_above: Insert section above
719
+ insert_section_below: Insert section below
533
720
  save_error: There was an error while saving this section.
721
+ transitions:
722
+ beforeAfter: Static Backgrounds
723
+ fade: Cross fade (incl. content)
724
+ fadeBg: Cross fade
725
+ reveal: Reveal
726
+ scroll: Scroll
727
+ scrollOver: Scroll over
534
728
  select_link_destination:
535
729
  cancel: Cancel
536
730
  create: Create
@@ -539,6 +733,9 @@ en:
539
733
  open_in_new_tab: Open in new tab
540
734
  or: or
541
735
  select_chapter_or_section: Select chapter or section as destination
736
+ select_file: Provide file download
737
+ select_file_description: Let readers download a file when they click the link.
738
+ select_in_sidebar: Select file
542
739
  selectable_chapter_item:
543
740
  title: Select chapter
544
741
  selectable_section_item:
@@ -546,7 +743,39 @@ en:
546
743
  help_entries:
547
744
  content_elements:
548
745
  menu_item: Content Elements
549
- text: "# Content Elements\nIn each section, any number of content elements can be inserted and positioned against a background. The position of the content elements on wide screen aspect ratios is determined by the foreground **positioning of the section** (left, right, centre). In portrait mode on smartphones (upright) the content elements are always displayed one below the other for space reasons.\n\n## Insert elements\nTo add a new content element, click on the **plus button** above or below an existing one and then insert text blocks, media, embeds or external links. \n\nBy clicking on the selected content element, a dialog box for **positioning the content elements** and other options, such as activating **autoplay for audio and video** or entering a caption, appears on the right-hand editing bar. \n\nFor display on wide screen aspect ratios (desktop, notebook, tablet, smartphone landscape), individual content elements such as videos, audios, video embeds, 360° images can also be arranged separately from the positioning in the text flow as **sticky** or **full width**. \n\nIf a section is aligned centrally, content elements can also be **indented to the left or right**. In this case, the content element is reduced in size so that the text can be displayed next to, instead of above the content element."
746
+ text: |
747
+ # Content Elements
748
+
749
+ In each section, any number of content elements can be
750
+ inserted and positioned against a background. The position
751
+ of the content elements on wide screen aspect ratios is
752
+ determined by the foreground **positioning of the section**
753
+ (left, right, center). In portrait mode on smartphones
754
+ (upright) the content elements are always displayed one
755
+ below the other for space reasons.
756
+
757
+ To add a new content element, click on the **plus button**
758
+ above or below an existing one and then insert text blocks,
759
+ media, embeds or external links.
760
+
761
+ Click on a content element to select it. The sidebar then
762
+ displays options for **positioning the content element** and
763
+ other options, such as activating **autoplay for audio and
764
+ video**.
765
+
766
+ For display on wide screen aspect ratios (desktop, notebook,
767
+ tablet, smartphone landscape), individual content elements
768
+ such as videos, audios, video embeds, 360° images can also
769
+ be arranged separately from the text flow as **sticky**
770
+ elements. Sticky elements remain static in the middle of the
771
+ viewport alongside the text until either the section is
772
+ scrolled out of the viewport or they get pushed upwards by
773
+ the next sticky element of the section.
774
+
775
+ If a section is aligned centrally, content elements can also
776
+ be **indented to the left or right**. In this case, the
777
+ content element is reduced in size so that the text can be
778
+ displayed next to, instead of below the content element."
550
779
  meta_data:
551
780
  menu_item: Title and Options
552
781
  text: |
@@ -624,6 +853,7 @@ en:
624
853
  menu_item: Section Options
625
854
  text: "# Section Options\n\nA click in an empty area of a section will display a selection rectangle around the section. On the right side of the selection rectangle you will find a button with a pencil icon that allows you to edit the options of the section in the sidebar.\n\n## Layout\n\nThe **Foreground Positioning** option allows you to select how the contents of the section should be arranged horizontally. For example, if the background of the section is on the right side, text and content elements can be positioned on the left side and vice versa. For backgrounds in the total or a centred motif, the content elements can be positioned in the middle.\n\nBy selecting a **gradient function**, a sufficient contrast between text and background can be ensured. With the **shadow**, the background is darkened or lightened with a colour gradient. With the **Card** setting, the content elements are displayed on a surface with rounded corners.\n\n## Background\n\nEither an **image**, a **colour** or a **video loop** can be displayed in the background of the section. For background images and video, the important (to be emphasised, essential) part of the image can be marked. This motif area is then initially not covered by the scrolling foreground in both desktop and mobile device displays. Further information about the \"motif areas\" here.\n\nThe **Background image (portrait)** option can be used to optionally specify an alternative image to be used if the screen aspect ratio of a terminal device is higher than wide, for example on smartphones and tablets in portrait mode. The image can be configured as an alternative to the background image in landscape mode, from which otherwise important parts might be cut off.\n\n## Atmo Audio\n\nWith the **\"Atmo\"**, each section can play sound in the background, regardless of the content element. It can be determined whether a sound can only be heard in one section or continues over several sections without interruption. Simply select the same audio file for the following sections under **Options** as Atmo. In this way chapters can be acoustically separated from each other and coherent pages can be interwoven more strongly.\n\nWhen playing audio and video, you can also select whether the background sound should continue to play normally or more quietly during media playback, or whether it should fade out completely. The setting of the ambience sounds can be accessed on each page via the **Options** tab. If the atmosphere disturbs you while editing your entry in the editor, you can temporarily mute it with the key combination **Alt + a**. To reactivate the Atmo, simply press **Alt + a** again.\n\n\n## Transitions\n\nA **transition effect** can be selected between every two sections. \nClick in the background of a section to select it. On the right side \nof the selection rectangle, buttons with two interlocking arrows as \nsymbols appear at the borders of the neighbouring sections. \n\nClick on one of the buttons to select the transition effect for the section \nborder in the sidebar.\n\nThe **Fade** effect is only available between sections for which the \n**Full Viewport Height** option has been activated.\n"
626
855
  inline_editing:
856
+ add_caption: Add caption
627
857
  add_content_element: Add new element
628
858
  cancel: Cancel
629
859
  drag_content_element: Drag to move element
@@ -648,6 +878,8 @@ en:
648
878
  insert_link: Insert link
649
879
  link_tooltip:
650
880
  chapter_number: Chapter %{number}
881
+ deleted_chapter: Deleted chapter
882
+ deleted_file: Deleted file
651
883
  opens_in_new_tab: Opens in new tab
652
884
  opens_in_same_tab: Outside editor, will open in same tab
653
885
  visit_chapter: Go to chapter
@@ -656,8 +888,13 @@ en:
656
888
  select_content_element: Select element
657
889
  select_section: Select section
658
890
  type_answer: Type answer text
891
+ type_attribution: Type a name
892
+ type_description: Type description
659
893
  type_heading: Heading
660
894
  type_question: Type question text
895
+ type_quote: Type quote text
896
+ type_subtitle: Type subtitle
897
+ type_tagline: Type tagline
661
898
  type_text: Type some text
662
899
  type_title: Title
663
900
  url_placeholder: Type or paste URL
@@ -11,6 +11,10 @@ PageflowScrolled::Engine.routes.draw do
11
11
  put :order
12
12
  end
13
13
 
14
+ member do
15
+ post :duplicate
16
+ end
17
+
14
18
  resources :content_elements do
15
19
  collection do
16
20
  put :batch
@@ -30,45 +30,79 @@ module PageflowScrolled
30
30
  end
31
31
 
32
32
  def install_packages
33
- run 'yarn add postcss-url@^8.0.0 @fontsource/source-sans-pro'
33
+ run 'yarn add css-loader style-loader' \
34
+ ' mini-css-extract-plugin css-minimizer-webpack-plugin' \
35
+ ' postcss postcss-preset-env postcss-loader' \
36
+ ' postcss-import postcss-url postcss-flexbugs-fixes' \
37
+ ' @fontsource/source-sans-pro'
34
38
  end
35
39
 
36
- def webpack_environment
37
- inject_into_file('config/webpack/environment.js',
38
- before: "module.exports = environment\n") do
39
- "environment.config.merge(require('pageflow/config/webpack'))\n" \
40
- "environment.config.merge(require('pageflow-scrolled/config/webpack'))\n\n" \
41
- "// Allow loading only chunks of used widgets. runtimeChunk 'single'\n" \
42
- "// ensures that modules are only evaluated once which is important\n" \
43
- "// for modules with side effects.\n" \
44
- "environment.splitChunks((config) =>\n" \
45
- " Object.assign({}, config, { optimization: { runtimeChunk: 'single' }})\n" \
46
- ")\n\n" \
47
- "// Opt into future default behavior of Webpacker [1] to work around\n" \
48
- "// problems with Video.js DASH service worker.\n" \
49
- "//\n" \
50
- "// [1] https://github.com/rails/webpacker/pull/2624\n" \
51
- "environment.loaders.delete('nodeModules')\n\n"
52
- end
53
- end
54
-
55
- def webpacker_yml
56
- gsub_file('config/webpacker.yml',
57
- 'extract_css: false',
58
- 'extract_css: true')
59
-
60
- inject_into_file('config/webpacker.yml',
61
- after: "- .woff2\n") do
62
- " - .mp3\n - .webmanifest\n - .xml\n"
63
- end
40
+ def webpack_config
41
+ gsub_file(
42
+ 'config/webpack/webpack.config.js',
43
+ "const { generateWebpackConfig } = require('shakapacker')",
44
+ "const { generateWebpackConfig, merge, mergeWithRules } = require('shakapacker')"
45
+ )
46
+
47
+ gsub_file(
48
+ 'config/webpack/webpack.config.js',
49
+ 'const webpackConfig = generateWebpackConfig()',
50
+ <<~JS
51
+ const webpackConfig = merge(
52
+ generateWebpackConfig({
53
+ resolve: {
54
+ extensions: ['.css']
55
+ }
56
+ }),
57
+ require('pageflow/config/webpack5'),
58
+ require('pageflow-scrolled/config/webpack')
59
+ )
60
+ JS
61
+ )
62
+
63
+ gsub_file(
64
+ 'config/webpack/webpack.config.js',
65
+ 'module.exports = webpackConfig',
66
+ <<~JS
67
+ // Extend file rule to include mp3 extension
68
+ module.exports = mergeWithRules({
69
+ module: {
70
+ rules: {
71
+ test: 'replace',
72
+ type: 'match'
73
+ },
74
+ },
75
+ })(webpackConfig, {
76
+ module: {
77
+ rules: [
78
+ {
79
+ test: /\.(bmp|gif|jpe?g|png|tiff|ico|avif|webp|eot|otf|ttf|woff|woff2|svg|mp3)$/,
80
+ type: 'asset/resource'
81
+ }
82
+ ]
83
+ }
84
+ })
85
+ JS
86
+ )
64
87
  end
65
88
 
66
89
  def postcss_config
67
- inject_into_file('postcss.config.js',
68
- after: "require('postcss-import'),\n") do
69
- " // Make relative urls in fontsource packages work\n" \
70
- " require('postcss-url')({url: 'rebase'}),\n"
71
- end
90
+ create_file 'postcss.config.js', <<~JS
91
+ module.exports = {
92
+ plugins: [
93
+ require('postcss-import'),
94
+ // Make relative urls in fontsource packages work
95
+ require('postcss-url')({url: 'rebase'}),
96
+ require('postcss-flexbugs-fixes'),
97
+ require('postcss-preset-env')({
98
+ autoprefixer: {
99
+ flexbox: 'no-2009'
100
+ },
101
+ stage: 3
102
+ })
103
+ ]
104
+ }
105
+ JS
72
106
  end
73
107
 
74
108
  def editor_pack
@@ -95,16 +129,7 @@ module PageflowScrolled
95
129
  create_file 'app/javascript/packs/pageflow-scrolled-server.js', <<-JS
96
130
  import 'pageflow-scrolled/frontend-server';
97
131
  import 'pageflow-scrolled/contentElements-frontend';
98
- import 'pageflow-scrolled/widgets/defaultNavigation';
99
- JS
100
- end
101
-
102
- def default_navigation_widget_packs
103
- widget_dir = 'app/javascript/packs/pageflow-scrolled/widgets'
104
-
105
- create_file File.join(widget_dir, 'defaultNavigation.js'), <<-JS
106
- import 'pageflow-scrolled/widgets/defaultNavigation';
107
- import 'pageflow-scrolled/widgets/defaultNavigation.css';
132
+ import 'pageflow-scrolled/widgets-server';
108
133
  JS
109
134
  end
110
135
 
@@ -27,7 +27,8 @@ module PageflowScrolled
27
27
  # @api private
28
28
  def paths_for_content_element_types(type_names)
29
29
  @packs.reject { |pack|
30
- (pack.content_element_type_names & type_names).empty?
30
+ pack.content_element_type_names.present? &&
31
+ (pack.content_element_type_names & type_names).empty?
31
32
  }.map(&:path)
32
33
  end
33
34
 
@@ -32,7 +32,7 @@ module PageflowScrolled
32
32
  entry.revision,
33
33
  content_element_type_names
34
34
  ),
35
- options
35
+ **options
36
36
  )
37
37
  end
38
38
 
@@ -44,12 +44,108 @@ module PageflowScrolled
44
44
  # @since 15.7
45
45
  attr_reader :additional_frontend_seed_data
46
46
 
47
+ # Determine which vendors a content element will require consent
48
+ # for. Based on the vendor name returned here, the following
49
+ # translations will be used in consent UI components.
50
+ #
51
+ # pageflow_scrolled.consent_vendors.#{name}.name
52
+ # pageflow_scrolled.consent_vendors.#{name}.description
53
+ # pageflow_scrolled.consent_vendors.#{name}.opt_in_prompt
54
+ #
55
+ # @example
56
+ #
57
+ # config.content_element_consent_vendors.register(
58
+ # lambda |configuration:| do
59
+ # if configuration['provider'] == 'youtube'
60
+ # 'youtube'
61
+ # else
62
+ # 'vimeo'
63
+ # end
64
+ # end,
65
+ # content_element_type_name: 'videoEmbed'
66
+ # )
67
+ #
68
+ # @return [ContentElementConsentVendors]
69
+ # @since 16.1
70
+ attr_reader :content_element_consent_vendors
71
+
72
+ # Mapping from URL hosts to consent vendor names. Used for iframe
73
+ # embed opt-in.
74
+ #
75
+ # @exmaple
76
+ #
77
+ # entry_type_config.consent_vendor_host_matchers = {
78
+ # /\.some-vendor\.com$/ => 'someVendor'
79
+ # }
80
+ #
81
+ # @return [Hash<RegExp, String>]
82
+ # @since 16.1
83
+ attr_accessor :consent_vendor_host_matchers
84
+
85
+ # Migrate typography variants to palette colors. Before palette
86
+ # colors for text blocks and headings were introduced, it was
87
+ # already possible to color text by defining typography variants
88
+ # that only differ by text color. Now that color can be configured
89
+ # independently, those typography variants have become
90
+ # redundant. This option allows mapping each of those legacy
91
+ # typography variants to a palette color and a different
92
+ # typography variant that does not change color. Legacy typography
93
+ # variants are not displayed in the editor typography variant list
94
+ # box. When an element that uses a legacy typography variant is
95
+ # selected in the editor, the typography variant and palette color
96
+ # from the mapping can be shown as currently selected instead. To
97
+ # make this work, the corresponding Backbome model needs to be
98
+ # wrapped using Entry#createLegacyTypographyVariantDelegator.
99
+ #
100
+ # @example
101
+ #
102
+ # config.themes.register(
103
+ # :custom,
104
+ # typography: {
105
+ # # Replaced by default variant and palette color
106
+ # 'textBlock-paragraph-accent' => {
107
+ # color: 'var(--theme-accent-color)'
108
+ # },
109
+ # 'textBlock-paragraph-lg' => {
110
+ # font_size: '28px',
111
+ # },
112
+ # # Replaced by lg variant and palette color
113
+ # 'textBlock-paragraph-lgAccent' => {
114
+ # font_size: '28px',
115
+ # color: 'var(--theme-accent-color)'
116
+ # },
117
+ # },
118
+ # properties: {
119
+ # root: {
120
+ # accent_color: '#e10028',
121
+ # palette_color_accent: 'var(--theme-accent-color)'
122
+ # }
123
+ # }
124
+ # )
125
+ #
126
+ # config.legacy_typography_variants = {
127
+ # 'accent' => {
128
+ # palette_color: 'accent'
129
+ # },
130
+ # 'lgAccent' => {
131
+ # variant: 'lg',
132
+ # palette_color: 'accent'
133
+ # }
134
+ # }
135
+ #
136
+ # @since 16.1
137
+ attr_accessor :legacy_typography_variants
138
+
47
139
  def initialize(*)
48
140
  super
49
141
  @additional_frontend_packs = AdditionalPacks.new
50
142
  @additional_editor_packs = AdditionalPacks.new
51
143
 
52
144
  @additional_frontend_seed_data = AdditionalSeedData.new
145
+ @content_element_consent_vendors = ContentElementConsentVendors.new
146
+ @consent_vendor_host_matchers = {}
147
+
148
+ @legacy_typography_variants = {}
53
149
  end
54
150
  end
55
151
  end