alchemy_cms 7.4.6 → 8.0.0.a

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


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

Files changed (349) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +86 -0
  3. data/Gemfile +13 -6
  4. data/README.md +13 -5
  5. data/alchemy_cms.gemspec +14 -5
  6. data/app/assets/builds/alchemy/admin/page-select.css +1 -1
  7. data/app/assets/builds/alchemy/admin/print.css +1 -1
  8. data/app/assets/builds/alchemy/admin.css +2 -2
  9. data/app/assets/builds/alchemy/custom-properties.css +1 -1
  10. data/app/assets/builds/alchemy/welcome.css +1 -1
  11. data/app/assets/builds/tinymce/skins/content/alchemy/content.min.css +1 -1
  12. data/app/assets/builds/tinymce/skins/ui/alchemy/content.min.css +1 -0
  13. data/app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css +1 -1
  14. data/app/assets/config/alchemy_manifest.js +0 -2
  15. data/app/assets/images/alchemy/icons-sprite.svg +1 -0
  16. data/app/components/alchemy/admin/resource/applied_filter.rb +29 -0
  17. data/app/components/alchemy/admin/resource/checkbox_filter.rb +36 -0
  18. data/app/components/alchemy/admin/resource/datepicker_filter.rb +42 -0
  19. data/app/components/alchemy/admin/resource/select_filter.rb +43 -0
  20. data/app/components/alchemy/admin/toolbar_button.rb +5 -2
  21. data/app/components/alchemy/ingredients/number_view.rb +18 -0
  22. data/app/controllers/alchemy/admin/attachments_controller.rb +8 -15
  23. data/app/controllers/alchemy/admin/clipboard_controller.rb +2 -6
  24. data/app/controllers/alchemy/admin/elements_controller.rb +1 -1
  25. data/app/controllers/alchemy/admin/languages_controller.rb +1 -1
  26. data/app/controllers/alchemy/admin/pages_controller.rb +15 -15
  27. data/app/controllers/alchemy/admin/pictures_controller.rb +9 -5
  28. data/app/controllers/alchemy/admin/resources_controller.rb +16 -106
  29. data/app/controllers/alchemy/attachments_controller.rb +43 -14
  30. data/app/controllers/alchemy/messages_controller.rb +1 -1
  31. data/app/controllers/alchemy/pages_controller.rb +7 -2
  32. data/app/controllers/concerns/alchemy/admin/resource_filter.rb +92 -0
  33. data/app/decorators/alchemy/element_editor.rb +5 -48
  34. data/app/decorators/alchemy/ingredient_editor.rb +3 -53
  35. data/app/helpers/alchemy/admin/base_helper.rb +14 -84
  36. data/app/helpers/alchemy/admin/elements_helper.rb +4 -4
  37. data/app/helpers/alchemy/admin/pages_helper.rb +1 -1
  38. data/app/helpers/alchemy/base_helper.rb +0 -30
  39. data/app/helpers/alchemy/elements_block_helper.rb +0 -14
  40. data/app/helpers/alchemy/pages_helper.rb +1 -1
  41. data/{lib → app/helpers}/alchemy/resources_helper.rb +5 -45
  42. data/app/javascript/alchemy_admin/components/action.js +2 -0
  43. data/app/javascript/alchemy_admin/components/alchemy_html_element.js +3 -3
  44. data/app/javascript/alchemy_admin/components/datepicker.js +10 -2
  45. data/app/javascript/alchemy_admin/components/element_editor/delete_element_button.js +7 -7
  46. data/app/javascript/alchemy_admin/components/element_editor.js +1 -1
  47. data/app/javascript/alchemy_admin/components/index.js +1 -0
  48. data/app/javascript/alchemy_admin/components/remote_select.js +4 -1
  49. data/app/javascript/alchemy_admin/components/tags_autocomplete.js +5 -1
  50. data/app/javascript/alchemy_admin/components/tinymce.js +4 -2
  51. data/app/javascript/alchemy_admin/components/update_check.js +42 -0
  52. data/app/javascript/alchemy_admin/components/uploader/file_upload.js +15 -8
  53. data/app/javascript/alchemy_admin/components/uploader/progress.js +12 -6
  54. data/app/javascript/alchemy_admin/components/uploader.js +4 -2
  55. data/app/javascript/alchemy_admin/confirm_dialog.js +27 -57
  56. data/app/javascript/alchemy_admin/dirty.js +3 -2
  57. data/app/javascript/alchemy_admin/i18n.js +15 -16
  58. data/app/javascript/alchemy_admin/initializer.js +1 -49
  59. data/app/javascript/alchemy_admin/utils/ajax.js +51 -44
  60. data/app/javascript/alchemy_admin.js +3 -8
  61. data/app/models/alchemy/admin/filters/base.rb +38 -0
  62. data/app/models/alchemy/admin/filters/checkbox.rb +24 -0
  63. data/app/models/alchemy/admin/filters/datepicker.rb +53 -0
  64. data/app/models/alchemy/admin/filters/select.rb +70 -0
  65. data/app/models/alchemy/admin/resource_name.rb +27 -0
  66. data/app/models/alchemy/attachment.rb +51 -34
  67. data/app/models/alchemy/base_record.rb +2 -0
  68. data/app/models/alchemy/element/definitions.rb +1 -1
  69. data/app/models/alchemy/element/element_ingredients.rb +6 -6
  70. data/app/models/alchemy/element/presenters.rb +3 -12
  71. data/app/models/alchemy/element.rb +9 -27
  72. data/app/models/alchemy/element_definition.rb +160 -0
  73. data/app/models/alchemy/ingredient.rb +10 -43
  74. data/app/models/alchemy/ingredient_definition.rb +134 -0
  75. data/app/models/alchemy/ingredient_validator.rb +7 -3
  76. data/app/models/alchemy/ingredients/number.rb +19 -0
  77. data/app/models/alchemy/language.rb +0 -14
  78. data/app/models/alchemy/message.rb +3 -7
  79. data/app/models/alchemy/node.rb +1 -1
  80. data/app/models/alchemy/page/{page_layouts.rb → definitions.rb} +12 -19
  81. data/app/models/alchemy/page/fixed_attributes.rb +1 -1
  82. data/app/models/alchemy/page/page_elements.rb +13 -14
  83. data/app/models/alchemy/page/page_natures.rb +7 -7
  84. data/app/models/alchemy/page/page_scopes.rb +1 -1
  85. data/app/models/alchemy/page.rb +11 -33
  86. data/app/models/alchemy/page_definition.rb +115 -0
  87. data/app/models/alchemy/picture.rb +69 -79
  88. data/app/models/alchemy/picture_variant.rb +115 -5
  89. data/{lib → app/models}/alchemy/resource.rb +4 -18
  90. data/{lib → app/models}/alchemy/searchable_resource.rb +15 -0
  91. data/app/models/alchemy/site/layout.rb +5 -5
  92. data/app/models/alchemy/site.rb +0 -15
  93. data/app/models/alchemy/storage_adapter/active_storage/attachment_url.rb +41 -0
  94. data/app/models/alchemy/storage_adapter/active_storage/picture_url.rb +55 -0
  95. data/app/models/alchemy/storage_adapter/active_storage/preprocessor.rb +40 -0
  96. data/app/models/alchemy/storage_adapter/active_storage.rb +173 -0
  97. data/app/models/alchemy/{attachment/url.rb → storage_adapter/dragonfly/attachment_url.rb} +12 -12
  98. data/app/models/alchemy/{picture/url.rb → storage_adapter/dragonfly/picture_url.rb} +28 -12
  99. data/app/models/alchemy/{picture → storage_adapter/dragonfly}/preprocessor.rb +4 -4
  100. data/app/models/alchemy/storage_adapter/dragonfly.rb +183 -0
  101. data/app/models/alchemy/storage_adapter.rb +74 -0
  102. data/app/models/concerns/alchemy/picture_thumbnails.rb +19 -6
  103. data/app/serializers/alchemy/element_serializer.rb +0 -1
  104. data/app/services/alchemy/dragonfly_to_image_processing.rb +100 -0
  105. data/app/stylesheets/alchemy/_defaults.scss +3 -0
  106. data/app/stylesheets/alchemy/_extends.scss +69 -0
  107. data/app/{assets/stylesheets → stylesheets}/alchemy/_mixins.scss +36 -49
  108. data/app/stylesheets/alchemy/_variables.scss +5 -0
  109. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/archive.scss +20 -37
  110. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/base.scss +16 -14
  111. data/app/stylesheets/alchemy/admin/buttons.scss +160 -0
  112. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/clipboard.scss +2 -2
  113. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/dashboard.scss +13 -16
  114. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/dialogs.scss +23 -16
  115. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/elements.scss +150 -105
  116. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/errors.scss +5 -5
  117. data/app/stylesheets/alchemy/admin/filters.scss +58 -0
  118. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/flatpickr.scss +53 -60
  119. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/form_fields.scss +21 -7
  120. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/forms.scss +31 -19
  121. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/frame.scss +20 -16
  122. data/app/stylesheets/alchemy/admin/hints.scss +5 -0
  123. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/icons.scss +10 -1
  124. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/image_library.scss +10 -8
  125. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/images.scss +1 -1
  126. data/app/stylesheets/alchemy/admin/labels.scss +5 -0
  127. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/lists.scss +3 -3
  128. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/navigation.scss +61 -55
  129. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/nodes.scss +21 -18
  130. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/notices.scss +18 -18
  131. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/page-select.scss +2 -2
  132. data/app/stylesheets/alchemy/admin/pagination.scss +144 -0
  133. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/preview_window.scss +8 -6
  134. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/print.scss +1 -1
  135. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/resource_info.scss +8 -5
  136. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/search.scss +9 -6
  137. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/selects.scss +49 -37
  138. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/shoelace.scss +5 -6
  139. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/sitemap.scss +38 -33
  140. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/tables.scss +6 -4
  141. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/tags.scss +6 -4
  142. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/toolbar.scss +12 -6
  143. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/typography.scss +2 -2
  144. data/app/{assets/stylesheets → stylesheets}/alchemy/admin/upload.scss +7 -5
  145. data/app/stylesheets/alchemy/admin.scss +44 -0
  146. data/app/stylesheets/alchemy/custom-properties.css +244 -0
  147. data/app/stylesheets/alchemy/welcome.scss +75 -0
  148. data/app/{assets/stylesheets → stylesheets}/tinymce/skins/content/alchemy/content.scss +8 -9
  149. data/app/stylesheets/tinymce/skins/ui/alchemy/content.scss +1 -0
  150. data/app/{assets/stylesheets → stylesheets}/tinymce/skins/ui/alchemy/skin.scss +133 -136
  151. data/app/views/alchemy/admin/attachments/_files_list.html.erb +2 -2
  152. data/app/views/alchemy/admin/attachments/_overlay_file_list.html.erb +1 -1
  153. data/app/views/alchemy/admin/{elements/_clipboard_button.html.erb → clipboard/_button.html.erb} +3 -5
  154. data/app/views/alchemy/admin/clipboard/_update_nested_element_button.turbo_stream.erb +11 -0
  155. data/app/views/alchemy/admin/clipboard/clear.turbo_stream.erb +4 -0
  156. data/app/views/alchemy/admin/clipboard/index.html.erb +15 -13
  157. data/app/views/alchemy/admin/clipboard/insert.turbo_stream.erb +18 -0
  158. data/app/views/alchemy/admin/clipboard/remove.turbo_stream.erb +9 -0
  159. data/app/views/alchemy/admin/dashboard/info.html.erb +17 -31
  160. data/app/views/alchemy/admin/elements/_element.html.erb +4 -8
  161. data/app/views/alchemy/admin/elements/_form.html.erb +1 -1
  162. data/app/views/alchemy/admin/elements/_header.html.erb +1 -0
  163. data/app/views/alchemy/admin/elements/_toolbar.html.erb +4 -6
  164. data/app/views/alchemy/admin/elements/create.turbo_stream.erb +2 -1
  165. data/app/views/alchemy/admin/elements/index.html.erb +2 -2
  166. data/app/views/alchemy/admin/ingredients/_file_fields.html.erb +3 -16
  167. data/app/views/alchemy/admin/ingredients/_picture_fields.html.erb +0 -9
  168. data/app/views/alchemy/admin/languages/_form.html.erb +1 -1
  169. data/app/views/alchemy/admin/languages/_table.html.erb +1 -1
  170. data/app/views/alchemy/admin/languages/index.html.erb +5 -2
  171. data/app/views/alchemy/admin/layoutpages/index.html.erb +1 -12
  172. data/app/views/alchemy/admin/pages/_form.html.erb +2 -2
  173. data/app/views/alchemy/admin/pages/_page.html.erb +2 -3
  174. data/app/views/alchemy/admin/pages/_toolbar.html.erb +1 -15
  175. data/app/views/alchemy/admin/pages/index.html.erb +1 -1
  176. data/app/views/alchemy/admin/partials/_remote_search_form.html.erb +9 -12
  177. data/app/views/alchemy/admin/partials/_search_form.html.erb +4 -9
  178. data/app/views/alchemy/admin/pictures/_archive.html.erb +4 -7
  179. data/app/views/alchemy/admin/pictures/_archive_overlay.html.erb +2 -1
  180. data/app/views/alchemy/admin/pictures/_filter_and_size_bar.html.erb +1 -1
  181. data/app/views/alchemy/admin/pictures/index.html.erb +2 -7
  182. data/app/views/alchemy/admin/resources/_applied_filters.html.erb +8 -0
  183. data/app/views/alchemy/admin/resources/_filter_bar.html.erb +11 -21
  184. data/app/views/alchemy/admin/resources/_pagination.html.erb +6 -0
  185. data/app/views/alchemy/admin/resources/_per_page_select.html.erb +4 -2
  186. data/app/views/alchemy/admin/resources/_resource_table.html.erb +1 -1
  187. data/app/views/alchemy/admin/resources/_table_header.html.erb +1 -15
  188. data/app/views/alchemy/admin/sites/index.html.erb +5 -1
  189. data/app/views/alchemy/admin/styleguide/index.html.erb +8 -0
  190. data/app/views/alchemy/admin/tags/index.html.erb +1 -1
  191. data/app/views/alchemy/admin/tinymce/_setup.html.erb +7 -7
  192. data/app/{javascript/alchemy_admin/locales/en.js → views/alchemy/admin/translations/_en.js} +5 -2
  193. data/app/views/alchemy/admin/uploader/_button.html.erb +1 -1
  194. data/app/views/alchemy/admin/uploader/_setup.html.erb +4 -4
  195. data/app/views/alchemy/base/redirect.js.erb +1 -1
  196. data/app/views/alchemy/ingredients/_number_editor.html.erb +24 -0
  197. data/app/views/alchemy/no_index.html.erb +31 -0
  198. data/app/views/alchemy/welcome.html.erb +12 -10
  199. data/app/views/kaminari/alchemy/_first_page.html.erb +5 -3
  200. data/app/views/kaminari/alchemy/_last_page.html.erb +5 -3
  201. data/app/views/kaminari/alchemy/_next_page.html.erb +5 -3
  202. data/app/views/kaminari/alchemy/_paginator.html.erb +18 -13
  203. data/app/views/kaminari/alchemy/_prev_page.html.erb +5 -3
  204. data/app/views/layouts/alchemy/admin.html.erb +5 -9
  205. data/bun.lockb +0 -0
  206. data/bundles/remixicon.mjs +153 -0
  207. data/config/alchemy/config.yml +3 -2
  208. data/config/initializers/dragonfly.rb +0 -1
  209. data/config/initializers/mime_types.rb +1 -0
  210. data/config/locales/alchemy.en.yml +32 -14
  211. data/config/routes.rb +0 -2
  212. data/eslint.config.js +2 -1
  213. data/lib/alchemy/admin/preview_url.rb +4 -5
  214. data/lib/alchemy/cache_digests/template_tracker.rb +6 -9
  215. data/lib/alchemy/config_missing.rb +14 -0
  216. data/lib/alchemy/configuration/base_option.rb +24 -0
  217. data/lib/alchemy/configuration/boolean_option.rb +16 -0
  218. data/lib/alchemy/configuration/class_option.rb +15 -0
  219. data/lib/alchemy/configuration/class_set_option.rb +46 -0
  220. data/lib/alchemy/configuration/integer_list_option.rb +13 -0
  221. data/lib/alchemy/configuration/integer_option.rb +12 -0
  222. data/lib/alchemy/configuration/list_option.rb +22 -0
  223. data/lib/alchemy/configuration/regexp_option.rb +11 -0
  224. data/lib/alchemy/configuration/string_list_option.rb +13 -0
  225. data/lib/alchemy/configuration/string_option.rb +11 -0
  226. data/lib/alchemy/configuration.rb +115 -0
  227. data/lib/alchemy/configuration_methods.rb +3 -1
  228. data/lib/alchemy/configurations/default_language.rb +12 -0
  229. data/lib/alchemy/configurations/default_site.rb +10 -0
  230. data/lib/alchemy/configurations/format_matchers.rb +11 -0
  231. data/lib/alchemy/configurations/mailer.rb +16 -0
  232. data/lib/alchemy/configurations/main.rb +216 -0
  233. data/lib/alchemy/configurations/preview.rb +32 -0
  234. data/lib/alchemy/configurations/sitemap.rb +10 -0
  235. data/lib/alchemy/configurations/uploader.rb +34 -0
  236. data/lib/alchemy/engine.rb +65 -17
  237. data/lib/alchemy/hints.rb +3 -7
  238. data/lib/alchemy/on_page_layout.rb +2 -2
  239. data/lib/alchemy/propshaft/tinymce_asset.rb +15 -0
  240. data/lib/alchemy/seeder.rb +2 -2
  241. data/lib/alchemy/tasks/usage.rb +4 -4
  242. data/lib/alchemy/test_support/config_stubbing.rb +1 -7
  243. data/lib/alchemy/test_support/factories/attachment_factory.rb +13 -2
  244. data/lib/alchemy/test_support/factories/language_factory.rb +1 -1
  245. data/lib/alchemy/test_support/factories/page_factory.rb +2 -3
  246. data/lib/alchemy/test_support/factories/picture_factory.rb +30 -2
  247. data/lib/alchemy/test_support/factories/site_factory.rb +2 -2
  248. data/lib/alchemy/test_support/having_crop_action_examples.rb +2 -2
  249. data/lib/alchemy/test_support/having_picture_thumbnails_examples.rb +80 -26
  250. data/lib/alchemy/test_support/shared_ingredient_examples.rb +5 -5
  251. data/lib/alchemy/upgrader/.keep +0 -0
  252. data/lib/alchemy/upgrader/eight_zero.rb +14 -0
  253. data/lib/alchemy/upgrader.rb +33 -20
  254. data/lib/alchemy/version.rb +1 -1
  255. data/lib/alchemy.rb +192 -170
  256. data/lib/alchemy_cms.rb +1 -7
  257. data/lib/generators/alchemy/ingredient/ingredient_generator.rb +0 -3
  258. data/lib/generators/alchemy/install/files/_article.html.erb +6 -4
  259. data/lib/generators/alchemy/install/files/alchemy.en.yml +22 -3
  260. data/lib/generators/alchemy/install/files/application.html.erb +5 -0
  261. data/lib/generators/alchemy/install/install_generator.rb +5 -14
  262. data/lib/generators/alchemy/install/templates/alchemy.rb.tt +196 -0
  263. data/lib/generators/alchemy/install/templates/dragonfly.rb.tt +0 -1
  264. data/lib/generators/alchemy/install/templates/elements.yml.tt +3 -1
  265. data/lib/generators/alchemy/install/templates/menus.yml.tt +1 -1
  266. data/lib/generators/alchemy/install/templates/page_layouts.yml.tt +2 -2
  267. data/lib/generators/alchemy/page_layouts/page_layouts_generator.rb +2 -2
  268. data/lib/tasks/alchemy/assets.rake +14 -0
  269. data/lib/tasks/alchemy/upgrade.rake +12 -47
  270. data/vendor/javascript/tinymce.min.js +1 -1
  271. data/vitest.config.js +21 -0
  272. metadata +181 -180
  273. data/app/assets/builds/alchemy/admin/page-select.css.map +0 -1
  274. data/app/assets/builds/alchemy/admin/print.css.map +0 -1
  275. data/app/assets/builds/alchemy/admin.css.map +0 -1
  276. data/app/assets/builds/alchemy/custom-properties.css.map +0 -1
  277. data/app/assets/builds/alchemy/welcome.css.map +0 -1
  278. data/app/assets/builds/tinymce/skins/content/alchemy/content.min.css.map +0 -1
  279. data/app/assets/builds/tinymce/skins/ui/alchemy/skin.min.css.map +0 -1
  280. data/app/assets/javascripts/alchemy/admin.js +0 -10
  281. data/app/assets/stylesheets/alchemy/_defaults.scss +0 -3
  282. data/app/assets/stylesheets/alchemy/_deprecated_variables.scss +0 -45
  283. data/app/assets/stylesheets/alchemy/_deprecation.scss +0 -17
  284. data/app/assets/stylesheets/alchemy/_extends.scss +0 -62
  285. data/app/assets/stylesheets/alchemy/_variables.scss +0 -201
  286. data/app/assets/stylesheets/alchemy/admin/buttons.scss +0 -124
  287. data/app/assets/stylesheets/alchemy/admin/hints.scss +0 -5
  288. data/app/assets/stylesheets/alchemy/admin/labels.scss +0 -3
  289. data/app/assets/stylesheets/alchemy/admin/pagination.scss +0 -92
  290. data/app/assets/stylesheets/alchemy/admin.scss +0 -42
  291. data/app/assets/stylesheets/alchemy/custom-properties.css +0 -98
  292. data/app/assets/stylesheets/alchemy/welcome.scss +0 -57
  293. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.css +0 -711
  294. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.css +0 -705
  295. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.inline.min.css +0 -7
  296. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.min.css +0 -7
  297. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.css +0 -29
  298. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/content.mobile.min.css +0 -7
  299. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.css +0 -677
  300. data/app/assets/stylesheets/tinymce/skins/ui/alchemy/skin.mobile.min.css +0 -7
  301. data/app/controllers/alchemy/elements_controller.rb +0 -32
  302. data/app/models/alchemy/element/dom_id.rb +0 -31
  303. data/app/models/alchemy/picture/calculations.rb +0 -49
  304. data/app/models/alchemy/picture/transformations.rb +0 -115
  305. data/app/views/alchemy/admin/attachments/destroy.js.erb +0 -1
  306. data/app/views/alchemy/admin/clipboard/clear.js.erb +0 -3
  307. data/app/views/alchemy/admin/clipboard/insert.js.erb +0 -29
  308. data/app/views/alchemy/admin/clipboard/remove.js.erb +0 -10
  309. data/app/views/alchemy/admin/resources/_filter.html.erb +0 -12
  310. data/app/views/alchemy/admin/resources/_resource.html.erb +0 -34
  311. data/app/views/alchemy/admin/resources/_table.html.erb +0 -29
  312. data/app/views/alchemy/elements/show.html.erb +0 -1
  313. data/app/views/alchemy/elements/show.js.erb +0 -1
  314. data/app/views/alchemy/ingredients/_audio_view.html.erb +0 -1
  315. data/app/views/alchemy/ingredients/_boolean_view.html.erb +0 -1
  316. data/app/views/alchemy/ingredients/_datetime_view.html.erb +0 -3
  317. data/app/views/alchemy/ingredients/_file_view.html.erb +0 -4
  318. data/app/views/alchemy/ingredients/_headline_view.html.erb +0 -4
  319. data/app/views/alchemy/ingredients/_html_view.html.erb +0 -1
  320. data/app/views/alchemy/ingredients/_link_view.html.erb +0 -4
  321. data/app/views/alchemy/ingredients/_node_view.html.erb +0 -1
  322. data/app/views/alchemy/ingredients/_page_view.html.erb +0 -1
  323. data/app/views/alchemy/ingredients/_picture_view.html.erb +0 -4
  324. data/app/views/alchemy/ingredients/_richtext_view.html.erb +0 -3
  325. data/app/views/alchemy/ingredients/_select_view.html.erb +0 -1
  326. data/app/views/alchemy/ingredients/_text_view.html.erb +0 -4
  327. data/app/views/alchemy/ingredients/_video_view.html.erb +0 -3
  328. data/babel.config.js +0 -12
  329. data/config/initializers/assets.rb +0 -4
  330. data/lib/alchemy/config.rb +0 -114
  331. data/lib/alchemy/element_definition.rb +0 -73
  332. data/lib/alchemy/page_layout.rb +0 -73
  333. data/lib/alchemy/resource_filter.rb +0 -40
  334. data/lib/alchemy/upgrader/seven_point_four.rb +0 -26
  335. data/lib/alchemy/upgrader/seven_point_three.rb +0 -52
  336. data/lib/generators/alchemy/ingredient/templates/view.html.erb +0 -1
  337. data/lib/generators/alchemy/install/files/alchemy_admin.js +0 -1
  338. data/lib/generators/alchemy/install/files/all.js +0 -11
  339. data/lib/generators/alchemy/install/files/article.css +0 -25
  340. data/vendor/assets/images/remixicon.symbol.svg +0 -11
  341. /data/app/{assets/stylesheets → stylesheets}/alchemy/_fonts.scss +0 -0
  342. /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/attachment-select.scss +0 -0
  343. /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/attachments.scss +0 -0
  344. /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/flash.scss +0 -0
  345. /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/list_filter.scss +0 -0
  346. /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/node-select.scss +0 -0
  347. /data/app/{assets/stylesheets → stylesheets}/alchemy/admin/spinner.scss +0 -0
  348. /data/app/{assets/stylesheets → stylesheets}/tinymce/skins/skintool.json +0 -0
  349. /data/app/{assets/stylesheets → stylesheets}/tinymce/skins/ui/alchemy/fonts/tinymce-mobile.woff +0 -0
