pageflow 16.1.0 → 16.2.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (108) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +70 -194
  3. data/README.md +6 -5
  4. data/app/assets/images/pageflow/admin/icons/published_with_noindex.svg +4 -0
  5. data/app/assets/javascripts/pageflow/dist/ui.js +1 -0
  6. data/app/assets/stylesheets/pageflow/admin/active_admin_patches.scss +1 -1
  7. data/app/assets/stylesheets/pageflow/admin/entries.scss +4 -0
  8. data/app/assets/stylesheets/pageflow/admin/publication_state_indicator.scss +4 -0
  9. data/app/assets/stylesheets/pageflow/editor/base.scss +0 -1
  10. data/app/assets/stylesheets/pageflow/editor/drop_down_button.scss +55 -6
  11. data/app/assets/stylesheets/pageflow/editor/file_meta_data.scss +12 -1
  12. data/app/assets/stylesheets/pageflow/ui/forms.scss +3 -3
  13. data/app/assets/stylesheets/pageflow/{editor/wysihtml5.scss → ui/input/text_area_input.scss} +13 -1
  14. data/app/assets/stylesheets/pageflow/ui.scss +1 -0
  15. data/app/controllers/pageflow/editor/entry_publications_controller.rb +5 -1
  16. data/app/controllers/pageflow/editor/file_import_controller.rb +1 -1
  17. data/app/controllers/pageflow/entries_controller.rb +2 -2
  18. data/app/helpers/pageflow/entries_helper.rb +2 -0
  19. data/app/helpers/pageflow/meta_tags_helper.rb +2 -1
  20. data/app/helpers/pageflow/page_types_helper.rb +4 -4
  21. data/app/helpers/pageflow/revision_file_helper.rb +3 -3
  22. data/app/helpers/pageflow/social_share_helper.rb +2 -2
  23. data/app/models/concerns/pageflow/entry_publication_states.rb +9 -0
  24. data/app/models/concerns/pageflow/uploadable_file.rb +5 -0
  25. data/app/models/pageflow/account.rb +2 -2
  26. data/app/models/pageflow/entry.rb +7 -5
  27. data/app/models/pageflow/entry_at_revision.rb +2 -0
  28. data/app/models/pageflow/image_file.rb +20 -5
  29. data/app/models/pageflow/image_file_url_templates.rb +7 -1
  30. data/app/models/pageflow/revision.rb +6 -4
  31. data/app/models/pageflow/site.rb +2 -2
  32. data/app/models/pageflow/sitemaps.rb +1 -0
  33. data/app/models/pageflow/used_file.rb +8 -0
  34. data/app/views/components/pageflow/admin/extensible_attributes_table.rb +1 -7
  35. data/app/views/components/pageflow/admin/revisions_tab.rb +8 -0
  36. data/app/views/pageflow/editor/config/_seeds.json.jbuilder +1 -0
  37. data/app/views/pageflow/editor/entries/_entry.json.jbuilder +1 -0
  38. data/app/views/pageflow/editor/entry_publications/check.json.jbuilder +1 -0
  39. data/app/views/pageflow/image_files/_image_file.json.jbuilder +1 -0
  40. data/app/views/pageflow/meta_tags/_entry.html.erb +1 -0
  41. data/config/initializers/features.rb +2 -0
  42. data/config/initializers/paperclip.rb +4 -0
  43. data/config/locales/de.yml +50 -0
  44. data/config/locales/en.yml +49 -0
  45. data/db/migrate/20231024062501_add_output_presences_to_image_files.rb +5 -0
  46. data/db/migrate/20231128124523_add_noindex_to_revisions.rb +5 -0
  47. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/editor.js +266 -151
  48. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/frontend.js +8 -2
  49. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-client.js +1 -1
  50. data/entry_types/paged/app/assets/javascripts/pageflow_paged/dist/react-server.js +1 -1
  51. data/entry_types/paged/app/controllers/pageflow_paged/entries_controller.rb +1 -1
  52. data/entry_types/paged/lib/pageflow_paged/engine.rb +7 -11
  53. data/entry_types/scrolled/app/controllers/pageflow_scrolled/entries_controller.rb +9 -3
  54. data/entry_types/scrolled/app/helpers/pageflow_scrolled/editor/seed_html_helper.rb +6 -6
  55. data/entry_types/scrolled/app/helpers/pageflow_scrolled/packs_helper.rb +21 -37
  56. data/entry_types/scrolled/app/helpers/pageflow_scrolled/themes_helper.rb +1 -3
  57. data/entry_types/scrolled/app/views/pageflow_scrolled/editor/entries/_head.html.erb +1 -6
  58. data/entry_types/scrolled/app/views/pageflow_scrolled/entries/show.html.erb +17 -17
  59. data/entry_types/scrolled/app/views/pageflow_scrolled/entry_json_seed/_entry.json.jbuilder +4 -0
  60. data/entry_types/scrolled/config/locales/de.yml +47 -11
  61. data/entry_types/scrolled/config/locales/en.yml +42 -10
  62. data/entry_types/scrolled/lib/generators/pageflow_scrolled/install/install_generator.rb +22 -89
  63. data/entry_types/scrolled/lib/pageflow_scrolled/additional_packs.rb +2 -1
  64. data/entry_types/scrolled/lib/pageflow_scrolled/engine.rb +8 -12
  65. data/entry_types/scrolled/lib/pageflow_scrolled/plugin.rb +6 -0
  66. data/entry_types/scrolled/lib/pageflow_scrolled/web_app_manifest.rb +1 -1
  67. data/entry_types/scrolled/lib/tasks/pageflow_scrolled/dummy.rake +1 -1
  68. data/entry_types/scrolled/package/config/webpack.js +26 -0
  69. data/entry_types/scrolled/package/contentElements-editor.js +36 -23
  70. data/entry_types/scrolled/package/contentElements-frontend.css +1 -1
  71. data/entry_types/scrolled/package/contentElements-frontend.js +250 -94
  72. data/entry_types/scrolled/package/editor.js +331 -147
  73. data/entry_types/scrolled/package/frontend/{EditableInlineText.module-fa9e3aff.js → EditableInlineText.module-6ee0e024.js} +463 -275
  74. data/entry_types/scrolled/package/frontend/{PhonePlatformContext-10a1d600.js → PhonePlatformContext-b28d991a.js} +1 -1
  75. data/entry_types/scrolled/package/frontend/{ToggleFullscreenCornerButton-727cce0d.js → ToggleFullscreenCornerButton-8242f213.js} +1 -1
  76. data/entry_types/scrolled/package/frontend/{Viewer-169e14ca.js → Viewer-32cd1ac1.js} +4 -4
  77. data/entry_types/scrolled/package/frontend/{Viewer-ee1aa590.js → Viewer-6e4d14ed.js} +4 -4
  78. data/entry_types/scrolled/package/frontend/{arrowRight-92a34ccc.js → arrowRight-e42e6011.js} +2 -2
  79. data/entry_types/scrolled/package/frontend/{components-4a09bfa3.js → components-24363f97.js} +7 -6
  80. data/entry_types/scrolled/package/frontend/{i18n-ddd92820.js → i18n-71c39823.js} +84 -46
  81. data/entry_types/scrolled/package/frontend/{index-02378634.js → index-fc4b13e6.js} +3 -3
  82. data/entry_types/scrolled/package/frontend/index.css +1 -1
  83. data/entry_types/scrolled/package/frontend/index.js +90 -66
  84. data/entry_types/scrolled/package/frontend/{useContentElementEditorState-63045393.js → useContentElementEditorState-245f1986.js} +1 -1
  85. data/entry_types/scrolled/package/package.json +4 -3
  86. data/entry_types/scrolled/package/testHelpers.js +4 -2
  87. data/entry_types/scrolled/package/widgets/defaultNavigation.css +2 -2
  88. data/entry_types/scrolled/package/widgets/defaultNavigation.js +39 -4
  89. data/entry_types/scrolled/package/widgets/iconInlineFileRights.css +1 -0
  90. data/entry_types/scrolled/package/widgets/iconInlineFileRights.js +49 -0
  91. data/entry_types/scrolled/package/widgets/textInlineFileRights.css +1 -0
  92. data/entry_types/scrolled/package/widgets/textInlineFileRights.js +37 -0
  93. data/lib/generators/pageflow/resque/templates/resque.rake +1 -1
  94. data/lib/generators/pageflow/resque/templates/resque.rb +1 -1
  95. data/lib/generators/pageflow/routes/routes_generator.rb +1 -1
  96. data/lib/pageflow/configuration.rb +8 -1
  97. data/lib/pageflow/engine.rb +15 -58
  98. data/lib/pageflow/page_type.rb +1 -1
  99. data/lib/pageflow/paperclip_processors/webp.rb +63 -0
  100. data/lib/pageflow/rails_version.rb +2 -2
  101. data/lib/pageflow/user_mixin.rb +1 -1
  102. data/lib/pageflow/version.rb +1 -1
  103. data/package/config/jest/index.js +3 -1
  104. data/package/editor.js +272 -154
  105. data/package/frontend.js +8 -2
  106. data/package/ui.js +1 -0
  107. data/spec/factories/entries.rb +17 -0
  108. metadata +78 -56
