spina 0.12.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of spina might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/README.md +65 -7
- data/app/assets/fonts/spina/ics_spina.eot +0 -0
- data/app/assets/fonts/spina/ics_spina.svg +65 -61
- data/app/assets/fonts/spina/ics_spina.ttf +0 -0
- data/app/assets/fonts/spina/ics_spina.woff +0 -0
- data/app/assets/fonts/spina/ics_spina.woff2 +0 -0
- data/app/assets/icons/spina/export.svg +10 -0
- data/app/assets/icons/spina/preview/ics_spina-preview.html +17 -1
- data/app/assets/images/spina/media_folder_placeholder.png +0 -0
- data/app/assets/images/spina/{admin/spina.png → spina-large.png} +0 -0
- data/app/assets/javascripts/spina/admin/application.js +50 -0
- data/app/assets/javascripts/spina/admin/controllers/infinite_scroll_controller.js +40 -0
- data/app/assets/javascripts/spina/admin/media_gallery.coffee +65 -0
- data/app/assets/javascripts/spina/admin/modal.coffee +0 -1
- data/app/assets/javascripts/spina/admin/pages.coffee.erb +2 -2
- data/app/assets/javascripts/spina/admin/{application.coffee.erb → scaffold.coffee} +20 -61
- data/app/assets/javascripts/spina/admin/trix.coffee.erb +5 -8
- data/app/assets/javascripts/spina/admin/uploads.coffee +2 -2
- data/app/assets/stylesheets/spina.sass +3 -3
- data/app/assets/stylesheets/spina/_buttons.sass +0 -1
- data/app/assets/stylesheets/spina/{_configuration.sass → _configuration.sass.erb} +5 -1
- data/app/assets/stylesheets/spina/_forms.sass +79 -20
- data/app/assets/stylesheets/spina/_gallery.sass +91 -3
- data/app/assets/stylesheets/spina/_ics_spina.scss +1 -0
- data/app/assets/stylesheets/spina/_tables.sass +4 -0
- data/app/assets/stylesheets/spina/_trix.sass +7 -4
- data/app/assets/stylesheets/spina_front_end.sass +19 -0
- data/app/controllers/concerns/spina/frontend.rb +29 -12
- data/app/controllers/spina/admin/admin_controller.rb +1 -1
- data/app/controllers/spina/admin/attachments_controller.rb +10 -5
- data/app/controllers/spina/admin/images_controller.rb +51 -0
- data/app/controllers/spina/admin/media_folders_controller.rb +37 -0
- data/app/controllers/spina/admin/media_picker_controller.rb +28 -0
- data/app/controllers/spina/admin/pages_controller.rb +16 -6
- data/app/controllers/spina/admin/resources_controller.rb +33 -0
- data/app/controllers/spina/admin/settings_controller.rb +56 -0
- data/app/controllers/spina/pages_controller.rb +0 -6
- data/app/helpers/spina/admin/pages_helper.rb +2 -2
- data/app/helpers/spina/admin_nav_helper.rb +7 -0
- data/app/helpers/spina/files_helper.rb +9 -0
- data/app/helpers/spina/images_helper.rb +17 -0
- data/app/helpers/spina/pages_helper.rb +17 -0
- data/app/models/concerns/spina/image_collectable.rb +23 -0
- data/app/models/concerns/spina/part.rb +7 -4
- data/app/models/spina/account.rb +10 -14
- data/app/models/spina/attachment.rb +8 -10
- data/app/models/spina/attachment_collection.rb +6 -1
- data/app/models/spina/current.rb +5 -0
- data/app/models/spina/image.rb +26 -0
- data/app/models/spina/{photo_collection.rb → image_collection.rb} +6 -6
- data/app/models/spina/image_collections_image.rb +6 -0
- data/app/models/spina/line.rb +1 -0
- data/app/models/spina/media_folder.rb +7 -0
- data/app/models/spina/navigation.rb +4 -0
- data/app/models/spina/navigation_item.rb +1 -1
- data/app/models/spina/page.rb +18 -13
- data/app/models/spina/page_part.rb +1 -0
- data/app/models/spina/resource.rb +16 -0
- data/app/models/spina/setting.rb +7 -0
- data/app/models/spina/structure.rb +2 -0
- data/app/models/spina/structure_item.rb +2 -0
- data/app/models/spina/structure_part.rb +2 -1
- data/app/models/spina/text.rb +1 -0
- data/app/views/dummy/show.html.haml +1 -0
- data/app/views/layouts/spina/admin/media_library.html.haml +6 -3
- data/app/views/layouts/spina/admin/pages.html.haml +4 -1
- data/app/views/layouts/spina/admin/resources.html.haml +10 -0
- data/app/views/spina/admin/accounts/style.html.haml +3 -2
- data/app/views/spina/admin/attachments/_attachment.html.haml +3 -3
- data/app/views/spina/admin/attachments/_select.html.haml +7 -15
- data/app/views/spina/admin/attachments/_select_collection.html.haml +7 -14
- data/app/views/spina/admin/attachments/create.js.erb +1 -3
- data/app/views/spina/admin/attachments/index.html.haml +4 -3
- data/app/views/spina/admin/attachments/insert.js.erb +5 -0
- data/app/views/spina/admin/image_collections/_image_collection.html.haml +5 -0
- data/app/views/spina/admin/images/_form.html.haml +5 -0
- data/app/views/spina/admin/images/_image.html.haml +10 -0
- data/app/views/spina/admin/images/create.js.erb +8 -0
- data/app/views/spina/admin/images/index.html.haml +22 -0
- data/app/views/spina/admin/images/index.js.erb +7 -0
- data/app/views/spina/admin/media_folders/_form.html.haml +14 -0
- data/app/views/spina/admin/media_folders/_media_folder.html.haml +8 -0
- data/app/views/spina/admin/media_folders/new.js.erb +1 -0
- data/app/views/spina/admin/media_folders/show.html.haml +17 -0
- data/app/views/spina/admin/media_picker/_modal.html.haml +26 -0
- data/app/views/spina/admin/media_picker/infinite_scroll.js.erb +5 -0
- data/app/views/spina/admin/media_picker/select.js.erb +28 -0
- data/app/views/spina/admin/media_picker/show.js.erb +1 -0
- data/app/views/spina/admin/navigations/_page.html.haml +2 -2
- data/app/views/spina/admin/navigations/edit.html.haml +1 -1
- data/app/views/spina/admin/pages/_form.html.haml +21 -15
- data/app/views/spina/admin/pages/_form_advanced.html.haml +53 -43
- data/app/views/spina/admin/pages/_form_page_content.html.haml +1 -1
- data/app/views/spina/admin/pages/_form_page_seo.html.haml +1 -1
- data/app/views/spina/admin/pages/_page_nested_list.html.haml +3 -3
- data/app/views/spina/admin/pages/index.html.haml +1 -1
- data/app/views/spina/admin/{page_partables → partables}/attachment_collections/_form.html.haml +1 -1
- data/app/views/spina/admin/{page_partables → partables}/attachments/_form.html.haml +4 -4
- data/app/views/spina/admin/partables/image_collections/_form.html.haml +16 -0
- data/app/views/spina/admin/partables/images/_form.html.haml +14 -0
- data/app/views/spina/admin/{page_partables → partables}/lines/_form.html.haml +1 -1
- data/app/views/spina/admin/{structure_partables → partables}/options/_form.html.haml +1 -1
- data/app/views/spina/admin/partables/photo_collections/_form.html.haml +4 -0
- data/app/views/spina/admin/partables/photos/_form.html.haml +4 -0
- data/app/views/spina/admin/{page_partables → partables}/structures/_form.html.haml +3 -3
- data/app/views/spina/admin/{page_partables → partables}/texts/_form.html.haml +1 -1
- data/app/views/spina/admin/password_resets/edit.html.haml +1 -1
- data/app/views/spina/admin/password_resets/new.html.haml +1 -1
- data/app/views/spina/admin/resources/edit.html.haml +49 -0
- data/app/views/spina/admin/resources/show.html.haml +14 -0
- data/app/views/spina/admin/sessions/new.html.haml +1 -1
- data/app/views/spina/admin/settings/_string_field.html.haml +4 -0
- data/app/views/spina/admin/settings/_wysiwyg_field.html.haml +4 -0
- data/app/views/spina/admin/settings/edit.html.haml +13 -0
- data/app/views/spina/admin/shared/_primary_navigation.html.haml +13 -5
- data/app/views/spina/admin/shared/_rich_text_field.html.haml +10 -10
- data/app/views/spina/admin/structure_items/_fields.html.haml +1 -1
- data/app/views/spina/admin/structure_partables/attachment_collections/_form.html.haml +14 -0
- data/app/views/spina/admin/structure_partables/attachments/_form.html.haml +13 -0
- data/app/views/spina/shared/_analytics.html.erb +8 -8
- data/app/views/spina/shared/_navigation.html.haml +3 -3
- data/app/views/spina/shared/_spina_link.html.haml +2 -0
- data/app/views/spina/sitemaps/show.xml.builder +2 -2
- data/config/initializers/assets.rb +6 -1
- data/config/locales/TH.yml +243 -0
- data/config/locales/bg.yml +250 -0
- data/config/locales/de.yml +67 -22
- data/config/locales/en.yml +29 -2
- data/config/locales/es.yml +58 -1
- data/config/locales/fr.yml +80 -32
- data/config/locales/id.yml +228 -0
- data/config/locales/nl.yml +32 -0
- data/config/locales/pl.yml +225 -0
- data/config/locales/pt-BR.yml +34 -3
- data/config/locales/ro.yml +225 -0
- data/config/locales/ru.yml +10 -0
- data/config/locales/sv.yml +223 -0
- data/config/routes.rb +13 -13
- data/db/migrate/10_create_spina_image_collections.rb +16 -0
- data/db/migrate/11_create_spina_resources.rb +15 -0
- data/db/migrate/1_create_spina_tables.rb +0 -19
- data/db/migrate/2_create_spina_translation_tables.rb +36 -6
- data/db/migrate/7_create_spina_settings.rb +11 -0
- data/db/migrate/8_create_spina_media_folders.rb +8 -0
- data/db/migrate/9_create_spina_images.rb +10 -0
- data/lib/generators/spina/install_generator.rb +2 -2
- data/lib/generators/spina/templates/app/views/default/pages/homepage.html.haml +3 -2
- data/lib/generators/spina/templates/app/views/default/pages/show.html.haml +2 -2
- data/lib/generators/spina/templates/app/views/default/shared/_navigation.html.haml +3 -5
- data/lib/generators/spina/templates/app/views/demo/pages/demo.html.haml +20 -23
- data/lib/generators/spina/templates/app/views/demo/pages/homepage.html.haml +2 -2
- data/lib/generators/spina/templates/app/views/demo/pages/show.html.haml +2 -2
- data/lib/generators/spina/templates/app/views/demo/shared/_navigation.html.haml +3 -5
- data/lib/generators/spina/templates/config/initializers/mobility.rb +6 -0
- data/lib/generators/spina/templates/config/initializers/spina.rb +3 -0
- data/lib/generators/spina/templates/config/initializers/themes/demo.rb +7 -7
- data/lib/spina.rb +0 -1
- data/lib/spina/engine.rb +6 -7
- data/lib/spina/plugin.rb +48 -3
- data/lib/spina/version.rb +1 -1
- data/vendor/assets/javascripts/spina/stimulus.umd.js +5 -0
- data/vendor/assets/javascripts/spina/trix.js +10 -9
- metadata +106 -103
- data/app/assets/images/spina/danger-zone-ribbon.png +0 -0
- data/app/assets/images/spina/spina_small.png +0 -0
- data/app/assets/javascripts/spina/admin/infinite_scroll.coffee +0 -25
- data/app/controllers/spina/admin/photos_controller.rb +0 -100
- data/app/models/concerns/spina/photo_collectable.rb +0 -24
- data/app/models/spina/photo.rb +0 -29
- data/app/models/spina/photo_collections_photo.rb +0 -6
- data/app/presenters/spina/pages/menu_presenter.rb +0 -63
- data/app/uploaders/spina/default_store_uploader.rb +0 -15
- data/app/uploaders/spina/file_uploader.rb +0 -6
- data/app/uploaders/spina/logo_uploader.rb +0 -13
- data/app/uploaders/spina/photo_uploader.rb +0 -23
- data/app/views/spina/admin/attachments/_fields.html.haml +0 -8
- data/app/views/spina/admin/attachments/insert.js.coffee +0 -5
- data/app/views/spina/admin/page_partables/options/_form.html.haml +0 -6
- data/app/views/spina/admin/page_partables/photo_collections/_form.html.haml +0 -17
- data/app/views/spina/admin/page_partables/photos/_form.html.haml +0 -14
- data/app/views/spina/admin/photos/_photo.html.haml +0 -8
- data/app/views/spina/admin/photos/_photo_collection.html.haml +0 -5
- data/app/views/spina/admin/photos/_photo_collection_select.html.haml +0 -23
- data/app/views/spina/admin/photos/_photo_link.html.haml +0 -11
- data/app/views/spina/admin/photos/_photo_multi_picker.html.haml +0 -3
- data/app/views/spina/admin/photos/_photo_select.html.haml +0 -16
- data/app/views/spina/admin/photos/_photo_single_picker.html.haml +0 -3
- data/app/views/spina/admin/photos/_photo_uploaded.html.haml +0 -4
- data/app/views/spina/admin/photos/_trix_select.html.haml +0 -11
- data/app/views/spina/admin/photos/create.js.erb +0 -4
- data/app/views/spina/admin/photos/index.html.haml +0 -13
- data/app/views/spina/admin/photos/index.js.erb +0 -5
- data/app/views/spina/admin/photos/insert_photo.js.erb +0 -10
- data/app/views/spina/admin/photos/insert_photo_collection.js.erb +0 -25
- data/app/views/spina/admin/photos/link.js.erb +0 -2
- data/app/views/spina/admin/photos/multi_picker_infinite_scroll.js.erb +0 -6
- data/app/views/spina/admin/photos/photo_collection_select.js.erb +0 -3
- data/app/views/spina/admin/photos/photo_select.js.erb +0 -3
- data/app/views/spina/admin/photos/single_picker_infinite_scroll.js.erb +0 -6
- data/app/views/spina/admin/photos/trix_infinite_scroll.js.erb +0 -4
- data/app/views/spina/admin/photos/trix_insert.js.erb +0 -2
- data/app/views/spina/admin/photos/trix_select.js.erb +0 -3
- data/app/views/spina/admin/structure_partables/lines/_form.html.haml +0 -5
- data/app/views/spina/admin/structure_partables/photo_collections/_form.html.haml +0 -17
- data/app/views/spina/admin/structure_partables/photos/_form.html.haml +0 -11
- data/app/views/spina/admin/structure_partables/texts/_form.html.haml +0 -5
- data/config/initializers/spina.rb +0 -0
- data/lib/generators/spina/templates/config/initializers/carrierwave.rb +0 -17
- data/lib/spina/railtie.rb +0 -9
@@ -123,10 +123,26 @@
|
|
123
123
|
|
124
124
|
trix-editor.text-input
|
125
125
|
padding-left: 0
|
126
|
+
white-space: initial
|
126
127
|
|
127
128
|
#{$all-text-inputs}
|
128
129
|
height: 50px
|
129
130
|
|
131
|
+
a.media_picker
|
132
|
+
background: none
|
133
|
+
border: none
|
134
|
+
box-shadow: none
|
135
|
+
outline: none
|
136
|
+
padding-left: 0
|
137
|
+
|
138
|
+
.image
|
139
|
+
border-radius: 3px
|
140
|
+
display: inline-block
|
141
|
+
overflow: hidden
|
142
|
+
|
143
|
+
img
|
144
|
+
display: block
|
145
|
+
|
130
146
|
.sidebar-form-images
|
131
147
|
margin-top: 25px
|
132
148
|
|
@@ -140,15 +156,22 @@
|
|
140
156
|
border: 1px solid #e5e5ea
|
141
157
|
border-radius: 2px
|
142
158
|
display: inline-block
|
159
|
+
height: 100px
|
143
160
|
margin-bottom: 10px
|
144
161
|
margin-right: 10px
|
162
|
+
overflow: hidden
|
145
163
|
position: relative
|
146
164
|
width: 100px
|
147
165
|
|
148
166
|
> img
|
149
167
|
border-radius: 2px
|
150
168
|
display: block
|
151
|
-
|
169
|
+
left: 50%
|
170
|
+
max-height: 100%
|
171
|
+
max-width: 100%
|
172
|
+
position: absolute
|
173
|
+
top: 50%
|
174
|
+
transform: translateY(-50%) translateX(-50%)
|
152
175
|
|
153
176
|
.sidebar-form-image-overlay
|
154
177
|
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0), rgba(0, 0, 0, .5))
|
@@ -166,6 +189,7 @@
|
|
166
189
|
opacity: 1
|
167
190
|
|
168
191
|
&:first-child
|
192
|
+
height: 240px
|
169
193
|
width: 320px
|
170
194
|
|
171
195
|
&:nth-child(3n + 1)
|
@@ -317,17 +341,23 @@
|
|
317
341
|
.input-group
|
318
342
|
display: flex
|
319
343
|
|
320
|
-
|
344
|
+
div
|
345
|
+
#{$all-text-inputs}, .text-input, .select-dropdown
|
346
|
+
height: 100%
|
347
|
+
|
348
|
+
& > div, #{$all-text-inputs}, .text-input, .select-dropdown
|
321
349
|
flex: 1
|
322
350
|
|
323
351
|
&:not(:first-child)
|
324
|
-
|
325
|
-
|
352
|
+
&, #{$all-text-inputs}, .text-input, .select-dropdown
|
353
|
+
border-bottom-left-radius: 0
|
354
|
+
border-top-left-radius: 0
|
326
355
|
|
327
356
|
&:not(:last-child)
|
328
|
-
|
329
|
-
|
330
|
-
|
357
|
+
&, #{$all-text-inputs}, .text-input, .select-dropdown
|
358
|
+
border-bottom-right-radius: 0
|
359
|
+
border-top-right-radius: 0
|
360
|
+
border-right: none
|
331
361
|
|
332
362
|
// Inputs
|
333
363
|
|
@@ -532,8 +562,12 @@ input.datepicker
|
|
532
562
|
padding: 0
|
533
563
|
position: relative
|
534
564
|
transition: border .2s ease
|
565
|
+
white-space: nowrap
|
535
566
|
@extend .icon, .icon-caret-down
|
536
567
|
|
568
|
+
.field_with_errors
|
569
|
+
display: inline-block
|
570
|
+
|
537
571
|
label
|
538
572
|
background: #f5f5f5
|
539
573
|
border-right: 1px solid #ddd
|
@@ -615,7 +649,7 @@ input.datepicker
|
|
615
649
|
width: 1px
|
616
650
|
|
617
651
|
ul:after
|
618
|
-
background: linear-gradient(
|
652
|
+
background: linear-gradient(#ddd, rgba(255, 255, 255, 0))
|
619
653
|
bottom: -40px
|
620
654
|
top: auto
|
621
655
|
|
@@ -710,9 +744,14 @@ input.datepicker
|
|
710
744
|
line-height: 52px
|
711
745
|
|
712
746
|
.customfile
|
747
|
+
background: rgba(0, 0, 0, .015)
|
748
|
+
border: 1px dashed rgba(0, 0, 0, .1)
|
749
|
+
border-radius: 10px
|
713
750
|
cursor: pointer
|
714
751
|
height: 100%
|
752
|
+
margin: 20px 0
|
715
753
|
overflow: hidden
|
754
|
+
padding-left: 20px
|
716
755
|
position: relative
|
717
756
|
text-align: left
|
718
757
|
width: 100%
|
@@ -733,8 +772,12 @@ input.datepicker
|
|
733
772
|
@extend .icon, .icon-refresh:before
|
734
773
|
display: none
|
735
774
|
font-size: 36px
|
775
|
+
height: 50px
|
776
|
+
width: 36px
|
736
777
|
|
737
778
|
.customfile.loading
|
779
|
+
padding: 7px 20px
|
780
|
+
|
738
781
|
&:before
|
739
782
|
display: none
|
740
783
|
|
@@ -763,6 +806,34 @@ input.datepicker
|
|
763
806
|
.customfile-button
|
764
807
|
display: none
|
765
808
|
|
809
|
+
.document-select
|
810
|
+
ul
|
811
|
+
margin: -20px -20px 20px -20px
|
812
|
+
|
813
|
+
.item
|
814
|
+
border-top: 1px solid #efefef
|
815
|
+
cursor: pointer
|
816
|
+
line-height: 1
|
817
|
+
margin: 0
|
818
|
+
position: relative
|
819
|
+
width: 100%
|
820
|
+
|
821
|
+
label
|
822
|
+
display: block
|
823
|
+
font-size: 0.875rem
|
824
|
+
margin: 0
|
825
|
+
padding: 20px
|
826
|
+
|
827
|
+
input[type="checkbox"],
|
828
|
+
input[type="radio"]
|
829
|
+
left: 0
|
830
|
+
opacity: 0
|
831
|
+
position: absolute
|
832
|
+
top: 0
|
833
|
+
|
834
|
+
&:checked + label
|
835
|
+
background: #f5f5fa
|
836
|
+
|
766
837
|
.media_picker
|
767
838
|
background: #f9f9f9
|
768
839
|
border: 1px solid #d5d5d5
|
@@ -784,18 +855,6 @@ input.datepicker
|
|
784
855
|
&:active .button
|
785
856
|
background: shade(#efefef, 10%)
|
786
857
|
|
787
|
-
&:before
|
788
|
-
background: rgba(255, 255, 255, .5)
|
789
|
-
content: ""
|
790
|
-
height: 100%
|
791
|
-
left: 0
|
792
|
-
opacity: 0
|
793
|
-
position: absolute
|
794
|
-
text-align: center
|
795
|
-
top: 0
|
796
|
-
transition: opacity .2s ease
|
797
|
-
width: 100%
|
798
|
-
|
799
858
|
.placeholder
|
800
859
|
color: #666
|
801
860
|
font-size: 13px
|
@@ -19,6 +19,7 @@
|
|
19
19
|
margin: 8px
|
20
20
|
overflow: hidden
|
21
21
|
position: relative
|
22
|
+
transition: transform .3s ease
|
22
23
|
width: 150px
|
23
24
|
z-index: 3
|
24
25
|
|
@@ -86,7 +87,10 @@
|
|
86
87
|
word-break: break-word
|
87
88
|
z-index: 3
|
88
89
|
|
89
|
-
|
90
|
+
&.ui-draggable:not(.ui-draggable-disabled):hover
|
91
|
+
cursor: move
|
92
|
+
|
93
|
+
&.ui-draggable-disabled:hover, &:not(.ui-draggable):hover
|
90
94
|
.overlay
|
91
95
|
background: rgba(0, 0, 0, 0.5)
|
92
96
|
|
@@ -97,6 +101,12 @@
|
|
97
101
|
.photo-name
|
98
102
|
transform: translateY(0%)
|
99
103
|
|
104
|
+
&.dropping:not(.media-folder)
|
105
|
+
transform: scale(0.8)
|
106
|
+
|
107
|
+
&.dropped:not(.media-folder)
|
108
|
+
transform: scale(0)
|
109
|
+
|
100
110
|
form
|
101
111
|
height: 100%
|
102
112
|
|
@@ -231,7 +241,7 @@
|
|
231
241
|
&:hover .customfile:before
|
232
242
|
color: #333
|
233
243
|
|
234
|
-
&:hover .new_photo label
|
244
|
+
&:hover .new_photo label, &:hover .new_image label
|
235
245
|
color: #333
|
236
246
|
|
237
247
|
.customfile-feedback
|
@@ -253,7 +263,7 @@
|
|
253
263
|
.customfile-button
|
254
264
|
display: none
|
255
265
|
|
256
|
-
.new_photo label
|
266
|
+
.new_photo label, .new_image label
|
257
267
|
color: #999
|
258
268
|
font-size: 13px
|
259
269
|
font-weight: 600
|
@@ -264,3 +274,81 @@
|
|
264
274
|
text-transform: lowercase
|
265
275
|
transition: color .2s ease
|
266
276
|
width: 100%
|
277
|
+
|
278
|
+
// Media folders
|
279
|
+
|
280
|
+
.item.media-folder
|
281
|
+
align-items: center
|
282
|
+
background: #e5e5f0
|
283
|
+
border: 1px solid #d5d4e6
|
284
|
+
display: flex
|
285
|
+
flex-direction: column
|
286
|
+
justify-content: center
|
287
|
+
line-height: 20px
|
288
|
+
|
289
|
+
&:hover, &.dropping
|
290
|
+
.media-folder-thumbnail
|
291
|
+
transform: rotate(-4deg)
|
292
|
+
.media-folder-thumbnail:after
|
293
|
+
transform: translateY(-10px) translateX(30px)
|
294
|
+
.media-folder-shadow:before
|
295
|
+
transform: rotate(12deg)
|
296
|
+
.media-folder-shadow:after
|
297
|
+
transform: rotate(6deg)
|
298
|
+
|
299
|
+
.media-folder-thumbnail
|
300
|
+
height: 70px
|
301
|
+
position: relative
|
302
|
+
transform-origin: center bottom
|
303
|
+
transition: transform .4s ease
|
304
|
+
width: 70px
|
305
|
+
|
306
|
+
&[data-badge]:after
|
307
|
+
background: #6b699f
|
308
|
+
border: 3px solid #e5e5f0
|
309
|
+
border-radius: 12px
|
310
|
+
color: #fff
|
311
|
+
content: attr(data-badge)
|
312
|
+
display: block
|
313
|
+
font-size: 10px
|
314
|
+
font-weight: bold
|
315
|
+
height: 24px
|
316
|
+
line-height: 18px
|
317
|
+
position: absolute
|
318
|
+
right: -8px
|
319
|
+
text-align: center
|
320
|
+
transition: transform .4s ease
|
321
|
+
top: -8px
|
322
|
+
width: 24px
|
323
|
+
z-index: 1
|
324
|
+
|
325
|
+
.media-folder-shadow:before, .media-folder-shadow:after
|
326
|
+
background: rgba(107, 105, 159, .25)
|
327
|
+
border-radius: 5px
|
328
|
+
content: " "
|
329
|
+
display: block
|
330
|
+
height: 70px
|
331
|
+
left: 0px
|
332
|
+
position: absolute
|
333
|
+
transform-origin: center bottom
|
334
|
+
transition: transform .4s ease
|
335
|
+
top: 0px
|
336
|
+
width: 70px
|
337
|
+
z-index: 0
|
338
|
+
|
339
|
+
.media-folder-shadow:after
|
340
|
+
background: rgba(107, 105, 159, .5)
|
341
|
+
|
342
|
+
img
|
343
|
+
border-radius: 5px
|
344
|
+
position: relative
|
345
|
+
width: 100%
|
346
|
+
|
347
|
+
.media-folder-name
|
348
|
+
color: #4d4f81
|
349
|
+
font-size: 14px
|
350
|
+
font-weight: 600
|
351
|
+
height: 16px
|
352
|
+
line-height: 16px
|
353
|
+
margin-top: 6px
|
354
|
+
text-align: center
|
@@ -27,6 +27,7 @@
|
|
27
27
|
.icon-document:before { content: "\f116"; }
|
28
28
|
.icon-dots:before { content: "\f117"; }
|
29
29
|
.icon-exclamation:before { content: "\f118"; }
|
30
|
+
.icon-export:before { content: "\f139"; }
|
30
31
|
.icon-eye:before { content: "\f119"; }
|
31
32
|
.icon-filter:before { content: "\f11a"; }
|
32
33
|
.icon-home:before { content: "\f11b"; }
|
@@ -4,14 +4,17 @@ trix-toolbar
|
|
4
4
|
.button-group
|
5
5
|
margin-right: 10px
|
6
6
|
|
7
|
-
.button.active
|
7
|
+
.button.trix-active
|
8
8
|
background: $primary-color
|
9
9
|
color: #fff
|
10
10
|
|
11
|
-
.
|
11
|
+
.trix-dialog__link-fields
|
12
|
+
clear: both
|
13
|
+
|
14
|
+
.trix-dialog__link-fields input
|
12
15
|
margin-top: 6px
|
13
16
|
|
14
|
-
.
|
17
|
+
.trix-dialog__link-fields .button-group input
|
15
18
|
margin-top: 10px
|
16
19
|
|
17
20
|
trix-editor
|
@@ -90,7 +93,7 @@ trix-editor
|
|
90
93
|
max-width: 200px
|
91
94
|
overflow: hidden
|
92
95
|
|
93
|
-
figcaption, .
|
96
|
+
figcaption, .attachment__remove
|
94
97
|
display: none
|
95
98
|
|
96
99
|
img
|
@@ -0,0 +1,19 @@
|
|
1
|
+
// Configuration
|
2
|
+
@import spina/configuration
|
3
|
+
|
4
|
+
.spina-link
|
5
|
+
display: block
|
6
|
+
position: fixed
|
7
|
+
bottom: 1rem
|
8
|
+
right: 1rem
|
9
|
+
z-index: 9999
|
10
|
+
color: white
|
11
|
+
background-color: $primary-color
|
12
|
+
padding: 0.5rem 1rem
|
13
|
+
border-radius: 20px
|
14
|
+
text-decoration: none
|
15
|
+
transition: background-color .25s
|
16
|
+
box-shadow: 1px 1px 7px rgba(0, 0, 0, 0.2)
|
17
|
+
|
18
|
+
&:hover
|
19
|
+
background-color: $primary-color-dark
|
@@ -3,15 +3,17 @@ module Spina
|
|
3
3
|
extend ActiveSupport::Concern
|
4
4
|
|
5
5
|
included do
|
6
|
+
rescue_from ActiveRecord::RecordNotFound, with: :redirect_or_render_404
|
7
|
+
|
6
8
|
before_action :set_locale
|
7
|
-
before_action :
|
9
|
+
before_action :set_current_page
|
8
10
|
end
|
9
11
|
|
10
12
|
def show
|
11
13
|
if should_skip_to_first_child?
|
12
14
|
redirect_to first_live_child.try(:materialized_path) and return
|
13
15
|
elsif page.link_url.present?
|
14
|
-
redirect_to page.link_url and return
|
16
|
+
redirect_to Current.page.link_url and return
|
15
17
|
end
|
16
18
|
|
17
19
|
render_with_template(page)
|
@@ -23,19 +25,22 @@ module Spina
|
|
23
25
|
I18n.locale = params[:locale] || I18n.default_locale
|
24
26
|
end
|
25
27
|
|
26
|
-
def
|
27
|
-
|
28
|
-
redirect_to rule.new_path, status: :moved_permanently
|
29
|
-
end
|
28
|
+
def set_current_page
|
29
|
+
Current.page = page
|
30
30
|
end
|
31
31
|
|
32
32
|
def page_by_locale(locale)
|
33
|
-
|
33
|
+
I18n.with_locale(locale) do
|
34
|
+
Page.i18n.find_by!(materialized_path: spina_request_path)
|
35
|
+
end
|
34
36
|
end
|
35
37
|
|
36
38
|
def page
|
37
|
-
|
38
|
-
|
39
|
+
@page = if action_name == 'homepage'
|
40
|
+
Page.find_by!(name: 'homepage')
|
41
|
+
else
|
42
|
+
page_by_locale(I18n.locale) || page_by_locale(I18n.default_locale)
|
43
|
+
end
|
39
44
|
end
|
40
45
|
|
41
46
|
def spina_request_path
|
@@ -44,15 +49,27 @@ module Spina
|
|
44
49
|
end
|
45
50
|
|
46
51
|
def should_skip_to_first_child?
|
47
|
-
page.skip_to_first_child && first_live_child
|
52
|
+
Current.page.skip_to_first_child && first_live_child
|
48
53
|
end
|
49
54
|
|
50
55
|
def first_live_child
|
51
|
-
page.children.sorted.live.first
|
56
|
+
Current.page.children.sorted.live.first
|
57
|
+
end
|
58
|
+
|
59
|
+
def redirect_or_render_404
|
60
|
+
if rule = RewriteRule.find_by(old_path: spina_request_path)
|
61
|
+
redirect_to rule.new_path, status: :moved_permanently
|
62
|
+
else
|
63
|
+
render_404
|
64
|
+
end
|
65
|
+
end
|
66
|
+
|
67
|
+
def render_404
|
68
|
+
render file: "#{Rails.root}/public/404.html", status: 404
|
52
69
|
end
|
53
70
|
|
54
71
|
def render_with_template(page)
|
55
|
-
render layout: "#{current_theme.name.parameterize.underscore}/#{page.layout_template || 'application'}", template: "#{current_theme.name.parameterize.underscore}/pages/#{page.view_template || 'show'}"
|
72
|
+
render layout: "#{current_theme.name.parameterize.underscore}/#{page.layout_template || 'application'}", template: "#{current_theme.name.parameterize.underscore}/pages/#{Current.page.view_template || 'show'}"
|
56
73
|
end
|
57
74
|
|
58
75
|
end
|