data/lib/alchemy_cms.rb CHANGED
@@ -7,16 +7,15 @@ require "alchemy"
7
7
  require "acts_as_list"
8
8
  require "action_view/dependency_tracker"
9
9
  require "active_model_serializers"
10
+ require "active_storage/engine"
10
11
  require "awesome_nested_set"
11
12
  require "cancan"
12
13
  require "dragonfly"
13
14
  require "gutentag"
14
15
  require "importmap-rails"
15
16
  require "kaminari"
16
- require "non_stupid_digest_assets"
17
17
  require "ransack"
18
18
  require "simple_form"
19
- require "sprockets/rails"
20
19
  require "turbo-rails"
21
20
  require "userstamp"
22
21
  require "view_component"
@@ -27,11 +26,9 @@ require_relative "alchemy/admin/locale"
27
26
  require_relative "alchemy/admin/preview_url"
28
27
  require_relative "alchemy/auth_accessors"
29
28
  require_relative "alchemy/cache_digests/template_tracker"
30
- require_relative "alchemy/config"
31
29
  require_relative "alchemy/configuration_methods"
32
30
  require_relative "alchemy/controller_actions"
33
31
  require_relative "alchemy/deprecation"
34
- require_relative "alchemy/element_definition"
35
32
  require_relative "alchemy/elements_finder"