@@ -17,7 +17,7 @@ module PageflowPaged
17
17
 
18
18
  @entry.share_target =
19
19
  if params[:page].present?
20
- @entry.pages.find_by_perma_id(params[:page])
20
+ @entry.pages.find_by_perma_id(params[:page]) || @entry
21
21
  else
22
22
  @entry
23
23
  end
@@ -5,19 +5,15 @@ module PageflowPaged
5
5
  class Engine < ::Rails::Engine
6
6
  isolate_namespace PageflowPaged
7
7
 
8
- if Pageflow::RailsVersion.experimental?
9
- lib = root.join('lib')
8
+ lib = root.join('lib')
10
9
 
11
- config.autoload_paths << lib
12
- config.eager_load_paths << lib
10
+ config.autoload_paths << lib
11
+ config.eager_load_paths << lib
13
12
 
14
- initializer 'pageflow_paged.autoloading' do
15
- Rails.autoloaders.main.ignore(
16
- lib.join('tasks')
17
- )
18
- end
19
- else
20
- config.paths.add('lib', eager_load: true)
13
+ initializer 'pageflow_paged.autoloading' do
14
+ Rails.autoloaders.main.ignore(
15
+ lib.join('tasks')
16
+ )
21
17
  end
22
18
 
23
19
  config.i18n.load_path += Dir[config.root.join('config', 'locales', '**', '*.yml').to_s]
