spina 1.1.1 → 1.1.2

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.

Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +23 -244
  3. data/app/assets/fonts/spina/Metropolis-Black.woff2 +0 -0
  4. data/app/assets/fonts/spina/Metropolis-BlackItalic.woff2 +0 -0
  5. data/app/assets/fonts/spina/Metropolis-Bold.woff2 +0 -0
  6. data/app/assets/fonts/spina/Metropolis-BoldItalic.woff2 +0 -0
  7. data/app/assets/fonts/spina/Metropolis-ExtraBold.woff2 +0 -0
  8. data/app/assets/fonts/spina/Metropolis-ExtraBoldItalic.woff2 +0 -0
  9. data/app/assets/fonts/spina/Metropolis-ExtraLight.woff2 +0 -0
  10. data/app/assets/fonts/spina/Metropolis-ExtraLightItalic.woff2 +0 -0
  11. data/app/assets/fonts/spina/Metropolis-Light.woff2 +0 -0
  12. data/app/assets/fonts/spina/Metropolis-LightItalic.woff2 +0 -0
  13. data/app/assets/fonts/spina/Metropolis-Medium.woff2 +0 -0
  14. data/app/assets/fonts/spina/Metropolis-MediumItalic.woff2 +0 -0
  15. data/app/assets/fonts/spina/Metropolis-Regular.woff2 +0 -0
  16. data/app/assets/fonts/spina/Metropolis-RegularItalic.woff2 +0 -0
  17. data/app/assets/fonts/spina/Metropolis-SemiBold.woff2 +0 -0
  18. data/app/assets/fonts/spina/Metropolis-SemiBoldItalic.woff2 +0 -0
  19. data/app/assets/fonts/spina/Metropolis-Thin.woff2 +0 -0
  20. data/app/assets/fonts/spina/Metropolis-ThinItalic.woff2 +0 -0
  21. data/app/assets/stylesheets/spina.sass +0 -2
  22. data/app/assets/stylesheets/spina/_buttons.sass +1 -1
  23. data/app/assets/stylesheets/spina/_configuration.sass.erb +1 -1
  24. data/app/assets/stylesheets/spina/_fonts.sass +32 -0
  25. data/app/controllers/spina/admin/media_folders_controller.rb +10 -0
  26. data/app/views/spina/admin/media_folders/_form.html.haml +5 -2
  27. data/app/views/spina/admin/media_folders/edit.js.erb +1 -0
  28. data/app/views/spina/admin/media_folders/show.html.haml +2 -1
  29. data/app/views/spina/admin/pages/_form.html.haml +2 -2
  30. data/config/locales/TH.yml +210 -205
  31. data/config/locales/bg.yml +209 -211
  32. data/config/locales/de.yml +208 -190
  33. data/config/locales/en.yml +208 -208
  34. data/config/locales/es.yml +209 -206
  35. data/config/locales/fr.yml +209 -190
  36. data/config/locales/id.yml +209 -189
  37. data/config/locales/it.yml +215 -152
  38. data/config/locales/nl.yml +210 -197
  39. data/config/locales/pl.yml +208 -185
  40. data/config/locales/pt-BR.yml +208 -205
  41. data/config/locales/ro.yml +248 -225
  42. data/config/locales/ru.yml +221 -171
  43. data/config/locales/sv.yml +208 -183
  44. data/config/locales/tr.yml +214 -151
  45. data/config/locales/zh-CN.yml +215 -175
  46. data/lib/spina/engine.rb +0 -1
  47. data/lib/spina/version.rb +1 -1
  48. metadata +22 -17
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37a4e7a05e778543501bd7eb6207dec35b06b72684075afb2ce79548d9949433
4
- data.tar.gz: b5eb26331d6ceebaad20f7b3abd1ad1f8055d2cc8adb605b8d03a6215463ccad
3
+ metadata.gz: 5ca9516ae7fac7e92db6bb74e3ce6f1b96b02e49ed0c4412289613c1f23e2751
4
+ data.tar.gz: 95642d1a677a7954a7a8ffeee9744429eb5018f341a45074eead164f63da9d20
5
5
  SHA512:
6
- metadata.gz: a0bc9556e474f379f88ecb1ad4ad91ede16919e213e5965924ca4954952c365e2dc69fca5cbeefab4ad46ffca56c1026d81a392171fe462c375f29181d0cd237
7
- data.tar.gz: cf99eea36a61f80dcce76e99fdb79be6d532ba74d21c47ea427cce10fe40b68d3d5499119aa4ae2bdf36ff29041f0ccd18e25be63d9ffbcb63cc67b9010b8f3b
6
+ metadata.gz: 4367545f8be6b4aee64ba2bdce891c75b31ca69b2319258d5bbd59f818f0708bf52ac697f904e5711fa3ccd6f2e67ad564a6b254f2594efc26e8aef356b791eb
7
+ data.tar.gz: c278b5a133c4c30ec98dce7ee7f86b35380c495ac972ce9d4b45229e3c2ff57cd7b0e0f45467fffd235e8aa7700aa0faa0e4173c4af86c5f8ba1884859d27063
data/README.md CHANGED
@@ -1,271 +1,42 @@
1
- ![Spina CMS](http://www.spinacms.com/spinacms.png)
1
+ ![Spina CMS](https://www.spinacms.com/spinacms.png)
2
2
 
3
- [Visit the website](http://www.spinacms.com)
3
+ [Spina CMS](https://www.spinacms.com) is an easy to use CMS that features a clean interface without distractions. [Live demo](http://spinacms-demo.herokuapp.com/admin/pages)
4
4
 
5
5
  [![Build Status](https://travis-ci.com/SpinaCMS/Spina.svg?branch=master)](https://travis-ci.com/SpinaCMS/Spina)
6
6
  [![Code Climate](https://codeclimate.com/github/SpinaCMS/Spina/badges/gpa.svg)](https://codeclimate.com/github/SpinaCMS/Spina)
7
7
  [![Test Coverage](https://codeclimate.com/github/SpinaCMS/Spina/badges/coverage.svg)](https://codeclimate.com/github/SpinaCMS/Spina/coverage)
8
8
  [![Slack](https://slack-spinacms.herokuapp.com/badge.svg)](https://slack-spinacms.herokuapp.com)
9
9
 
10
- [![View performance data on Skylight](https://badges.skylight.io/status/0kzPHGlfswAw.svg)](https://oss.skylight.io/app/applications/0kzPHGlfswAw)
11
- [![View performance data on Skylight](https://badges.skylight.io/problem/0kzPHGlfswAw.svg)](https://oss.skylight.io/app/applications/0kzPHGlfswAw)
12
- [![View performance data on Skylight](https://badges.skylight.io/typical/0kzPHGlfswAw.svg)](https://oss.skylight.io/app/applications/0kzPHGlfswAw)
10
+ ## Getting Started
11
+ [Read the guide](https://www.spinacms.com/guide) to learn more about how to use Spina. If you just want to get started, create a new Ruby on Rails app and follow these instructions:
13
12
 
14
- # Getting Started
15
-
16
- Spina is a CMS for Rails 6.0. This guide is designed for developers with experience using Ruby on Rails.
17
-
18
- To start using Spina CMS add the following line to your Gemfile:
13
+ Add the following line to your Gemfile:
19
14
 
20
15
  ```ruby
21
16
  gem 'spina'
22
17
  ```
23
18
 
24
- First run the installer to get started:
19
+ Run the installer to start the setup process:
25
20
 
26
21
  rails g spina:install
27
22
 
28
- The installer will help you setup your first user.
23
+ The installer will help you create your first user.
29
24
 
30
25
  Then start `rails s` and access Spina at `/admin`.
31
26
 
32
- ## Upgrading from 0.X to 1.0
33
-
34
- Because upgrading 1.0 means switching to ActiveStorage, we've created a complementary gem to make the upgrade process easier.
35
-
36
- `gem 'spina-upgrade', git: 'https://github.com/SpinaCMS/spina-upgrade'`
37
-
38
- After installing this gem, make sure you setup ActiveStorage. Then you can run the upgrade command to migrate all `Spina::Photo` records to `Spina::Image`. Images will be reuploaded using ActiveStorage, so depending on your storage this could take a while.
39
-
40
- `rails g spina:upgrade`
41
-
42
- Replace `Spina::Photo` with `Spina::Image` where necessary and make sure that you edit every `image_tag`.
43
-
44
- ## Upgrading from 0.12 to 0.12.1
45
-
46
- First run the new migrations
47
-
48
- rails spina:install:migrations
49
- rails db:migrate
50
-
51
- This will create a table for the `Spina::Resource` model.
52
-
53
- Globalize is replaced by Mobility. Switching to Mobility is fairly straightfoward.
54
- - Run `rails g spina:install` to add the `mobility.rb` initializer.
55
- - Replace instances of `Globalize` with `Mobility` in your own code
56
-
57
- This is the last release before Spina switches to Rails 5.2 and ActiveStorage.
58
-
59
- ## Upgrading from 0.11 to 0.12
60
-
61
- Just run the new migrations.
62
-
63
- rails spina:install:migrations
64
- rails db:migrate
65
-
66
- ## Upgrading from 0.10 to 0.11
67
-
68
- The spina-template gem is merged into the spina gem. You don't have to use the original spina-template gem anymore.
69
-
70
- ## Upgrading from 0.9 to 0.10
71
-
72
- When upgrading to Spina 0.10 it's essential to update spina-template to version 0.4 or higher. Otherwise layout issues will occur.
73
-
74
- ## Upgrading from 0.8 to 0.9
75
-
76
- Theme configuration changed to:
77
-
78
- ```ruby
79
- # config/initializers/themes/default.rb
80
- Spina::Theme.register do |theme|
81
- # Theme config
82
- end
83
- ```
84
-
85
- And theme sections, structures, layouts, view_layouts and layout_parts
86
- has been normalised.
87
-
88
- Check out [config/initializers/themes/demo.rb](https://github.com/denkGroot/Spina/blob/master/lib/generators/spina/templates/config/initializers/themes/demo.rb) for an example.
89
-
90
- Add new migrations `rake spina:install:migrations` and `rake db:migrate`
91
-
92
- ## Upgrading from 0.7 to 0.8
93
-
94
- Spina-specific configuration moved from `Spina::Engine.config` to just `Spina.config`.
95
- Change the following in your initializer:
96
-
97
- ```ruby
98
- # config/initializers/spina.rb
99
-
100
- Spina::Engine.configure do |config| # OLD
101
- Spina.configure do |config| # NEW
102
- ```
103
-
104
- # Basics
105
-
106
- The installer generates a few initializers that contain necessary configuration for Spina.
107
-
108
- In the initializers folder there's a new folder named `themes`. Inside you will find a configuration file named `default.rb`. This file contains all of your theme-specific settings. You can define multiple Page parts, View templates and Custom pages.
109
-
110
- ## Page parts
111
-
112
- A page in Spina has many Page parts. By default these page parts can be one of the following:
113
-
114
- - `Spina::Line`
115
- - `Spina::Text`
116
- - `Spina::Image`
117
- - `Spina::ImageCollection`
118
- - `Spina::Structure`
119
- - `Spina::Option`
120
-
121
- These are the building blocks of your view templates. You can have an unlimited number of page parts in a page. We prefer to keep the number of parts to a minimum so that managing your pages won't become too complex.
122
-
123
- Spina uses an initializer to create the basic building blocks of your page. There are three steps to add a new building block or page part to your app:
124
-
125
- 1. Set up a new page part in the initializer
126
- 2. Set the new initializer into a view template
127
- 3. Add it to the view
128
-
129
- #### Create a new page part
130
- When you install Spina, you will see the following in `config/initializers/themes/default.rb`
131
-
132
- ```ruby
133
- ::Spina::Theme.register do |theme|
134
-
135
- theme.name = 'default'
136
- theme.title = 'Default Theme'
137
-
138
- theme.page_parts = [{
139
- name: 'content',
140
- title: 'Content',
141
- partable_type: 'Spina::Text'
142
- }]
143
-
144
- theme.view_templates = [{
145
- name: 'homepage',
146
- title: 'Homepage',
147
- page_parts: ['content']
148
- }, {
149
- name: 'show',
150
- title: 'Default',
151
- description: 'A simple page',
152
- usage: 'Use for your content',
153
- page_parts: ['content']
154
- }]
155
-
156
- theme.custom_pages = [{
157
- name: 'homepage',
158
- title: 'Homepage',
159
- deletable: false,
160
- view_template: 'homepage'
161
- }]
162
-
163
- end
164
- ```
165
-
166
- Right now, the default theme is applying a title to the page, with a simple text div below it. Go to `/admin` on your app and have a look. Edit the textbox and go to preview the page.
167
-
168
- Spina represents each building block of your page, called a 'page part,' as a hash inside the `page_parts` array. If we look at the default setup we can see there is one hash inside the array representing the one textbox we see on our page.
169
-
170
- Let's say I wanted to add another text box below this called `portfolio`. First I would add another hash to the `self.page_parts` array like so:
171
-
172
- ```ruby
173
- theme.page_parts = [{
174
- name: 'content',
175
- title: 'Content',
176
- partable_type: 'Spina::Text'
177
- }, {
178
- name: 'portfolio', # added this hash
179
- title: 'Portfolio',
180
- partable_type: 'Spina::Text'
181
- }]
182
- ```
183
-
184
- #### Add it to the view template
185
-
186
- Now, we need to update the `self.view_templates` hash next. These view templates provide customization for the different views you might want. For example, you may have a 'blog' view or an 'about' view which add different page parts. For this example we will add the portfolio part into the 'Default' view template.
187
-
188
- ```ruby
189
- theme.view_templates = [{
190
- name: 'homepage',
191
- title: 'Homepage',
192
- page_parts: ['content']
193
- }, {
194
- name: 'show',
195
- title: 'Default',
196
- description: 'A simple page',
197
- usage: 'Use for your content',
198
- page_parts: ['content', 'portfolio'] # added 'portfolio'
199
- }]
200
- ```
201
-
202
- #### Add it to the view
203
-
204
- Finally, let's go to `views/default/pages/show.html.erb` and add the following:
205
-
206
- ```ruby
207
- <h1><%= @page.title %></h1>
208
-
209
- <%= @page.content(:text).try(:html_safe) %>
210
- <%= @page.content(:portfolio).try(:html_safe) %> # added this line
211
- ```
212
-
213
- We have successfully added another textbox! Restart your server and load up the admin section again. You should see another text box below the content box.
214
-
215
- ## View templates
216
-
217
- Each theme typically has a few different view templates which make up your website. By default Spina generates a *homepage* and *show* template.
218
-
219
- The views for these templates are stored in `app/views/default/pages`.
220
-
221
- ## Navigations
222
-
223
- Usually managing a single list of pages is enough for most use cases. Sometimes however, you need a little more flexibility. This is where navigations come in. You can create multiple navigations which are basically different collections of your pages. You can choose to include all or just a few of your pages. You can also edit the order of pages per navigation.
224
-
225
- You define navigations in your theme's config file:
226
-
227
- ```ruby
228
- ::Spina::Theme.register do |theme|
229
- # ...
230
-
231
- theme.navigations = [{
232
- name: 'main',
233
- label: 'Main navigation',
234
- auto_add_pages: true
235
- }, {
236
- name: 'mobile',
237
- label: 'Mobile'
238
- }]
239
-
240
- # ...
241
- end
242
- ```
243
-
244
- `auto_add_pages` ensures that each page that you create automatically gets added to this navigation.
245
-
246
- Besides navigations there's always a single overview of all pages. Your sitemap and friendly URLs are generated based on this overview.
247
-
248
- Creating navigations is optional.
249
-
250
- ## Custom pages
251
-
252
- You can define custom pages for your theme that will be generated when bootstrapping your website. You can define whether or not they're deletable. By default Spina creates a custom page named Homepage which is not deletable.
253
-
254
- # Contributing
27
+ ## Contributing
255
28
 
256
29
  Check our [Contributing Guide](CONTRIBUTING.md) for instructions on how to help the project.
257
30
 
258
31
  <a href="https://github.com/SpinaCMS/Spina/graphs/contributors"><img src="https://opencollective.com/Spina/contributors.svg?width=890" /></a>
259
32
 
260
-
261
- # Backers
33
+ ## Backers
262
34
 
263
35
  Thank you to all our backers! 🙏 [[Become a backer](https://opencollective.com/Spina#backer)]
264
36
 
265
37
  <a href="https://opencollective.com/Spina#backers" target="_blank"><img src="https://opencollective.com/Spina/backers.svg?width=890"></a>
266
38
 
267
-
268
- # Sponsors
39
+ ## Sponsors
269
40
 
270
41
  Support this project by becoming a sponsor. Your logo will show up here with a link to your website. [[Become a sponsor](https://opencollective.com/Spina#sponsor)]
271
42
 
@@ -280,14 +51,22 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
280
51
  <a href="https://opencollective.com/Spina/sponsor/8/website" target="_blank"><img src="https://opencollective.com/Spina/sponsor/8/avatar.svg"></a>
281
52
  <a href="https://opencollective.com/Spina/sponsor/9/website" target="_blank"><img src="https://opencollective.com/Spina/sponsor/9/avatar.svg"></a>
282
53
 
54
+ ## License
283
55
 
56
+ Spina is released under the [MIT license](LICENSE.md).
284
57
 
285
- # License
58
+ ## Acknowledgements
286
59
 
287
- Spina is released under the [MIT license](LICENSE.md).
60
+ All icons in Spina were made by Brent Jackson [Geomicons](http://jxnblk.com/geomicons-wired/).
288
61
 
289
- # Credits
62
+ The font used in Spina's admin panel is called Metropolis and was created by Chris Simpson [Metropolis](https://github.com/chrismsimpson/Metropolis)
290
63
 
291
- Some parts of Spina are heavily influenced by the wonderful Refinery CMS. Credits to [the Refinery team](https://www.refinerycms.com/).
64
+ Copyright (c) 2015, Chris Simpson <chris@victoryonemedia.com>.
292
65
 
293
- All icons in Spina were made by Brent Jackson [Geomicons](http://jxnblk.com/geomicons-wired/).
66
+ This Font Software is licensed under the SIL Open Font License, Version 1.1.
67
+ This license is copied below, and is also available with a FAQ at:
68
+ http://scripts.sil.org/OFL
69
+
70
+ Version 2.0 - 18 March 2012
71
+
72
+ Some early parts of Spina are influenced by Refinery CMS. Credits to [the Refinery team](https://www.refinerycms.com/).
@@ -1,6 +1,4 @@
1
1
  // Configuration
2
- @import font_awesome5_webfont
3
- @import font_awesome5
4
2
  @import spina/trix
5
3
 
6
4
  @import spina/configuration
@@ -10,7 +10,7 @@ button, input[type="submit"], input[type="button"]
10
10
  color: #444
11
11
  display: inline-block
12
12
  font-size: 14px
13
- font-weight: bold
13
+ font-weight: 600
14
14
  line-height: 20px
15
15
  margin: 0 4px 4px 0
16
16
  outline: none
@@ -11,7 +11,7 @@ $alert-color: orange
11
11
  $warning-color: orange
12
12
 
13
13
  $asset-pipeline: true
14
- $font-family: "Proxima Nova", "Helvetica Neue", "Helvetica", sans-serif
14
+ $font-family: "Metropolis", sans-serif
15
15
  $icon-font: $font-family
16
16
  $gutter: 5em
17
17
 
@@ -1,3 +1,35 @@
1
+ // Metropolis
2
+
3
+ @font-face
4
+ font-family: "Metropolis"
5
+ font-style: normal
6
+ font-weight: normal
7
+ src: url(asset-path("spina/Metropolis-Regular.woff2")) format('woff2')
8
+
9
+ @font-face
10
+ font-family: "Metropolis"
11
+ font-style: normal
12
+ font-weight: 500
13
+ src: url(asset-path("spina/Metropolis-Medium.woff2")) format('woff2')
14
+
15
+ @font-face
16
+ font-family: "Metropolis"
17
+ font-style: normal
18
+ font-weight: 600
19
+ src: url(asset-path("spina/Metropolis-SemiBold.woff2")) format('woff2')
20
+
21
+ @font-face
22
+ font-family: "Metropolis"
23
+ font-style: normal
24
+ font-weight: 700
25
+ src: url(asset-path("spina/Metropolis-Bold.woff2")) format('woff2')
26
+
27
+ @font-face
28
+ font-family: "Metropolis"
29
+ font-style: italic
30
+ font-weight: normal
31
+ src: url(asset-path("spina/Metropolis-RegularItalic.woff2")) format('woff2')
32
+
1
33
  // Icons
2
34
 
3
35
  @font-face
@@ -7,6 +7,10 @@ module Spina
7
7
  @media_folder = MediaFolder.new
8
8
  end
9
9
 
10
+ def edit
11
+ @media_folder = MediaFolder.find(params[:id])
12
+ end
13
+
10
14
  def show
11
15
  add_breadcrumb I18n.t('spina.website.media_library'), admin_media_library_path
12
16
  add_breadcrumb I18n.t('spina.website.images'), spina.admin_images_path
@@ -21,6 +25,12 @@ module Spina
21
25
  redirect_to spina.admin_images_path
22
26
  end
23
27
 
28
+ def update
29
+ @media_folder = MediaFolder.find(params[:id])
30
+ @media_folder.update(media_folder_params)
31
+ redirect_to spina.admin_media_folder_path(@media_folder)
32
+ end
33
+
24
34
  def destroy
25
35
  @media_folder = MediaFolder.find(params[:id])
26
36
  @media_folder.destroy