36
33
  require_relative "alchemy/error_tracking"
37
34
  require_relative "alchemy/errors"
@@ -44,11 +41,8 @@ require_relative "alchemy/modules"
44
41
  require_relative "alchemy/name_conversions"
45
42
  require_relative "alchemy/on_page_layout"
46
43
  require_relative "alchemy/on_page_layout/callbacks_runner"
47
- require_relative "alchemy/page_layout"
48
44
  require_relative "alchemy/paths"
49
45
  require_relative "alchemy/permissions"
50
- require_relative "alchemy/resource"
51
- require_relative "alchemy/searchable_resource"
52
46
  require_relative "alchemy/tinymce"
53
47
  require_relative "alchemy/taggable"
54
48
  require_relative "alchemy/version"
@@ -24,9 +24,6 @@ module Alchemy
24
24
 
25
25
  def copy_templates
26
26
  @ingredient_editor_local = "#{file_name}_editor"
27
- @ingredient_view_local = "#{file_name}_view"
28
- @ingredient_view_component_class = "#{@class_name}View"
29
- template "view.html.erb", "#{@ingredients_view_path}/_#{file_name}_view.html.erb"
30
27
  template "editor.html.erb", "#{@ingredients_view_path}/_#{file_name}_editor.html.erb"
31
28
  end