@@ -13,10 +13,16 @@ module PageflowScrolled
13
13
  helper FaviconHelper
14
14
 
15
15
  def show
16
- @entry = get_published_entry_from_env
17
- @widget_scope = get_entry_mode_from_env
16
+ entry = get_published_entry_from_env
18
17
 
19
- I18n.locale = @entry.locale
18
+ I18n.locale = entry.locale
19
+
20
+ render(
21
+ locals: {
22
+ entry: entry,
23
+ widget_scope: get_entry_mode_from_env
24
+ }
25
+ )
20
26
  end
21
27
  end
22
28
  end
@@ -15,12 +15,12 @@ module PageflowScrolled
15
15
  def scrolled_editor_iframe_seed_html_script_tag(entry)
16
16
  html = render(template: 'pageflow_scrolled/entries/show',
17
17
  locals: {
18
- :@entry => entry,
19
- :@widget_scope => :editor,
20
- :@skip_ssr => true,
21
- :@skip_structured_data => true,
22
- :@skip_feed_link_tags => true,
23
- :@seed_options => {
18
+ entry: entry,
19
+ widget_scope: :editor,
20
+ skip_ssr: true,
21
+ skip_structured_data: true,
22
+ skip_feed_link_tags: true,
23
+ seed_options: {
24
24
  skip_collections: true,
25
25
  include_unused_additional_seed_data: true,
26
26
  translations: {include_inline_editing: true}
@@ -2,61 +2,41 @@ module PageflowScrolled
2
2
  # @api private
3
3
  module PacksHelper
4
4
  def scrolled_frontend_javascript_packs_tag(entry, options)
5
- if defined?(Shakapacker)
6
- javascript_pack_tag(
7
- *scrolled_frontend_packs(entry, **options),
8
- defer: false
9
- )
10
- else
11
- javascript_packs_with_chunks_tag(
12
- *scrolled_frontend_packs(entry, **options)
13
- )
14
- end
5
+ javascript_pack_tag(
6
+ *scrolled_frontend_packs(entry, **options),
7
+ defer: false
8
+ )
15
9
  end
16
10
 
17
11
  def scrolled_frontend_stylesheet_packs_tag(entry, options)
18
- if defined?(Shakapacker)
19
- stylesheet_pack_tag(
20
- *scrolled_frontend_packs(entry, **options),
21
- media: 'all'
22
- )
23
- else
24
- stylesheet_packs_with_chunks_tag(
25
- *scrolled_frontend_packs(entry, **options),
26
- media: 'all'
27
- )
28
- end
12
+ stylesheet_pack_tag(
13
+ *scrolled_frontend_packs(entry, **options),
14
+ media: 'all'
15
+ )
29
16
  end
30
17
 
31
18
  def scrolled_editor_javascript_packs_tag(entry)
32
- if defined?(Shakapacker)
33
- javascript_pack_tag(
34
- *scrolled_editor_packs(entry),
35
- defer: false
36
- )
37
- else
38
- javascript_packs_with_chunks_tag(
39
- *scrolled_editor_packs(entry)
40
- )
41
- end
19
+ javascript_pack_tag(
20
+ *scrolled_editor_packs(entry),
21
+ defer: false
22
+ )
42
23
  end
43
24
 
44
25
  def scrolled_frontend_packs(entry, widget_scope:)
45
- widget_types = scrolled_frontend_pack_widget_types(entry, widget_scope)
46
-
47
26
  ['pageflow-scrolled-frontend'] +
48
- scrolled_frontend_content_element_packs(entry, widget_scope) +
49
- widget_types.map(&:pack)
27
+ scrolled_additional_frontend_packs(entry, widget_scope) +
28
+ scrolled_frontend_widget_type_packs(entry, widget_scope)
50
29
  end
51
30
 
52
31
  def scrolled_editor_packs(entry)
53
32
  ['pageflow-scrolled-editor'] +
54
- Pageflow.config_for(entry).additional_editor_packs.paths
33
+ Pageflow.config_for(entry).additional_editor_packs.paths +
34
+ scrolled_frontend_widget_type_packs(entry, :editor)
55
35
  end
56
36
 
57
37
  private
58
38
 
59
- def scrolled_frontend_content_element_packs(entry, widget_scope)
39
+ def scrolled_additional_frontend_packs(entry, widget_scope)
60
40
  additional_packs = Pageflow.config_for(entry).additional_frontend_packs
61
41
  return additional_packs.paths if widget_scope == :editor
62
42
 
@@ -68,6 +48,10 @@ module PageflowScrolled
68
48
  )
69
49
  end
70
50
 
51
+ def scrolled_frontend_widget_type_packs(entry, widget_scope)
52
+ scrolled_frontend_pack_widget_types(entry, widget_scope).map(&:pack)
53
+ end
54
+
71
55
  def scrolled_frontend_pack_widget_types(entry, widget_scope)
72
56
  if widget_scope == :editor
73
57
  ReactWidgetType.all_for(entry)
@@ -6,11 +6,9 @@ module PageflowScrolled
6
6
  theme_file_role: nil,
7
7
  theme_file_style: :resized,
8
8
  relative_url: false)
9
- prefix = defined?(Shakapacker) ? 'static' : 'media'
10
-
11
9
  path =
12
10
  theme.files.dig(theme_file_role, theme_file_style) ||
13
- asset_pack_path("#{prefix}/pageflow-scrolled/themes/#{theme.name}/#{path}")
11
+ asset_pack_path("static/pageflow-scrolled/themes/#{theme.name}/#{path}")
14
12
 
15
13
  if relative_url
16
14
  URI.parse(path).path
@@ -1,10 +1,5 @@
1
1
  <%= stylesheet_link_tag 'pageflow_paged/editor', media: 'all' %>
2
-
3
- <% if defined?(Shakapacker) %>
4
- <%= stylesheet_pack_tag 'pageflow-scrolled-frontend' %>
5
- <% else %>
6
- <%= stylesheet_packs_with_chunks_tag 'pageflow-scrolled-frontend' %>
7
- <% end %>
2
+ <%= stylesheet_pack_tag 'pageflow-scrolled-frontend' %>
8
3
 
9
4
  <%= scrolled_theme_properties_style_tag(entry.theme) %>
10
5
  <%= scrolled_theme_stylesheet_pack_tags(entry.theme) %>
@@ -1,26 +1,26 @@
1
- <%= cache_scrolled_entry(entry: @entry, widget_scope: @widget_scope) do %>
1
+ <%= cache_scrolled_entry(entry: entry, widget_scope: widget_scope) do %>
2
2
  <!DOCTYPE html>
3
- <%= content_tag(:html, lang: @entry.locale, dir: text_direction(@entry.locale)) do %>
3
+ <%= content_tag(:html, lang: entry.locale, dir: text_direction(entry.locale)) do %>
4
4
  <head>
5
- <title><%= pretty_entry_title(@entry) %></title>
5
+ <title><%= pretty_entry_title(entry) %></title>
6
6
 
7
7
  <meta charset="utf-8" />
8
8
  <meta name="viewport" content="width=device-width, height=device-height, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no">
9
9
 
10
10
 
11
- <%= social_share_meta_tags_for(@entry) %>
12
- <%= meta_tags_for_entry(@entry) %>
13
- <%= feed_link_tags_for_entry(@entry) unless @skip_feed_link_tags%>
11
+ <%= social_share_meta_tags_for(entry) %>
12
+ <%= meta_tags_for_entry(entry) %>
13
+ <%= feed_link_tags_for_entry(entry) unless local_assigns[:skip_feed_link_tags] %>
14
14
 
15
- <%= scrolled_favicons_for_entry(@entry, entry_mode: @widget_scope) %>
15
+ <%= scrolled_favicons_for_entry(entry, entry_mode: widget_scope) %>
16
16
 
17
17
  <%= javascript_include_tag 'pageflow_scrolled/legacy' %>
18
- <%= scrolled_frontend_stylesheet_packs_tag(@entry, widget_scope: @widget_scope) %>
18
+ <%= scrolled_frontend_stylesheet_packs_tag(entry, widget_scope: widget_scope) %>
19
19
 
20
- <%= scrolled_theme_properties_style_tag(@entry.theme) %>
21
- <%= scrolled_theme_stylesheet_pack_tags(@entry.theme) %>
20
+ <%= scrolled_theme_properties_style_tag(entry.theme) %>
21
+ <%= scrolled_theme_stylesheet_pack_tags(entry.theme) %>
22
22
 
23
- <%= render_widget_head_fragments(@entry, scope: @widget_scope) %>
23
+ <%= render_widget_head_fragments(entry, scope: widget_scope) %>
24
24
 
25
25
  <% if Rails.env.development? %>
26
26
  <script>
@@ -34,14 +34,14 @@
34
34
  </script>
35
35
  <% end %>
36
36
 
37
- <% ssr_html = @skip_ssr ? '' : render_scrolled_entry(@entry) %>
37
+ <% ssr_html = local_assigns[:skip_ssr] ? '' : render_scrolled_entry(entry) %>
38
38
 
39
- <% if !@skip_ssr && (params[:frontend] == 'v2' || @entry.feature_state('frontend_v2')) %>
39
+ <% if !local_assigns[:skip_ssr] && (params[:frontend] == 'v2' || entry.feature_state('frontend_v2')) %>
40
40
  <%= generated_media_queries_tags_for(ssr_html) %>
41
41
  <% end %>
42
42
  </head>
43
43
  <body>
44
- <%= structured_data_for_entry(@entry) unless @skip_structured_data %>
44
+ <%= structured_data_for_entry(entry) unless local_assigns[:skip_structured_data] %>
45
45
 
46
46
  <%= render 'pageflow_scrolled/entries/global_notices' %>
47
47
 
@@ -49,13 +49,13 @@
49
49
  <div id="root"><%= ssr_html %></div>
50
50
 
51
51
  <div id='template-widget-container'>
52
- <%= render_widgets(@entry, scope: @widget_scope, insert_point: :bottom_of_entry) %>
52
+ <%= render_widgets(entry, scope: widget_scope, insert_point: :bottom_of_entry) %>
53
53
  </div>
54
54
 
55
55
  <%= scrolled_webpack_public_path_script_tag %>
56
- <%= scrolled_frontend_javascript_packs_tag(@entry, widget_scope: @widget_scope) %>
56
+ <%= scrolled_frontend_javascript_packs_tag(entry, widget_scope: widget_scope) %>
57
57
 
58
- <%= scrolled_entry_json_seed_script_tag(@entry, @seed_options || {}) %>
58
+ <%= scrolled_entry_json_seed_script_tag(entry, local_assigns[:seed_options] || {}) %>
59
59
  </body>
60
60
  <% end %>
61
61
  <% end %>
@@ -42,6 +42,10 @@ json.config do
42
42
 
43
43
  json.partial! 'pageflow_scrolled/entry_json_seed/consent_vendors',
44
44
  entry: entry, entry_config: entry_config
45
+
46
+ json.file_licenses(
47
+ I18n.t('pageflow.file_licenses', default: {}).slice(*entry_config.available_file_licenses)
48
+ )
45
49
  end
46
50
 
47
51
  unless options[:skip_i18n]
@@ -41,17 +41,26 @@ de:
41
41
  feature_name: Frontend v2
42
42
  hls_instead_of_dash:
43
43
  feature_name: HLS statt DASH für Videos verwenden
44
+ iconInlineFileRights:
45
+ widget_type_name: Copyright-Icons
44
46
  iframe_embed_content_element:
45
47
  feature_name: iframe-Embed Inhaltselement
46
48
  scrolled_entry_fragment_caching:
47
49
  feature_name: Pageflow-Next-Fragment-Caching
50
+ textInlineFileRights:
51
+ widget_type_name: Text am Element
48
52
  ui:
49
53
  configuration_editor:
50
54
  tabs:
51
55
  defaultNavigation: Standard Navigation
56
+ widgets:
57
+ roles:
58
+ inlineFileRights: Inline-Datei-Rechte
52
59
  pageflow_scrolled:
53
60
  editor:
54
61
  backdrop_effects:
62
+ autoZoom:
63
+ label: Auto-Zoom
55
64
  blur:
56
65
  label: Unschärfe
57
66
  brightness:
@@ -62,6 +71,8 @@ de:
62
71
  label: Graustufen
63
72
  saturate:
64
73
  label: Sättigung
74
+ scrollParallax:
75
+ label: Scroll-Parallax
65
76
  sepia:
66
77
  label: Sepia
67
78
  blank_entry:
@@ -87,23 +98,36 @@ de:
87
98
  position:
88
99
  inline_help: |-
89
100
  Mit dieser Einstellung kannst du die Position des Elements
90
- im Zusammenspiel mit Fließtext steuern: Das Element kann
91
- im Text verankert werden ("Im Textfluss") oder beim
92
- Scrollen begleitend neben dem Text stehenbleiben
93
- ("Sticky"). Sticky-Elemente bleiben statisch in der Mitte
94
- des Viewports neben dem Text stehen, bis entweder der
95
- Abschnitt aus dem Viewport gescrollt wird oder sie vom
96
- nächsten Sticky-Element des Abschnitts verdrängt
97
- werden. In Mobil-Darstellung werden Sticky Elemente
98
- automatisch im Text verankert. Sticky-Elemente
99
- funktionieren besonders gut bei Desktop-Darstellung in
100
- Kombination mit langen Textpassagen.
101
+ im Zusammenspiel mit Fließtext steuern.
102
+ item_inline_help_texts:
103
+ inline: |-
104
+ Im Text verankern und zusammen mit dem übrigen Inhalt
105
+ des Abschnitts scrollen.
106
+ left: |-
107
+ Element links einrücken und vom Text des Abschnitts
108
+ umfließen lassen.
109
+ right: |-
110
+ Element rechts einrücken und vom Text des Abschnitts
111
+ umfließen lassen.
112
+ standAlone: |-
113
+ Beim Scrollen kurz in der Mitte des Viewports
114
+ stehenbleiben. Dies gibt dem Leser eine stabile
115
+ Position, um das Element vollständig betrachten zu
116
+ können. Kleineren Elementen kann so mehr Gewicht
117
+ verliehen werden.
118
+ sticky: |-
119
+ Beim Scrollen begleitend neben dem Text
120
+ stehenbleiben. In der Mobil-Darstellung werden Sticky
121
+ Elemente automatisch im Text verankert. Sticky-Elemente
122
+ funktionieren besonders gut bei Desktop-Darstellung in
123
+ Kombination mit langen Textpassagen.
101
124
  label: Position
102
125
  values:
103
126
  full: Volle Breite
104
127
  inline: Im Textfluss
105
128
  left: Links eingerückt
106
129
  right: Rechts eingerückt
130
+ standAlone: Stand-Alone
107
131
  sticky: Sticky
108
132
  wide: Breit
109
133
  typographyVariant:
@@ -232,6 +256,14 @@ de:
232
256
  label: Text
233
257
  color:
234
258
  label: Farbe
259
+ entranceAnimation:
260
+ inline_help: Lege die Animation fest, mit der die Überschrift eingeblendet werden soll, wenn sie die Mitte des Viewports erreicht.
261
+ label: Eingangsanimation
262
+ values:
263
+ fadeIn: Einblenden
264
+ fadeInFast: Einblenden (Schnell)
265
+ fadeInSlow: Einblenden (Langsam)
266
+ none: "(Keine)"
235
267
  hyphens:
236
268
  inline_help: |
237
269
  Bei manueller Silbentrennung werden Worte nur an
@@ -683,6 +715,8 @@ de:
683
715
  entry_outline:
684
716
  add_chapter: Neues Kapitel
685
717
  header: Gliederung
718
+ inline_file_rights_menu_item:
719
+ label: Rechteangabe an dieser Stelle ausblenden
686
720
  insert_content_element:
687
721
  cancel: Abbrechen
688
722
  header: Element einfügen
@@ -1021,6 +1055,8 @@ de:
1021
1055
  type_heading: Überschrift
1022
1056
  type_question: Fragetext eingeben
1023
1057
  type_quote: Zitat eingeben
1058
+ type_subtitle: Untertitel eingeben
1059
+ type_tagline: Tagline eingeben
1024
1060
  type_text: Text eingeben
1025
1061
  type_title: Titel
1026
1062
  url_placeholder: URL eingeben oder einfügen
@@ -41,17 +41,26 @@ en:
41
41
  feature_name: Frontend v2
42
42
  hls_instead_of_dash:
43
43
  feature_name: Use HLS instead of DASH for videos
44
+ iconInlineFileRights:
45
+ widget_type_name: Copyright icons
44
46
  iframe_embed_content_element:
45
47
  feature_name: iframe embed content element
46
48
  scrolled_entry_fragment_caching:
47
49
  feature_name: Pageflow Next Fragment Caching
50
+ textInlineFileRights:
51
+ widget_type_name: Text at element
48
52
  ui:
49
53
  configuration_editor:
50
54
  tabs:
51
55
  defaultNavigation: Default navigation
56
+ widgets:
57
+ roles:
58
+ inlineFileRights: Inline file rights
52
59
  pageflow_scrolled:
53
60
  editor:
54
61
  backdrop_effects:
62
+ autoZoom:
63
+ label: Auto Zoom
55
64
  blur:
56
65
  label: Blur
57
66
  brightness:
@@ -62,6 +71,8 @@ en:
62
71
  label: Grayscale
63
72
  saturate:
64
73
  label: Saturate
74
+ scrollParallax:
75
+ label: Scroll Parallax
65
76
  sepia:
66
77
  label: Sepia
67
78
  blank_entry:
@@ -86,22 +97,31 @@ en:
86
97
  blank: "(Auto)"
87
98
  position:
88
99
  inline_help: |-
89
- This setting allows you to control the position of the
90
- element in relation to surrounding text blocks: it can be
91
- anchored within the text ("Inline") or positioned adjacent
92
- to the text ("Sticky"). Sticky elements remain static in
93
- the middle of the viewport alongside the text until either
94
- the section is scrolled out of the viewport or they get
95
- pushed upwards by the next sticky element of the
96
- section. On mobile devices sticky elements automatically
97
- get positioned inline. Sticky elements work particularly
98
- well on desktop devices in combination with long texts.
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.
99
118
  label: Position
100
119
  values:
101
120
  full: Full Width
102
121
  inline: Inline
103
122
  left: Floated left
104
123
  right: Floated right
124
+ standAlone: Stand alone
105
125
  sticky: Sticky
106
126
  wide: Wide
107
127
  typographyVariant:
@@ -230,6 +250,14 @@ en:
230
250
  label: Text
231
251
  color:
232
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)"
233
261
  hyphens:
234
262
  inline_help: |
235
263
  With manual hyphenation, words are only ever separated
@@ -678,6 +706,8 @@ en:
678
706
  entry_outline:
679
707
  add_chapter: New chapter
680
708
  header: Outline
709
+ inline_file_rights_menu_item:
710
+ label: Hide rights information here
681
711
  insert_content_element:
682
712
  cancel: Cancel
683
713
  header: Insert element
@@ -863,6 +893,8 @@ en:
863
893
  type_heading: Heading
864
894
  type_question: Type question text
865
895
  type_quote: Type quote text
896
+ type_subtitle: Type subtitle
897
+ type_tagline: Type tagline
866
898
  type_text: Type some text
867
899
  type_title: Title
868
900
  url_placeholder: Type or paste URL
@@ -30,20 +30,14 @@ module PageflowScrolled
30
30
  end
31
31
 
32
32
  def install_packages
33
- if defined?(Shakapacker)
34
- run 'yarn add css-loader style-loader' \
35
- ' mini-css-extract-plugin css-minimizer-webpack-plugin' \
36
- ' postcss postcss-preset-env postcss-loader' \
37
- ' postcss-import postcss-url postcss-flexbugs-fixes' \
38
- ' @fontsource/source-sans-pro'
39
- else
40
- run 'yarn add postcss-url@^8.0.0 @fontsource/source-sans-pro'
41
- end
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'
42
38
  end
43
39
 
44
40
  def webpack_config
45
- return unless defined?(Shakapacker)
46
-
47
41
  gsub_file(
48
42
  'config/webpack/webpack.config.js',
49
43
  "const { generateWebpackConfig } = require('shakapacker')",
@@ -92,65 +86,23 @@ module PageflowScrolled
92
86
  )
93
87
  end
94
88
 
95
- def webpack_environment
96
- return if defined?(Shakapacker)
97
-
98
- inject_into_file('config/webpack/environment.js',
99
- before: "module.exports = environment\n") do
100
- "environment.config.merge(require('pageflow/config/webpack'))\n" \
101
- "environment.config.merge(require('pageflow-scrolled/config/webpack'))\n\n" \
102
- "// Allow loading only chunks of used widgets. runtimeChunk 'single'\n" \
103
- "// ensures that modules are only evaluated once which is important\n" \
104
- "// for modules with side effects.\n" \
105
- "environment.splitChunks((config) =>\n" \
106
- " Object.assign({}, config, { optimization: { runtimeChunk: 'single' }})\n" \
107
- ")\n\n" \
108
- "// Opt into future default behavior of Webpacker [1] to work around\n" \
109
- "// problems with Video.js DASH service worker.\n" \
110
- "//\n" \
111
- "// [1] https://github.com/rails/webpacker/pull/2624\n" \
112
- "environment.loaders.delete('nodeModules')\n\n"
113
- end
114
- end
115
-
116
- def webpacker_yml
117
- return if defined?(Shakapacker)
118
-
119
- gsub_file('config/webpacker.yml',
120
- 'extract_css: false',
121
- 'extract_css: true')
122
-
123
- inject_into_file('config/webpacker.yml',
124
- after: "- .woff2\n") do
125
- " - .mp3\n - .webmanifest\n - .xml\n"
126
- end
127
- end
128
-
129
89
  def postcss_config
130
- if defined?(Shakapacker)
131
- create_file 'postcss.config.js', <<~JS
132
- module.exports = {
133
- plugins: [
134
- require('postcss-import'),
135
- // Make relative urls in fontsource packages work
136
- require('postcss-url')({url: 'rebase'}),
137
- require('postcss-flexbugs-fixes'),
138
- require('postcss-preset-env')({
139
- autoprefixer: {
140
- flexbox: 'no-2009'
141
- },
142
- stage: 3
143
- })
144
- ]
145
- }
146
- JS
147
- else
148
- inject_into_file('postcss.config.js',
149
- after: "require('postcss-import'),\n") do
150
- " // Make relative urls in fontsource packages work\n" \
151
- " require('postcss-url')({url: 'rebase'}),\n"
152
- end
153
- 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
154
106
  end
155
107
 
156
108
  def editor_pack
@@ -177,26 +129,7 @@ module PageflowScrolled
177
129
  create_file 'app/javascript/packs/pageflow-scrolled-server.js', <<-JS
178
130
  import 'pageflow-scrolled/frontend-server';
179
131
  import 'pageflow-scrolled/contentElements-frontend';
180
- import 'pageflow-scrolled/widgets/defaultNavigation';
181
- import 'pageflow-scrolled/widgets/consentBar';
182
- JS
183
- end
184
-
185
- def default_navigation_widget_packs
186
- widget_dir = 'app/javascript/packs/pageflow-scrolled/widgets'
187
-
188
- create_file File.join(widget_dir, 'defaultNavigation.js'), <<-JS
189
- import 'pageflow-scrolled/widgets/defaultNavigation';
190
- import 'pageflow-scrolled/widgets/defaultNavigation.css';
191
- JS
192
- end
193
-
194
- def consent_bar_widget_packs
195
- widget_dir = 'app/javascript/packs/pageflow-scrolled/widgets'
196
-
197
- create_file File.join(widget_dir, 'consentBar.js'), <<-JS
198
- import 'pageflow-scrolled/widgets/consentBar';
199
- import 'pageflow-scrolled/widgets/consentBar.css';
132
+ import 'pageflow-scrolled/widgets-server';
200
133
  JS
201
134
  end
202
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