maglevcms 3.0.0.beta2 → 3.0.0.beta3
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.
- checksums.yaml +4 -4
- data/app/assets/builds/maglev/tailwind.css +523 -11852
- data/app/assets/javascripts/maglev/editor/controllers/app/preview_notification_center_controller.js +1 -1
- data/app/assets/javascripts/maglev/editor/controllers/shared/submit_button_controller.js +29 -5
- data/app/assets/javascripts/maglev/editor/controllers/utils.js +16 -0
- data/app/assets/javascripts/maglev/editor/index.js +3 -43
- data/app/assets/javascripts/maglev/editor/patches/page_renderer_patch.js +47 -0
- data/app/assets/javascripts/maglev/editor/patches/turbo_delayed_streams.js +35 -0
- data/app/assets/javascripts/maglev/editor/patches/turbo_stream_patch.js +50 -0
- data/app/assets/stylesheets/maglev/application.css +0 -2
- data/app/assets/stylesheets/maglev/tailwind.css.erb +3 -1
- data/app/components/maglev/uikit/app_layout/topbar/logo_component.html.erb +1 -1
- data/app/components/maglev/uikit/app_layout/topbar/page_info_component.html.erb +1 -1
- data/app/components/maglev/uikit/dropdown_component/dropdown_controller.js +6 -1
- data/app/controllers/concerns/maglev/editor/errors_concern.rb +9 -9
- data/app/controllers/concerns/maglev/errors_concern.rb +17 -0
- data/app/controllers/maglev/application_controller.rb +1 -0
- data/app/controllers/maglev/site_controller.rb +15 -0
- data/app/helpers/maglev/application_helper.rb +20 -2
- data/app/models/maglev/page.rb +14 -0
- data/app/models/maglev/site.rb +5 -0
- data/app/services/maglev/fetch_site.rb +3 -1
- data/app/services/maglev/get_published_page_sections_service.rb +1 -1
- data/app/services/maglev/publish_service.rb +3 -0
- data/app/views/layouts/maglev/editor/_sidebar.html.erb +2 -1
- data/app/views/layouts/maglev/editor/_topbar.html.erb +6 -23
- data/app/views/layouts/maglev/editor/application.html.erb +1 -0
- data/app/views/layouts/maglev/editor/topbar/_page_info.html.erb +11 -0
- data/app/views/layouts/maglev/editor/topbar/_publish_button.html.erb +13 -0
- data/app/views/maglev/editor/publication/create.turbo_stream.erb +3 -1
- data/app/views/maglev/editor/section_blocks/update.turbo_stream.erb +9 -1
- data/app/views/maglev/editor/sections/update.turbo_stream.erb +9 -1
- data/app/views/maglev/errors/site_not_found.html.erb +33 -0
- data/config/editor_importmap.rb +3 -0
- data/config/routes.rb +3 -0
- data/db/migrate/20251116171603_add_published_at_to_sites_and_pages.rb +6 -0
- data/lib/maglev/engine.rb +1 -0
- data/lib/maglev/errors.rb +1 -0
- data/lib/maglev/version.rb +1 -1
- data/lib/tasks/maglev/tailwindcss.rake +1 -0
- metadata +10 -1
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
<%= turbo_stream.dispatch_event "section-block-#{@section_block.id}:persisted", payload: { lockVersion: @section_block.lock_version }.to_json %>
|
|
2
|
+
|
|
1
3
|
<%= turbo_stream.update 'page-layout-notification', method: 'morph' do %>
|
|
2
4
|
<%= render Maglev::Uikit::BadgeComponent.new(color: :green, icon_name: 'checkbox_circle', disappear_after: 3.seconds).with_content(flash.now[:notice]) %>
|
|
3
5
|
<% end %>
|
|
4
6
|
|
|
5
|
-
<%= turbo_stream.
|
|
7
|
+
<%= turbo_stream.update dom_id(current_maglev_page, 'topbar-page-info'), method: 'morph' do %>
|
|
8
|
+
<%= render 'layouts/maglev/editor/topbar/page_info' %>
|
|
9
|
+
<% end %>
|
|
10
|
+
|
|
11
|
+
<%= turbo_stream.update dom_id(current_maglev_page, 'topbar-publish-button'), method: 'morph' do %>
|
|
12
|
+
<%= render 'layouts/maglev/editor/topbar/publish_button' %>
|
|
13
|
+
<% end %>
|
|
@@ -1,5 +1,13 @@
|
|
|
1
|
+
<%= turbo_stream.dispatch_event "section-#{@section.id}:persisted", payload: { lockVersion: @section.lock_version }.to_json %>
|
|
2
|
+
|
|
1
3
|
<%= turbo_stream.update 'page-layout-notification', method: 'morph' do %>
|
|
2
4
|
<%= render Maglev::Uikit::BadgeComponent.new(color: :green, icon_name: 'checkbox_circle', disappear_after: 3.seconds).with_content(flash.now[:notice]) %>
|
|
3
5
|
<% end %>
|
|
4
6
|
|
|
5
|
-
<%= turbo_stream.
|
|
7
|
+
<%= turbo_stream.update dom_id(current_maglev_page, 'topbar-page-info'), method: 'morph' do %>
|
|
8
|
+
<%= render 'layouts/maglev/editor/topbar/page_info' %>
|
|
9
|
+
<% end %>
|
|
10
|
+
|
|
11
|
+
<%= turbo_stream.update dom_id(current_maglev_page, 'topbar-publish-button'), method: 'morph' do %>
|
|
12
|
+
<%= render 'layouts/maglev/editor/topbar/publish_button' %>
|
|
13
|
+
<% end %>
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
<html>
|
|
2
|
+
<head>
|
|
3
|
+
<title>Site not found</title>
|
|
4
|
+
<%= stylesheet_link_tag "maglev/application", "maglev/tailwind", "data-turbo-track": "reload" %>
|
|
5
|
+
<%= favicon_link_tag maglev_favicon_url %>
|
|
6
|
+
|
|
7
|
+
<style>
|
|
8
|
+
:root {
|
|
9
|
+
--editor-color-primary: <%= maglev_primary_hex_color %>;
|
|
10
|
+
--editor-color-primary-rgb: <%= maglev_primary_rgb_color.join(' ') %>;
|
|
11
|
+
}
|
|
12
|
+
</style>
|
|
13
|
+
</head>
|
|
14
|
+
<body>
|
|
15
|
+
<div class="flex flex-col items-center justify-center h-screen">
|
|
16
|
+
<div class="bg-white">
|
|
17
|
+
<div class="px-6 py-24 sm:py-32 lg:px-8">
|
|
18
|
+
<div class="mx-auto max-w-2xl text-center">
|
|
19
|
+
<div class="mb-4 flex justify-center"><%= image_tag 'maglev/logo.svg', class: 'w-18 h-18' %></div>
|
|
20
|
+
<h2 class="text-4xl font-semibold tracking-tight text-balance text-gray-900 sm:text-5xl">Your site doesn't exist yet.</h2>
|
|
21
|
+
<p class="mx-auto mt-6 max-w-xl text-lg/8 text-pretty text-gray-600">You should have missed a step in the installation process. That's ok, you can create your Maglevsite from here without using the CLI.</p>
|
|
22
|
+
<div class="mt-10 flex items-center justify-center gap-x-6">
|
|
23
|
+
<%= button_to "Create your site", site_path, class: maglev_button_classes(color: :primary) %>
|
|
24
|
+
<%= link_to 'https://docs.maglev.dev/quickstart/instructions-v3/', target: '_blank', class: maglev_button_classes(color: :secondary, size: :medium) do %>
|
|
25
|
+
See the documentation <span aria-hidden="true">→</span>
|
|
26
|
+
<% end %>
|
|
27
|
+
</div>
|
|
28
|
+
</div>
|
|
29
|
+
</div>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</body>
|
|
33
|
+
</html>
|
data/config/editor_importmap.rb
CHANGED
|
@@ -22,5 +22,8 @@ pin_all_from File.expand_path('../app/components/maglev/uikit', __dir__), under:
|
|
|
22
22
|
pin_all_from File.expand_path('../app/assets/javascripts/maglev/editor/controllers', __dir__),
|
|
23
23
|
under: 'maglev-controllers',
|
|
24
24
|
to: 'maglev/editor/controllers'
|
|
25
|
+
pin_all_from File.expand_path('../app/assets/javascripts/maglev/editor/patches', __dir__),
|
|
26
|
+
under: 'maglev-patches',
|
|
27
|
+
to: 'maglev/editor/patches'
|
|
25
28
|
|
|
26
29
|
pin 'editor', to: 'maglev/editor/index.js'
|
data/config/routes.rb
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
# rubocop:disable Metrics/BlockLength
|
|
4
4
|
Maglev::Engine.routes.draw do
|
|
5
|
+
# convenient route to create the site in development mode from the Maglev UI
|
|
6
|
+
resource :site, only: %i[create], controller: :site if Rails.env.local?
|
|
7
|
+
|
|
5
8
|
# Editor
|
|
6
9
|
namespace :editor do
|
|
7
10
|
root to: 'home#index'
|
data/lib/maglev/engine.rb
CHANGED
data/lib/maglev/errors.rb
CHANGED
data/lib/maglev/version.rb
CHANGED
|
@@ -26,6 +26,7 @@ namespace :maglev do
|
|
|
26
26
|
puts "[Maglev] Generating temporary Tailwind input file at: #{input_path}"
|
|
27
27
|
|
|
28
28
|
rendered_css = ERB.new(File.read(erb_input_path)).result
|
|
29
|
+
File.delete(input_path) if File.exist?(input_path)
|
|
29
30
|
File.write(input_path, rendered_css)
|
|
30
31
|
|
|
31
32
|
require 'bundler'
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: maglevcms
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 3.0.0.
|
|
4
|
+
version: 3.0.0.beta3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Didier Lafforgue
|
|
@@ -176,6 +176,9 @@ files:
|
|
|
176
176
|
- app/assets/javascripts/maglev/editor/controllers/uikit.js
|
|
177
177
|
- app/assets/javascripts/maglev/editor/controllers/utils.js
|
|
178
178
|
- app/assets/javascripts/maglev/editor/index.js
|
|
179
|
+
- app/assets/javascripts/maglev/editor/patches/page_renderer_patch.js
|
|
180
|
+
- app/assets/javascripts/maglev/editor/patches/turbo_delayed_streams.js
|
|
181
|
+
- app/assets/javascripts/maglev/editor/patches/turbo_stream_patch.js
|
|
179
182
|
- app/assets/stylesheets/maglev/application.css
|
|
180
183
|
- app/assets/stylesheets/maglev/tailwind.css.erb
|
|
181
184
|
- app/components/maglev/base_component.rb
|
|
@@ -352,6 +355,7 @@ files:
|
|
|
352
355
|
- app/controllers/concerns/maglev/back_action_concern.rb
|
|
353
356
|
- app/controllers/concerns/maglev/content_locale_concern.rb
|
|
354
357
|
- app/controllers/concerns/maglev/editor/errors_concern.rb
|
|
358
|
+
- app/controllers/concerns/maglev/errors_concern.rb
|
|
355
359
|
- app/controllers/concerns/maglev/fetchers_concern.rb
|
|
356
360
|
- app/controllers/concerns/maglev/flash_i18n_concern.rb
|
|
357
361
|
- app/controllers/concerns/maglev/json_concern.rb
|
|
@@ -378,6 +382,7 @@ files:
|
|
|
378
382
|
- app/controllers/maglev/editor/style_controller.rb
|
|
379
383
|
- app/controllers/maglev/page_preview_controller.rb
|
|
380
384
|
- app/controllers/maglev/published_page_preview_controller.rb
|
|
385
|
+
- app/controllers/maglev/site_controller.rb
|
|
381
386
|
- app/controllers/maglev/sitemap_controller.rb
|
|
382
387
|
- app/helpers/maglev/admin/sections/previews_helper.rb
|
|
383
388
|
- app/helpers/maglev/admin/themes_helper.rb
|
|
@@ -484,6 +489,8 @@ files:
|
|
|
484
489
|
- app/views/layouts/maglev/editor/_sidebar.html.erb
|
|
485
490
|
- app/views/layouts/maglev/editor/_topbar.html.erb
|
|
486
491
|
- app/views/layouts/maglev/editor/application.html.erb
|
|
492
|
+
- app/views/layouts/maglev/editor/topbar/_page_info.html.erb
|
|
493
|
+
- app/views/layouts/maglev/editor/topbar/_publish_button.html.erb
|
|
487
494
|
- app/views/maglev/editor/assets/_list.html.erb
|
|
488
495
|
- app/views/maglev/editor/assets/index.html.erb
|
|
489
496
|
- app/views/maglev/editor/combobox/collection_items/index.turbo_stream.erb
|
|
@@ -527,6 +534,7 @@ files:
|
|
|
527
534
|
- app/views/maglev/editor/shared/errors/stale_object_error.turbo_stream.erb
|
|
528
535
|
- app/views/maglev/editor/shared/errors/standard_error.turbo_stream.erb
|
|
529
536
|
- app/views/maglev/editor/style/edit.html.erb
|
|
537
|
+
- app/views/maglev/errors/site_not_found.html.erb
|
|
530
538
|
- app/views/maglev/sitemap/index.xml.builder
|
|
531
539
|
- config/client_importmap.rb
|
|
532
540
|
- config/editor_importmap.rb
|
|
@@ -566,6 +574,7 @@ files:
|
|
|
566
574
|
- db/migrate/20211203224112_add_open_graph_tags_to_pages.rb
|
|
567
575
|
- db/migrate/20220612092235_add_style_to_sites.rb
|
|
568
576
|
- db/migrate/20250929203214_create_maglev_sections_content_stores.rb
|
|
577
|
+
- db/migrate/20251116171603_add_published_at_to_sites_and_pages.rb
|
|
569
578
|
- exe/tailwind-cli
|
|
570
579
|
- lib/commands/maglev/change_site_locales_command.rb
|
|
571
580
|
- lib/commands/maglev/create_site_command.rb
|