32
29
 
@@ -1,7 +1,9 @@
1
1
  <%- cache(article) do -%>
2
- <%= element_view_for(article, tag: 'article') do |el| -%>
3
- <h2><%= el.render :headline %></h2>
4
- <%= el.render :picture, size: '1200x600' %>
5
- <%= el.render :text %>
2
+ <%= element_view_for(article, tag: "article", class: "w-full max-w-xl mx-auto bg-slate-100 shadow my-8 px-8 py-4 rounded") do |el| -%>
3
+ <%= el.render :headline, {}, class: "text-2xl font-bold my-4" %>
4
+ <%= el.render :picture %>
5
+ <div class="[&>p]:my-2 [&>h2]:font-bold [&>h2]:text-xl [&>h2]:my-4 [&>h3]:font-bold [&>h3]:my-2 [&>ul]:list-disc [&>ul]:ml-4 [&>p>a]:underline [&>p>code]:text-sm [&>p>code]:bg-gray-50 [&>p>code]:p-1 [&>p>code]:whitespace-nowrap">
6
+ <%= el.render :text %>
7
+ </div>
6
8
  <%- end -%>
7
9
  <%- end -%>
@@ -17,14 +17,33 @@ en:
17
17
  # Default texts for new ingredients created
18
18
  default_ingredient_texts:
