spina 2.19.0 → 2.21.0
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/Rakefile +0 -2
- data/app/assets/builds/spina/tailwind.css +3338 -3725
- data/app/assets/config/spina/manifest.js +2 -2
- data/app/assets/javascripts/spina/application.js +1 -1
- data/app/assets/javascripts/spina/controllers/confetti_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/confirm_controller.js +2 -2
- data/app/assets/javascripts/spina/controllers/data_binding_controller.js +234 -1
- data/app/assets/javascripts/spina/controllers/form_controller.js +1 -2
- data/app/assets/javascripts/spina/controllers/hotkeys_controller.js +1 -1
- data/app/assets/javascripts/spina/controllers/navigation_controller.js +4 -4
- data/app/assets/javascripts/spina/controllers/reveal_controller.js +424 -1
- data/app/assets/javascripts/spina/controllers/sortable_controller.js +1 -2
- data/app/assets/javascripts/spina/libraries/canvas-confetti.js +1 -1
- data/app/assets/javascripts/spina/libraries/hotkeys.js +1 -1
- data/app/assets/javascripts/spina/libraries/sortablejs.js +1 -1
- data/app/assets/javascripts/spina/libraries/trix.js +1 -1
- data/app/assets/stylesheets/spina/application.tailwind.css +105 -62
- data/app/assets/stylesheets/spina/fonts-propshaft.css +114 -0
- data/app/components/spina/forms/switch_component.html.erb +2 -2
- data/app/components/spina/forms/trix_toolbar_component.html.erb +16 -33
- data/app/components/spina/media_picker/modal_component.html.erb +1 -1
- data/app/components/spina/media_picker/modal_component.rb +2 -2
- data/app/components/spina/pages/actions_component.html.erb +4 -4
- data/app/components/spina/pages/location_component.html.erb +2 -2
- data/app/components/spina/pages/new_page_button_component.html.erb +2 -2
- data/app/components/spina/pages/page_component.html.erb +1 -1
- data/app/components/spina/pages/page_component.rb +2 -2
- data/app/components/spina/pages/translations_component.html.erb +3 -3
- data/app/components/spina/pages/translations_component.rb +1 -1
- data/app/components/spina/user_interface/modal_component.html.erb +2 -2
- data/app/components/spina/user_interface/tab_link_component.rb +1 -1
- data/app/components/spina/user_interface/translations_component.html.erb +2 -2
- data/app/components/spina/user_interface/translations_component.rb +1 -1
- data/app/controllers/concerns/spina/current_spina_account.rb +1 -1
- data/app/controllers/spina/admin/page_select_options_controller.rb +1 -1
- data/app/controllers/spina/admin/resource_select_options_controller.rb +1 -1
- data/app/controllers/spina/application_controller.rb +1 -1
- data/app/helpers/spina/admin/pages_helper.rb +23 -4
- data/app/jobs/spina/replace_signed_id_job.rb +12 -9
- data/app/models/concerns/spina/attachable.rb +1 -1
- data/app/models/concerns/spina/translated_content.rb +1 -1
- data/app/models/spina/account.rb +2 -2
- data/app/models/spina/embeds/youtube.rb +1 -1
- data/app/models/spina/resource.rb +3 -1
- data/app/models/spina/setting.rb +2 -0
- data/app/presenters/spina/menu_presenter.rb +7 -12
- data/app/views/layouts/spina/admin/application.html.erb +9 -2
- data/app/views/spina/admin/embeds/new.html.erb +4 -4
- data/app/views/spina/admin/images/_image.html.erb +1 -1
- data/app/views/spina/admin/layout/edit.html.erb +2 -2
- data/app/views/spina/admin/move_pages/new.html.erb +2 -2
- data/app/views/spina/admin/navigation_items/_navigation_item.html.erb +5 -5
- data/app/views/spina/admin/pages/_form.html.erb +1 -1
- data/app/views/spina/admin/pages/_form_advanced.html.erb +1 -1
- data/app/views/spina/admin/pages/edit_template.html.erb +2 -2
- data/app/views/spina/admin/pages/index.html.erb +1 -1
- data/app/views/spina/admin/parts/image_collections/_fields.html.erb +1 -1
- data/app/views/spina/admin/parts/images/_form.html.erb +1 -1
- data/app/views/spina/admin/parts/page_links/_form.html.erb +2 -2
- data/app/views/spina/admin/parts/repeaters/_form.html.erb +1 -1
- data/app/views/spina/admin/parts/resource_links/_form.html.erb +1 -1
- data/app/views/spina/admin/parts/texts/_form.html.erb +2 -2
- data/app/views/spina/admin/settings/_wysiwyg_field.html.erb +3 -3
- data/app/views/spina/admin/shared/_navigation.html.erb +1 -1
- data/app/views/spina/admin/users/index.html.erb +2 -2
- data/app/views/spina/sitemaps/show.xml.builder +1 -1
- data/config/locales/de.yml +2 -0
- data/config/routes.rb +2 -2
- data/db/migrate/13_add_json_attributes_to_spina_accounts.rb +1 -1
- data/db/migrate/14_add_json_attributes_to_spina_pages.rb +1 -1
- data/db/migrate/15_add_slug_to_spina_resources.rb +1 -1
- data/db/migrate/18_change_default_spina_resources_slug.rb +9 -0
- data/db/migrate/7_create_spina_settings.rb +1 -1
- data/lib/generators/spina/tailwind_config_generator.rb +1 -1
- data/lib/generators/spina/templates/app/assets/stylesheets/spina/application.tailwind.css.tt +232 -0
- data/lib/generators/spina/templates/app/views/demo/shared/_languages.html.erb +2 -2
- data/lib/spina/engine.rb +1 -2
- data/lib/spina/railtie.rb +4 -1
- data/lib/spina/version.rb +1 -1
- data/lib/spina.rb +63 -83
- data/lib/tasks/install.rake +1 -1
- data/lib/tasks/tailwind.rake +2 -3
- metadata +17 -49
- data/app/assets/javascripts/spina/libraries/form-request-submit-polyfill.js +0 -1
- data/app/assets/javascripts/spina/libraries/form-request-submit-polyfill@2.0.0.js +0 -27
- data/app/assets/javascripts/spina/libraries/stimulus-data-bindings@1.3.2.js +0 -234
- data/app/assets/javascripts/spina/libraries/stimulus-reveal@1.4.2.js +0 -424
- data/lib/generators/spina/templates/app/assets/config/spina/tailwind.config.js.tt +0 -23
- /data/app/assets/stylesheets/spina/{fonts.css.erb → fonts-sprockets.css.erb} +0 -0
|
@@ -3,7 +3,7 @@ module Spina
|
|
|
3
3
|
source_root File.expand_path("../templates", __FILE__)
|
|
4
4
|
|
|
5
5
|
def create_tailwind_config_file
|
|
6
|
-
filename = "app/assets/
|
|
6
|
+
filename = "app/assets/stylesheets/spina/application.tailwind.css"
|
|
7
7
|
template filename
|
|
8
8
|
insert_into_file ".gitignore", <<~TEXT
|
|
9
9
|
|
|
@@ -0,0 +1,232 @@
|
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
/* Source paths */
|
|
4
|
+
<%= Spina.config.tailwind_content.map{|path| "@source \"#{path}\";"}.join("\n") %>
|
|
5
|
+
|
|
6
|
+
/* Plugins */
|
|
7
|
+
<%= Spina.config.tailwind_plugins.map{|plugin| "@plugin \"#{plugin}\";"}.join("\n") %>
|
|
8
|
+
|
|
9
|
+
@theme {
|
|
10
|
+
--font-body: "Metropolis";
|
|
11
|
+
|
|
12
|
+
--color-spina: #6865b4;
|
|
13
|
+
--color-spina-light: #797ab8;
|
|
14
|
+
--color-spina-dark: #3a3a70;
|
|
15
|
+
|
|
16
|
+
--animate-duration: 600ms;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
/* Configuration */
|
|
20
|
+
@layer base {
|
|
21
|
+
html {
|
|
22
|
+
@apply font-body;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
body {
|
|
26
|
+
background: #f5f5fa; /* Ever so slightly indigo bg */
|
|
27
|
+
@apply antialiased;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/* Disable tap highlight on iOS */
|
|
31
|
+
a,
|
|
32
|
+
button {
|
|
33
|
+
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/* Components */
|
|
38
|
+
@layer components {
|
|
39
|
+
/* Buttons */
|
|
40
|
+
.btn {
|
|
41
|
+
@apply flex items-center justify-center rounded-md border;
|
|
42
|
+
@apply h-9 px-4;
|
|
43
|
+
@apply text-sm font-medium leading-none whitespace-nowrap;
|
|
44
|
+
@apply transition-colors duration-200;
|
|
45
|
+
@apply cursor-pointer;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.btn-default {
|
|
49
|
+
@apply text-gray-700 bg-white shadow-xs border-gray-300;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.btn-default:hover {
|
|
53
|
+
@apply bg-gray-50;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.btn-default:active {
|
|
57
|
+
@apply shadow-inner bg-gray-100;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.btn-primary {
|
|
61
|
+
@apply bg-spina border-spina-dark text-white;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.btn-primary:hover {
|
|
65
|
+
@apply bg-spina-dark;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.btn-red {
|
|
69
|
+
@apply bg-red-500 border-red-500;
|
|
70
|
+
@apply text-white;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.btn.btn-red:hover {
|
|
74
|
+
@apply bg-red-600 border-red-600;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.btn.btn-red:active {
|
|
78
|
+
@apply bg-red-600 border-red-600 shadow-inner;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.btn-gray {
|
|
82
|
+
@apply border-gray-300;
|
|
83
|
+
@apply text-gray-800;
|
|
84
|
+
@apply bg-gray-300;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.btn-gray:hover {
|
|
88
|
+
@apply bg-gray-400/75 border-gray-400;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.btn-gray:active {
|
|
92
|
+
@apply bg-gray-400/75 border-gray-400 shadow-inner;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
.btn-green {
|
|
96
|
+
@apply bg-emerald-500;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
/* Forms */
|
|
100
|
+
.form-input,
|
|
101
|
+
.form-select {
|
|
102
|
+
/* @apply py-3 px-4; */
|
|
103
|
+
@apply text-gray-700;
|
|
104
|
+
@apply shadow-xs;
|
|
105
|
+
@apply transition duration-150 ease-in-out;
|
|
106
|
+
@apply border-gray-300;
|
|
107
|
+
@apply rounded-md;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.form-input::placeholder {
|
|
111
|
+
@apply text-gray-400;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.form-select {
|
|
115
|
+
@apply text-sm font-medium;
|
|
116
|
+
@apply pr-12;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
.form-select:focus {
|
|
120
|
+
@apply border-spina-light;
|
|
121
|
+
@apply ring-spina-light;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
.form-textarea {
|
|
125
|
+
@apply bg-white;
|
|
126
|
+
@apply text-gray-700;
|
|
127
|
+
@apply shadow-xs;
|
|
128
|
+
@apply transition duration-150 ease-in-out;
|
|
129
|
+
@apply border border-gray-300;
|
|
130
|
+
@apply rounded-md;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.form-input:focus {
|
|
134
|
+
@apply border-spina-light;
|
|
135
|
+
@apply ring-spina-light;
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
/* Modals */
|
|
139
|
+
|
|
140
|
+
.modal {
|
|
141
|
+
@apply flex items-center justify-center;
|
|
142
|
+
@apply fixed z-40 inset-0 h-full p-6;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.modal-window {
|
|
146
|
+
-webkit-backdrop-filter: blur(10px);
|
|
147
|
+
backdrop-filter: blur(10px);
|
|
148
|
+
@apply w-full max-w-lg overflow-hidden relative;
|
|
149
|
+
@apply bg-white/75 shadow-lg rounded-xl;
|
|
150
|
+
@apply border border-gray-400;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/* Trix */
|
|
154
|
+
trix-toolbar button[data-trix-active] {
|
|
155
|
+
@apply text-white bg-spina;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
trix-toolbar [data-trix-dialog] {
|
|
159
|
+
@apply hidden;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
trix-toolbar .trix-dialog {
|
|
163
|
+
@apply absolute;
|
|
164
|
+
@apply top-0;
|
|
165
|
+
@apply left-0;
|
|
166
|
+
@apply z-50;
|
|
167
|
+
@apply bg-white;
|
|
168
|
+
@apply rounded-lg;
|
|
169
|
+
@apply shadow-lg;
|
|
170
|
+
}
|
|
171
|
+
trix-toolbar [data-trix-dialog][data-trix-active] {
|
|
172
|
+
@apply block;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
trix-toolbar button[disabled] {
|
|
176
|
+
@apply bg-gray-100 text-gray-400;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
trix-editor [data-trix-mutable]:not(.attachment__captain-editor) {
|
|
180
|
+
@apply select-none;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
trix-editor figure.attachment {
|
|
184
|
+
@apply m-0 inline-block;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
trix-editor figure.attachment[data-trix-content-type="Spina::Image"] {
|
|
188
|
+
max-height: 150px;
|
|
189
|
+
max-width: 200px;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
trix-editor figure.attachment[data-trix-content-type="Spina::Image"] img {
|
|
193
|
+
@apply m-0 rounded-md object-contain;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
trix-editor
|
|
197
|
+
figure.attachment[data-trix-content-type="Spina::Image"]
|
|
198
|
+
[data-label]:after {
|
|
199
|
+
content: attr(data-label);
|
|
200
|
+
@apply italic text-gray-500 h-8 flex items-center px-2 mt-1 text-sm;
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
trix-editor figure[data-trix-mutable].attachment[data-trix-content-type="Spina::Image"] img {
|
|
204
|
+
@apply shadow-lg ring-3 ring-spina-light
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
trix-editor
|
|
208
|
+
figure[data-trix-mutable][data-trix-content-type="application/vnd+spina.embed+html"].attachment
|
|
209
|
+
> spina-embed {
|
|
210
|
+
@apply block;
|
|
211
|
+
@apply shadow-lg ring-3 ring-spina-light rounded-md;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
trix-editor figure .attachment__caption {
|
|
215
|
+
@apply hidden;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
trix-editor figure .attachment__toolbar {
|
|
219
|
+
@apply hidden;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
trix-editor [data-trix-mutable]::-moz-selection,
|
|
223
|
+
trix-editor [data-trix-cursor-target]::-moz-selection,
|
|
224
|
+
trix-editor [data-trix-mutable] ::-moz-selection {
|
|
225
|
+
background: none;
|
|
226
|
+
}
|
|
227
|
+
trix-editor [data-trix-mutable]::selection,
|
|
228
|
+
trix-editor [data-trix-cursor-target]::selection,
|
|
229
|
+
trix-editor [data-trix-mutable] ::selection {
|
|
230
|
+
background: none;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
<% if Spina.locales.size > 1 %>
|
|
1
|
+
<% if Spina.config.locales.size > 1 %>
|
|
2
2
|
<div id="languages">
|
|
3
|
-
<%= Spina.locales.map{|l| link_to_unless(l == I18n.locale, l.upcase, root_url(params: {locale: l}))}.join(' / ').html_safe %>
|
|
3
|
+
<%= Spina.config.locales.map{|l| link_to_unless(l == I18n.locale, l.upcase, root_url(params: {locale: l}))}.join(' / ').html_safe %>
|
|
4
4
|
</div>
|
|
5
5
|
<% end %>
|
data/lib/spina/engine.rb
CHANGED
|
@@ -11,7 +11,6 @@ require "attr_json"
|
|
|
11
11
|
require "view_component"
|
|
12
12
|
require "jsonapi/serializer"
|
|
13
13
|
require "browser"
|
|
14
|
-
require "sprockets/railtie"
|
|
15
14
|
|
|
16
15
|
module Spina
|
|
17
16
|
class Engine < ::Rails::Engine
|
|
@@ -22,7 +21,7 @@ module Spina
|
|
|
22
21
|
config.to_prepare do
|
|
23
22
|
unless Spina.config.disable_decorator_load
|
|
24
23
|
Dir.glob(Rails.root + "app/decorators/**/*_decorator.rb").each do |decorator|
|
|
25
|
-
|
|
24
|
+
Spina.deprecator.warn("using app/decorators is deprecated in favor of app/overrides. Read more about overriding Spina at spinacms.com/guides")
|
|
26
25
|
require_dependency(decorator)
|
|
27
26
|
end
|
|
28
27
|
end
|
data/lib/spina/railtie.rb
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
module Spina
|
|
2
2
|
class Railtie < Rails::Railtie
|
|
3
3
|
initializer "spina.assets.precompile" do |app|
|
|
4
|
-
|
|
4
|
+
if defined?(Sprockets)
|
|
5
|
+
# Sprockets configuration
|
|
6
|
+
app.config.assets.precompile += %w[spina/manifest]
|
|
7
|
+
end
|
|
5
8
|
end
|
|
6
9
|
|
|
7
10
|
initializer "spina.theme_reloader" do |app|
|
data/lib/spina/version.rb
CHANGED
data/lib/spina.rb
CHANGED
|
@@ -14,100 +14,80 @@ require "spina/embeds"
|
|
|
14
14
|
require "spina/embeds/trix_conversion"
|
|
15
15
|
|
|
16
16
|
module Spina
|
|
17
|
-
include ActiveSupport::Configurable
|
|
18
|
-
|
|
19
17
|
PARTS = []
|
|
20
18
|
PLUGINS = []
|
|
21
19
|
THEMES = []
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
:
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
# An importmap specifically meant for Spina
|
|
67
|
-
self.importmap = Importmap::Map.new
|
|
21
|
+
class Configuration
|
|
22
|
+
attr_accessor :api_key,
|
|
23
|
+
:api_path,
|
|
24
|
+
:authentication,
|
|
25
|
+
:backend_title,
|
|
26
|
+
:backend_path,
|
|
27
|
+
:importmap,
|
|
28
|
+
:frontend_parent_controller,
|
|
29
|
+
:disable_frontend_routes,
|
|
30
|
+
:disable_decorator_load,
|
|
31
|
+
:disable_current_account,
|
|
32
|
+
:locales,
|
|
33
|
+
:embedded_image_size,
|
|
34
|
+
:mailer_defaults,
|
|
35
|
+
:thumbnail_image_size,
|
|
36
|
+
:resource_pages_limit_value,
|
|
37
|
+
:party_pooper,
|
|
38
|
+
:tailwind_plugins,
|
|
39
|
+
:queues,
|
|
40
|
+
:transliterations
|
|
41
|
+
|
|
42
|
+
def initialize
|
|
43
|
+
@api_key = nil
|
|
44
|
+
@api_path = "api"
|
|
45
|
+
@authentication = "Spina::Authentication::Sessions"
|
|
46
|
+
@backend_title = "Spina CMS"
|
|
47
|
+
@backend_path = "admin"
|
|
48
|
+
@disable_frontend_routes = false
|
|
49
|
+
@disable_decorator_load = false
|
|
50
|
+
@disable_current_account = false
|
|
51
|
+
@embedded_image_size = [2000, 2000]
|
|
52
|
+
@mailer_defaults = ActiveSupport::OrderedOptions.new
|
|
53
|
+
@thumbnail_image_size = [400, 400]
|
|
54
|
+
@frontend_parent_controller = "ApplicationController"
|
|
55
|
+
@locales = [I18n.default_locale]
|
|
56
|
+
@resource_pages_limit_value = 25
|
|
57
|
+
@party_pooper = false
|
|
58
|
+
@transliterations = %i[latin]
|
|
59
|
+
@queues = ActiveSupport::InheritableOptions.new
|
|
60
|
+
@importmap = Importmap::Map.new
|
|
61
|
+
@tailwind_plugins = %w[@tailwindcss/forms @tailwindcss/aspect-ratio @tailwindcss/typography]
|
|
62
|
+
end
|
|
68
63
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
"#{Spina::Engine.root}/app/assets/javascripts/**/*.js",
|
|
79
|
-
"#{Spina::Engine.root}/app/**/application.tailwind.css"]
|
|
64
|
+
def tailwind_content
|
|
65
|
+
@tailwind_content ||= [
|
|
66
|
+
"#{Spina::Engine.root}/app/views/**/*.*",
|
|
67
|
+
"#{Spina::Engine.root}/app/components/**/*.*",
|
|
68
|
+
"#{Spina::Engine.root}/app/helpers/**/*.*",
|
|
69
|
+
"#{Spina::Engine.root}/app/assets/javascripts/**/*.js",
|
|
70
|
+
"#{Spina::Engine.root}/app/**/application.tailwind.css"
|
|
71
|
+
]
|
|
72
|
+
end
|
|
80
73
|
|
|
81
|
-
|
|
74
|
+
attr_writer :tailwind_content
|
|
75
|
+
end
|
|
82
76
|
|
|
83
|
-
# Images that are embedded in the Trix editor are resized to fit
|
|
84
|
-
# You can optimize this for your website and go for a smaller (or larger) size
|
|
85
|
-
# Default: 2000x2000px
|
|
86
77
|
class << self
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
def config_obj.tailwind_purge_content
|
|
93
|
-
ActiveSupport::Deprecation.warn("config.tailwind_purge_content has been renamed to config.tailwind_content")
|
|
94
|
-
tailwind_content
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
def config_obj.tailwind_purge_content=(paths)
|
|
98
|
-
ActiveSupport::Deprecation.warn("config.tailwind_purge_content has been renamed to config.tailwind_content")
|
|
99
|
-
self.tailwind_content = paths
|
|
100
|
-
end
|
|
78
|
+
def configuration
|
|
79
|
+
@configuration ||= Configuration.new
|
|
80
|
+
end
|
|
81
|
+
alias_method :config, :configuration
|
|
101
82
|
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
end
|
|
83
|
+
def configure
|
|
84
|
+
yield(configuration)
|
|
85
|
+
end
|
|
106
86
|
|
|
107
|
-
|
|
108
|
-
end
|
|
87
|
+
delegate :locales, to: :config
|
|
109
88
|
|
|
110
|
-
|
|
89
|
+
def deprecator
|
|
90
|
+
ActiveSupport::Deprecation.new("", "Spina")
|
|
111
91
|
end
|
|
112
92
|
|
|
113
93
|
def mounted_at
|
data/lib/tasks/install.rake
CHANGED
|
@@ -27,7 +27,7 @@ namespace :spina do
|
|
|
27
27
|
|
|
28
28
|
desc "Update translations after adding locales"
|
|
29
29
|
task update_translations: :environment do
|
|
30
|
-
Spina.locales.each do |locale|
|
|
30
|
+
Spina.config.locales.each do |locale|
|
|
31
31
|
Mobility.with_locale(locale) do
|
|
32
32
|
Spina::Page.all.order(:id).each do |page|
|
|
33
33
|
page.title = page.title(fallback: I18n.fallbacks[locale])
|
data/lib/tasks/tailwind.rake
CHANGED
|
@@ -5,9 +5,8 @@ namespace :spina do
|
|
|
5
5
|
def spina_tailwind_compile_command
|
|
6
6
|
[
|
|
7
7
|
Tailwindcss::Ruby.executable,
|
|
8
|
-
"-i",
|
|
9
|
-
"-o", Rails.root.join("app/assets/builds/spina/tailwind.css").to_s
|
|
10
|
-
"-c", Rails.root.join("app/assets/config/spina/tailwind.config.js").to_s,
|
|
8
|
+
"-i", Rails.root.join("app/assets/stylesheets/spina/application.tailwind.css").to_s,
|
|
9
|
+
"-o", Rails.root.join("app/assets/builds/spina/tailwind.css").to_s
|
|
11
10
|
]
|
|
12
11
|
end
|
|
13
12
|
|
metadata
CHANGED
|
@@ -1,14 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: spina
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.21.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bram Jetten
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: bin
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: rails
|
|
@@ -16,48 +15,20 @@ dependencies:
|
|
|
16
15
|
requirements:
|
|
17
16
|
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: '
|
|
18
|
+
version: '7.0'
|
|
20
19
|
- - "<"
|
|
21
20
|
- !ruby/object:Gem::Version
|
|
22
|
-
version: '
|
|
21
|
+
version: '9.0'
|
|
23
22
|
type: :runtime
|
|
24
23
|
prerelease: false
|
|
25
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
26
25
|
requirements:
|
|
27
26
|
- - ">="
|
|
28
27
|
- !ruby/object:Gem::Version
|
|
29
|
-
version: '
|
|
28
|
+
version: '7.0'
|
|
30
29
|
- - "<"
|
|
31
30
|
- !ruby/object:Gem::Version
|
|
32
|
-
version: '
|
|
33
|
-
- !ruby/object:Gem::Dependency
|
|
34
|
-
name: sprockets-rails
|
|
35
|
-
requirement: !ruby/object:Gem::Requirement
|
|
36
|
-
requirements:
|
|
37
|
-
- - ">="
|
|
38
|
-
- !ruby/object:Gem::Version
|
|
39
|
-
version: '0'
|
|
40
|
-
type: :runtime
|
|
41
|
-
prerelease: false
|
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
43
|
-
requirements:
|
|
44
|
-
- - ">="
|
|
45
|
-
- !ruby/object:Gem::Version
|
|
46
|
-
version: '0'
|
|
47
|
-
- !ruby/object:Gem::Dependency
|
|
48
|
-
name: pg
|
|
49
|
-
requirement: !ruby/object:Gem::Requirement
|
|
50
|
-
requirements:
|
|
51
|
-
- - ">="
|
|
52
|
-
- !ruby/object:Gem::Version
|
|
53
|
-
version: '0'
|
|
54
|
-
type: :runtime
|
|
55
|
-
prerelease: false
|
|
56
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
57
|
-
requirements:
|
|
58
|
-
- - ">="
|
|
59
|
-
- !ruby/object:Gem::Version
|
|
60
|
-
version: '0'
|
|
31
|
+
version: '9.0'
|
|
61
32
|
- !ruby/object:Gem::Dependency
|
|
62
33
|
name: bcrypt
|
|
63
34
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -134,14 +105,14 @@ dependencies:
|
|
|
134
105
|
requirements:
|
|
135
106
|
- - ">="
|
|
136
107
|
- !ruby/object:Gem::Version
|
|
137
|
-
version: 1.
|
|
108
|
+
version: 1.3.0
|
|
138
109
|
type: :runtime
|
|
139
110
|
prerelease: false
|
|
140
111
|
version_requirements: !ruby/object:Gem::Requirement
|
|
141
112
|
requirements:
|
|
142
113
|
- - ">="
|
|
143
114
|
- !ruby/object:Gem::Version
|
|
144
|
-
version: 1.
|
|
115
|
+
version: 1.3.0
|
|
145
116
|
- !ruby/object:Gem::Dependency
|
|
146
117
|
name: rack-rewrite
|
|
147
118
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -179,7 +150,7 @@ dependencies:
|
|
|
179
150
|
version: '2.32'
|
|
180
151
|
- - "<"
|
|
181
152
|
- !ruby/object:Gem::Version
|
|
182
|
-
version: '
|
|
153
|
+
version: '5.0'
|
|
183
154
|
type: :runtime
|
|
184
155
|
prerelease: false
|
|
185
156
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -189,7 +160,7 @@ dependencies:
|
|
|
189
160
|
version: '2.32'
|
|
190
161
|
- - "<"
|
|
191
162
|
- !ruby/object:Gem::Version
|
|
192
|
-
version: '
|
|
163
|
+
version: '5.0'
|
|
193
164
|
- !ruby/object:Gem::Dependency
|
|
194
165
|
name: importmap-rails
|
|
195
166
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -286,14 +257,14 @@ dependencies:
|
|
|
286
257
|
requirements:
|
|
287
258
|
- - ">="
|
|
288
259
|
- !ruby/object:Gem::Version
|
|
289
|
-
version: '0'
|
|
260
|
+
version: '4.0'
|
|
290
261
|
type: :runtime
|
|
291
262
|
prerelease: false
|
|
292
263
|
version_requirements: !ruby/object:Gem::Requirement
|
|
293
264
|
requirements:
|
|
294
265
|
- - ">="
|
|
295
266
|
- !ruby/object:Gem::Version
|
|
296
|
-
version: '0'
|
|
267
|
+
version: '4.0'
|
|
297
268
|
description: CMS
|
|
298
269
|
email:
|
|
299
270
|
- bram@denkgroot.com
|
|
@@ -1237,19 +1208,16 @@ files:
|
|
|
1237
1208
|
- app/assets/javascripts/spina/libraries/canvas-confetti.js
|
|
1238
1209
|
- app/assets/javascripts/spina/libraries/canvas-confetti@1.3.2.js
|
|
1239
1210
|
- app/assets/javascripts/spina/libraries/debounce.js
|
|
1240
|
-
- app/assets/javascripts/spina/libraries/form-request-submit-polyfill.js
|
|
1241
|
-
- app/assets/javascripts/spina/libraries/form-request-submit-polyfill@2.0.0.js
|
|
1242
1211
|
- app/assets/javascripts/spina/libraries/hotkeys.js
|
|
1243
1212
|
- app/assets/javascripts/spina/libraries/hotkeys@3.8.7.js
|
|
1244
1213
|
- app/assets/javascripts/spina/libraries/sortablejs.js
|
|
1245
1214
|
- app/assets/javascripts/spina/libraries/sortablejs@1.13.0.js
|
|
1246
|
-
- app/assets/javascripts/spina/libraries/stimulus-data-bindings@1.3.2.js
|
|
1247
|
-
- app/assets/javascripts/spina/libraries/stimulus-reveal@1.4.2.js
|
|
1248
1215
|
- app/assets/javascripts/spina/libraries/trix.js
|
|
1249
1216
|
- app/assets/javascripts/spina/libraries/trix@1.3.1.esm.js
|
|
1250
1217
|
- app/assets/stylesheets/spina/animate.css
|
|
1251
1218
|
- app/assets/stylesheets/spina/application.tailwind.css
|
|
1252
|
-
- app/assets/stylesheets/spina/fonts.css
|
|
1219
|
+
- app/assets/stylesheets/spina/fonts-propshaft.css
|
|
1220
|
+
- app/assets/stylesheets/spina/fonts-sprockets.css.erb
|
|
1253
1221
|
- app/components/spina/application_component.rb
|
|
1254
1222
|
- app/components/spina/forms/auto_file_upload_component.html.erb
|
|
1255
1223
|
- app/components/spina/forms/auto_file_upload_component.rb
|
|
@@ -1519,6 +1487,7 @@ files:
|
|
|
1519
1487
|
- db/migrate/15_add_slug_to_spina_resources.rb
|
|
1520
1488
|
- db/migrate/16_add_ancestry_cache_columns_to_spina_pages.rb
|
|
1521
1489
|
- db/migrate/17_add_custom_urls_to_spina_navigation_items.rb
|
|
1490
|
+
- db/migrate/18_change_default_spina_resources_slug.rb
|
|
1522
1491
|
- db/migrate/1_create_spina_tables.rb
|
|
1523
1492
|
- db/migrate/2_create_spina_translation_tables.rb
|
|
1524
1493
|
- db/migrate/3_create_spina_navigations.rb
|
|
@@ -1532,7 +1501,7 @@ files:
|
|
|
1532
1501
|
- lib/generators/spina/embed_generator.rb
|
|
1533
1502
|
- lib/generators/spina/install_generator.rb
|
|
1534
1503
|
- lib/generators/spina/tailwind_config_generator.rb
|
|
1535
|
-
- lib/generators/spina/templates/app/assets/
|
|
1504
|
+
- lib/generators/spina/templates/app/assets/stylesheets/spina/application.tailwind.css.tt
|
|
1536
1505
|
- lib/generators/spina/templates/app/models/spina/embeds/embed.rb.tt
|
|
1537
1506
|
- lib/generators/spina/templates/app/views/default/pages/homepage.html.erb
|
|
1538
1507
|
- lib/generators/spina/templates/app/views/default/pages/show.html.erb
|
|
@@ -1595,8 +1564,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
1595
1564
|
- !ruby/object:Gem::Version
|
|
1596
1565
|
version: '0'
|
|
1597
1566
|
requirements: []
|
|
1598
|
-
rubygems_version:
|
|
1599
|
-
signing_key:
|
|
1567
|
+
rubygems_version: 4.0.3
|
|
1600
1568
|
specification_version: 4
|
|
1601
1569
|
summary: Spina
|
|
1602
1570
|
test_files: []
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//= require ./form-request-submit-polyfill@2.0.0.js
|