19
19
  article_headline: "Welcome to your first Alchemy CMS page"
20
- article_text: '<p><strong>How to get started.</strong></p><p>First of all you should read about Alchemy and its architecture in the <a class="external" href="http://guides.alchemy-cms.com/alchemy_approach.html" target="_blank" data-link-target="blank">guidelines</a>.</p><p>The most important things to know about Alchemy are elements and page layouts.</p><p><span style="text-decoration: underline;"><strong>Elements:</strong></span></p><p>With Alchemy you can split pages into content parts, elements. These elements can be defined out of several base content types: ingredients. The ingredients are:</p><ul><li>Text - <em>A single line of text</em></li><li>Richtext - <em>A TinyMCE powered formatted text block</em></li><li>Picture - <em>A reference to an image</em></li><li>Html - <em>HTML embed code</em></li><li>Select - <em>A selection of values</em></li><li>Boolean - <em>A checkbox</em></li></ul><p>Elements get defined in a YAML file <strong>config/alchemy/elements.yml</strong></p><p><a class="external" href="http://guides.alchemy-cms.com/elements.html" target="_blank" data-link-target="blank">Read more about elements and how to define them in the guidelines.</a></p><p><span style="text-decoration: underline;"><strong>Page types:</strong></span></p><p>You can define several types of pages, called page layouts. You can assign elements to page layouts and control how elements and the page of a certain layout behave.</p><p>Page layouts get defined in a YAML file <strong>config/alchemy/page_layouts.yml</strong></p><p><a class="external" href="http://guides.alchemy-cms.com/page_layouts.html" target="_blank" data-link-target="blank">Read more about defining page layouts in the guidelines.</a></p>'
20
+ article_text: |
21
+ <h2>How to get started.</h2>
22
+ <p>First of all you should read about Alchemy and it's architecture <a class="external" href="https://guides.alchemy-cms.com/alchemy_approach.html" target="_blank" rel="noopener" data-link-target="blank">in the guidelines</a>.</p>
23
+ <p>The most important things to know about Alchemy are elements and page layouts.</p>
24
+ <h3>Elements:</h3>
25
+ <p>With Alchemy you can split pages into content parts, elements. These elements can be defined out of several base content types: ingredients. The ingredients are:</p>
26
+ <ul>
27
+ <li>Text - <em>A single line of text</em></li>
28
+ <li>Richtext - <em>A TinyMCE powered formatted text block</em></li>
29
+ <li>Picture - <em>A reference to an image</em></li>
30
+ <li>Html - <em>HTML embed code</em></li>
31
+ <li>Select - <em>A selection of values</em></li>
32
+ <li>Boolean - <em>A checkbox</em></li>
33
+ </ul>
34
+ <p>Elements get defined in <code>config/alchemy/elements.yml</code>.</p>
35
+ <p>Read more about elements and how to define them <a class="external" href="https://guides.alchemy-cms.com/elements.html" target="_blank" rel="noopener" data-link-target="blank">in the guidelines</a>.</p>
36
+ <h3>Page types:</h3>
37
+ <p>You can define several types of pages, called page layouts. You can assign elements to page layouts and control how elements and the page of a certain layout behave.</p>
38
+ <p>Page layouts get defined in <code>config/alchemy/page_layouts.yml</code>.</p>
39
+ <p>Read more about defining page layouts <a class="external" href="https://guides.alchemy-cms.com/page_layouts.html" target="_blank" rel="noopener" data-link-target="blank">in the guidelines</a>.</p>
21
40
 
22
41
  # Hint texts for elements
23
42
  element_hints:
24
- article: "This is a hint text for the article element. You can change this text in `config/locales/alchemy.en.yml`. Feel free to change it as you like, it's yours."
43
+ article: "This is a hint text for the article element. You can change this text in <code>config/locales/alchemy.en.yml</code>. Feel free to change it as you like, it's yours."
25
44
 
26
45
  # Hint texts for ingredients
27
46
  ingredient_hints:
28
47
  headline: "This is a single line of unformatable Text"
29
48
  picture: "Pictures are stored in the library. You can assign a picture multiple times throughout your site. Alchemy has an image cropper build right in."
30
- text: "This is a rich text block powered by TinyMCE editor. You can change the configuration of the editor. See http://guides.alchemy-cms.com/customize_tinymce.html"
49
+ text: "This is a rich text block powered by TinyMCE editor. You can change the configuration of the editor. See https://guides.alchemy-cms.com/customize_tinymce.html"
@@ -7,6 +7,11 @@
7
7
 
8
8
  <%= stylesheet_link_tag 'application', media: 'all', 'data-turbo-track': 'reload' %>
9
9
  <%= javascript_include_tag 'application', 'data-turbo-track': 'reload' %>
10
+ <!--
11
+ Inserted by Alchemy demo file installer.
12
+ You probably want to remove this and use your custom css.
13
+ -->
14
+ <script src="https://cdn.tailwindcss.com"></script>
10
15
  </head>
11
16
 
12
17
  <body>
@@ -53,18 +53,18 @@ module Alchemy
53
53
  install_tasks.inject_routes(options[:auto_accept])
54
54
  end
55
55
 
56
- def copy_config
57
- copy_file "#{gem_config_path}/config.yml", app_config_path.join("alchemy", "config.yml")
58
- end
59
-
60
56
  def copy_yml_files
61
57
  %w[elements page_layouts menus].each do |file|
62
58
  template "#{__dir__}/templates/#{file}.yml.tt", app_config_path.join("alchemy", "#{file}.yml")
63
59
  end
64
60
  end
65
61
 
62
+ def copy_config_rb
63
+ @default_config = Alchemy::Configurations::Main.new
64
+ template "#{__dir__}/templates/alchemy.rb.tt", app_config_path.join("initializers", "alchemy.rb")
65
+ end
66
+
66
67
  def install_assets
67
- copy_file "all.js", app_vendor_assets_path.join("javascripts", "alchemy", "admin", "all.js")
68
68
  copy_file "custom.css", app_assets_path.join("stylesheets/alchemy/admin/custom.css")
69
69
  end
70
70
 
@@ -72,15 +72,6 @@ module Alchemy
72
72
  return if options[:skip_demo_files]
73
73
 
74
74
  copy_file "application.html.erb", app_views_path.join("layouts", "application.html.erb")
75
- copy_file "article.css", app_assets_path.join("stylesheets", "alchemy", "elements", "_article.css")
76
-
77
- stylesheet_require = %(@import "alchemy/elements/article";\n)
78
- if File.exist?(app_assets_path.join("stylesheets", "application.css"))
79
- prepend_file app_assets_path.join("stylesheets", "application.css"), stylesheet_require
80
- else
81
- create_file app_assets_path.join("stylesheets", "application.css"), stylesheet_require
82
- end
83
-
84
75
  copy_file "_article.html.erb", app_views_path.join("alchemy", "elements", "_article.html.erb")
85
76
  copy_file "_standard.html.erb", app_views_path.join("alchemy", "page_layouts", "_standard.html.erb")
86
77
  copy_file "alchemy.en.yml", app_config_path.join("locales", "alchemy.en.yml")
@@ -0,0 +1,196 @@
1
+ Alchemy.configure do |config|
2
+ # == This is the global Alchemy configuration file
3
+ #
4
+
5
+ # === Auto Log Out Time
6
+ #
7
+ # The amount of time of inactivity in minutes after which the user is kicked out of his current session.
8
+ #
9
+ # NOTE: This is only active in production environments
10
+ #
11
+ # config.auto_logout_time = <%= @default_config.auto_logout_time.inspect %>
12
+
13
+ # === Page caching
14
+ #
15
+ # Enable/Disable page caching globally.
16
+ #
17
+ # NOTE: You can enable/disable page caching for single Alchemy::Definitions in the page_layout.yml file.
18
+ #
19
+ # config.cache_pages = <%= @default_config.cache_pages.inspect %>
20
+
21
+ # === Sitemap
22
+ #
23
+ # Alchemy creates a XML, Google compatible, sitemap for you.
24
+ #
25
+ # The url is: http://your-domain.tld/sitemap.xml
26
+ #
27
+ # ==== Config Options:
28
+ #
29
+ # show_root [Boolean] # Show language root page in sitemap?
30
+ # show_flag [Boolean] # Enables the Checkbox in Page#update overlay. So your customer can set the visibility of pages in the sitemap.
31
+ #
32
+ # config.sitemap.tap do |sitemap|
33
+ # sitemap.show_root = <%= @default_config.sitemap.show_root.inspect %>
34
+ # sitemap.show_flag = <%= @default_config.sitemap.show_flag.inspect %>
35
+ # end
36
+
37
+ # === Default items per page in admin views
38
+ #
39
+ # In Alchemy's Admin, change how many items you would get shown per page by Kaminari
40
+ # config.items_per_page = <%= @default_config.items_per_page %>
41
+
42
+ # === Preview window URL configuration
43
+ #
44
+ # By default Alchemy uses its internal page preview renderer,
45
+ # but you can configure it to be any URL instead.
46
+ #
47
+ # Basic Auth is supported.
48
+ #
49
+ # config.preview = {
50
+ # host: https://www.my-static-site.com
51
+ # auth:
52
+ # username: <%%= ENV["BASIC_AUTH_USERNAME"] %%>
53
+ # password: <%%= ENV["BASIC_AUTH_PASSWORD"] %%>
54
+ # }
55
+ # Preview config per site is supported as well.
56
+ #
57
+ # config.preview = {
58
+ # My site name:
59
+ # host: https://www.my-static-site.com
60
+ # auth:
61
+ # username: <%%= ENV["BASIC_AUTH_USERNAME"] %%>
62
+ # password: <%%= ENV["BASIC_AUTH_PASSWORD"] %%>
63
+ # }
64
+
65
+ # === Picture rendering settings
66
+ #
67
+ # Alchemy uses Dragonfly to render images. Settings for image rendering are specific to elements and are defined in elements.yml
68
+ #
69
+ # Example:
70
+ # - name: some_element
71
+ # ingredients:
72
+ # - role: some_picture
73
+ # type: Picture
74
+ # settings:
75
+ # hint: true
76
+ # crop: true # turns on image cropping
77
+ # size: '500x500' # image will be cropped to this size
78
+ #
79
+ # See http://markevans.github.com/dragonfly for further info.
80
+ #
81
+ # ==== Global Options:
82
+ #
83
+ # output_image_quality [Integer] # If image gets rendered as JPG or WebP this is the quality setting for it. (Default 85)
84
+ # preprocess_image_resize [String] # Use this option to resize images to the given size when they are uploaded to the image library. Downsizing example: '1000x1000>' (Default nil)
85
+ # image_output_format [String] # The global image output format setting. (Default +original+)
86
+ #
87
+ # NOTE: You can always override the output format in the settings of your ingredients in elements.yml, I.E. {format: 'gif'}
88
+ #
89
+ # config.output_image_quality = <%= @default_config.output_image_quality %>
90
+ # config.preprocess_image_resize = <%= @default_config.preprocess_image_resize.inspect %>
91
+ # config.image_output_format = <%= @default_config.image_output_format.inspect %>
92
+
93
+ # This is used by the seeder to create the default site.
94
+ # config.default_site.tap do |default_site|
95
+ # default_site.name = <%= @default_config.default_site.name.inspect %>
96
+ # default_site.host = <%= @default_config.default_site.host.inspect %>
97
+ # end
98
+
99
+ # This is the default language when seeding.
100
+ # config.default_language.tap do |default_language|
101
+ # default_language.code = <%= @default_config.default_language.code.inspect %>
102
+ # default_language.name = <%= @default_config.default_language.name.inspect %>
103
+ # default_language.page_layout = <%= @default_config.default_language.page_layout.inspect %>
104
+ # default_language.frontpage_name = <%= @default_config.default_language.frontpage_name.inspect %>
105
+ # end
106
+
107
+ # === Mailer Settings:
108
+ #
109
+ # To send emails via contact forms, you can create your form fields here and set which fields are to be validated.
110
+ #
111
+ # === Validating fields:
112
+ #
113
+ # Pass the field name as a symbol and a message_id (will be translated) to :validate_fields:
114
+ #
115
+ # ==== Options:
116
+ #
117
+ # page_layout_name: [String] # A +Alchemy::PageDefinition+ name. Used to render the contactform on a page with this layout.
118
+ # fields: [Array] # An Array of fieldnames.
119
+ # validate_fields: [Array] # An Array of fieldnames to be validated on presence.
120
+ #
121
+ # ==== Translating validation messages:
122
+ #
123
+ # The validation messages are passed through ::I18n.t so you can translate it in your language yml file.
124
+ #
125
+ # ==== Example:
126
+ #
127
+ # de:
128
+ # activemodel:
129
+ # attributes:
130
+ # alchemy/message:
131
+ # firstname: Vorname
132
+ #
133
+ # config.mailer.tap do |mailer|
134
+ # mailer.page_layout_name = <%= @default_config.mailer.page_layout_name.inspect %>
135
+ # mailer.forward_to_page = <%= @default_config.mailer.forward_to_page.inspect %>
136
+ # mailer.mail_success_page = <%= @default_config.mailer.mail_success_page.inspect %>
137
+ # mailer.mail_from = <%= @default_config.mailer.mail_from.inspect %>
138
+ # mailer.mail_to = <%= @default_config.mailer.mail_to.inspect %>
139
+ # mailer.subject = <%= @default_config.mailer.subject.inspect %>
140
+ # mailer.fields = <%= @default_config.mailer.fields.inspect %>
141
+ # mailer.validate_fields = <%= @default_config.mailer.validate_fields.inspect %>
142
+ # end
143
+
144
+ # === User roles
145
+ #
146
+ # You can add own user roles.
147
+ #
148
+ # Further documentation for the auth system used please visit:
149
+ #
150
+ # https://github.com/ryanb/cancan/wiki
151
+ #
152
+ # ==== Translating User roles
153
+ #
154
+ # Userroles can be translated inside your the language yml file under:
155
+ #
156
+ # alchemy:
157
+ # user_roles:
158
+ # rolename: Name of the role
159
+ #
160
+ # config.user_roles = <%= @default_config.user_roles.inspect %>
161
+
162
+ # === Uploader Settings
163
+ #
164
+ # upload_limit [Integer] # Set an amount of files upload limit of files which can be uploaded at once. Set 0 for unlimited.
165
+ # file_size_limit* [Integer] # Set a file size limit in mega bytes for a per file limit.
166
+ #
167
+ # *) Allow filetypes to upload. Pass * to allow all kind of files.
168
+ #
169
+ # config.uploader.tap do |uploader|
170
+ # uploader.upload_limit = <%= @default_config.uploader.upload_limit.inspect %>
171
+ # uploader.file_size_limit = <%= @default_config.uploader.file_size_limit.inspect %>
172
+ # uploader.allowed_filetypes.tap do |file_types|
173
+ # file_types.alchemy_attachments = <%= @default_config.uploader.allowed_filetypes.alchemy_attachments.inspect %>
174
+ # file_types.alchemy_pictures = <%= @default_config.uploader.allowed_filetypes.alchemy_pictures.inspect %>
175
+ # end
176
+ # end
177
+
178
+ # === Link Target Options
179
+ #
180
+ # Values for the link target selectbox inside the page link overlay.
181
+ # The value gets attached as a data-link-target attribute to the link.
182
+ #
183
+ # == Example:
184
+ #
185
+ # Open all links set to overlay inside an jQuery UI Dialog Window.
186
+ #
187
+ # jQuery(a[data-link-target="overlay"]).dialog();
188
+ #
189
+ # config.link_target_options = <%= @default_config.link_target_options.inspect %>
190
+
191
+ # The layout used for rendering the +alchemy/admin/pages#show+ action.
192
+ # config.admin_page_preview_layout = <%= @default_config.admin_page_preview_layout.inspect %>
193
+
194
+ # The sizes for the preview size select in the page editor.
195
+ # config.page_preview_sizes = <%= @default_config.page_preview_sizes.inspect %>
196
+ end
@@ -14,7 +14,6 @@
14
14
  Dragonfly.app(:alchemy_pictures).configure do
15
15
  dragonfly_url nil
16
16
  plugin :imagemagick
17
- plugin :svg
18
17
  secret "<%= SecureRandom.hex(32) %>"
19
18
  url_format "/pictures/:job/:basename.:ext"
20
19
 
@@ -8,12 +8,14 @@
8
8
  unique: true
9
9
  ingredients:
10
10
  - role: headline
11
- type: Text
11
+ type: Headline
12
12
  default: :article_headline
13
13
  hint: true
14
14
  - role: picture
15
15
  type: Picture
16
16
  hint: true
17
+ settings:
18
+ size: 1200x600
17
19
  - role: text
18
20
  type: Richtext
19
21
  default: :article_text
@@ -1,6 +1,6 @@
1
1
  # == In this configuration, you set up Alchemy's menu names.
2
2
  #
3
- # For further information please see http://guides.alchemy-cms.com/stable/menus.html
3
+ # For further information please see https://guides.alchemy-cms.com/
4
4
 
5
5
  <%- unless @options[:skip_demo_files] -%>
6
6
  - main_menu
@@ -1,9 +1,9 @@
1
1
  # == This file defines the page layouts for new pages.
2
2
  #
3
- # For further information please see http://guides.alchemy-cms.com/stable/page_layouts.html
3
+ # For further information please see https://guides.alchemy-cms.com/pages.html
4
4
 
5
5
  <%- unless @options[:skip_demo_files] -%>
6
- - name: <%= Alchemy::Config.get(:default_language)['page_layout'] %>
6
+ - name: <%= Alchemy.config.default_language.page_layout %>
7
7
  unique: true
8
8
  elements: [article]
9
9
  autogenerate: [article]
@@ -13,8 +13,8 @@ module Alchemy
13
13
  return unless @page_layouts
14
14
 
15
15
  @page_layouts.each do |page_layout|
16
- @page_layout_name = page_layout["name"].underscore
17
- conditional_template "layout.html.#{template_engine}", "#{page_layouts_dir}/_#{@page_layout_name}.html.#{template_engine}"
16
+ layout_name = page_layout.name.underscore
17
+ conditional_template "layout.html.#{template_engine}", "#{page_layouts_dir}/_#{layout_name}.html.#{template_engine}"
18
18
  end
19
19
  end
20
20
 
@@ -0,0 +1,14 @@
1
+ if Rake::Task.task_defined?("assets:precompile") && defined?(Propshaft)
2
+ Rake::Task["assets:precompile"].enhance do
3
+ manifest_path = Rails.application.config.assets.manifest_path
4
+ assets_path = Rails.root.join("public#{Rails.application.config.assets.prefix}")
5
+ manifest = JSON.parse(manifest_path.read)
6
+ manifest.select { |k| k.include?("tinymce/") }.each do |k, v|
7
+ Propshaft.logger.info "Copying #{v} to #{k}"
8
+ FileUtils.cp(
9
+ assets_path.join(v),
10
+ assets_path.join(k)
11
+ )
12
+ end
13
+ end
14
+ end
@@ -3,14 +3,16 @@
3
3
  require "alchemy/upgrader"
4
4
  require "alchemy/version"
5
5
 
6
+ Upgrader = Alchemy::Upgrader.new("8.0")
7
+
6
8
  namespace :alchemy do
7
9
  desc "Upgrades your app to AlchemyCMS v#{Alchemy::VERSION}."
8
10
  task upgrade: [
9
11
  "alchemy:upgrade:prepare",
10
- "alchemy:upgrade:7.3:run",
11
- "alchemy:upgrade:7.4:run"
12
+ "alchemy:upgrade:8.0:run"
12
13
  ] do
13
- Alchemy::Upgrader.display_todos
14
+ Upgrader.run_migrations
15
+ Upgrader.display_todos
14
16
  end
15
17
 
16
18
  namespace :upgrade do
@@ -22,58 +24,21 @@ namespace :alchemy do
22
24
 
23
25
  desc "Alchemy Upgrader: Prepares the database."
24
26
  task database: [
25
- "alchemy:install:migrations",
26
- "db:migrate"
27
+ "alchemy:install:migrations"
27
28
  ]
28
29
 
29
- desc "Alchemy Upgrader: Copy configuration file."
30
+ desc "Alchemy Upgrader: Update configuration file."
30
31
  task config: [:environment] do
31
- Alchemy::Upgrader.copy_new_config_file
32
- end
33
-
34
- desc "Upgrade Alchemy to v7.3"
35
- task "7.3" => [
36
- "alchemy:upgrade:prepare",
37
- "alchemy:upgrade:7.3:run"
38
- ] do
39
- Alchemy::Upgrader.display_todos
40
- end
41
-
42
- desc "Upgrade Alchemy to v7.4"
43
- task "7.4" => [
44
- "alchemy:upgrade:prepare",
45
- "alchemy:upgrade:7.4:run"
46
- ] do
47
- Alchemy::Upgrader.display_todos
48
- end
49
-
50
- namespace "7.3" do
51
- task "run" => [
52
- "alchemy:upgrade:7.3:remove_admin_stylesheets",
53
- "alchemy:upgrade:7.3:generate_custom_css_entrypoint"
54
- ] do
55
- Alchemy::Upgrader::SevenPointThree.show_resource_table_notice
56
- end
57
-
58
- desc "Remove alchemy admin stylesheets"
59
- task remove_admin_stylesheets: [:environment] do
60
- Alchemy::Upgrader::SevenPointThree.remove_admin_stylesheets
61
- end
62
-
63
- desc "Generate custom css entrypoint"
64
- task generate_custom_css_entrypoint: [:environment] do
65
- Alchemy::Upgrader::SevenPointThree.generate_custom_css_entrypoint
66
- end
32
+ Upgrader.update_config
67
33
  end
68
34
 
69
- namespace "7.4" do
35
+ namespace "8.0" do
70
36
  task "run" => [
71
- "alchemy:upgrade:7.4:update_custom_css_config"
37
+ "alchemy:upgrade:8.0:mention_alchemy_config_initializer"
72
38
  ]
73
39
 
74
- desc "Update custom alchemy admin stylesheet config"
75
- task update_custom_css_config: [:environment] do
76
- Alchemy::Upgrader::SevenPointFour.update_custom_css_config
40
+ task :mention_alchemy_config_initializer do
41
+ Upgrader.mention_alchemy_config_initializer
77
42
  end
78
43
  end
79
44
  end