rocket_cms 0.30.0 → 0.31.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile.lock +1 -1
  3. data/README.md +7 -2
  4. data/app/views/{blocks → components}/_counters.html +0 -0
  5. data/app/views/{blocks → components}/_footer.slim +0 -0
  6. data/app/views/{blocks → components}/_header.slim +0 -0
  7. data/app/views/layouts/application.slim +3 -9
  8. data/app/views/news/index.slim +5 -2
  9. data/app/views/news/show.slim +5 -3
  10. data/config/locales/ru.kaminari.yml +8 -2
  11. data/lib/generators/rocket_cms/layout_generator.rb +5 -3
  12. data/lib/generators/rocket_cms/templates/.browserlistrc +1 -0
  13. data/lib/generators/rocket_cms/templates/ability.erb +6 -2
  14. data/lib/generators/rocket_cms/templates/admin.erb +1 -1
  15. data/lib/generators/rocket_cms/templates/migration_news.rb +5 -1
  16. data/lib/generators/rocket_cms/templates/package.json +3 -0
  17. data/lib/generators/rocket_cms/templates/webpack.config.js +1 -1
  18. data/lib/generators/rocket_cms/templates/webpack/application.es6 +8 -17
  19. data/lib/generators/rocket_cms/templates/webpack/components/footer/index.sass +2 -0
  20. data/lib/generators/rocket_cms/templates/webpack/components/header/index.sass +1 -0
  21. data/lib/generators/rocket_cms/templates/webpack/{blocks → components}/index.es6 +1 -1
  22. data/lib/generators/rocket_cms/templates/webpack/pages/home/index.es6 +1 -1
  23. data/lib/generators/rocket_cms/webpack_generator.rb +5 -7
  24. data/lib/rocket_cms.rb +7 -1
  25. data/lib/rocket_cms/admin.rb +7 -3
  26. data/lib/rocket_cms/controller.rb +1 -1
  27. data/lib/rocket_cms/engine.rb +0 -12
  28. data/lib/rocket_cms/migration.rb +6 -1
  29. data/lib/rocket_cms/models/active_record/news.rb +6 -2
  30. data/lib/rocket_cms/models/active_record/seo.rb +5 -1
  31. data/lib/rocket_cms/models/mongoid/news.rb +7 -3
  32. data/lib/rocket_cms/models/mongoid/seo.rb +9 -2
  33. data/lib/rocket_cms/models/news.rb +2 -1
  34. data/lib/rocket_cms/models/seo.rb +3 -1
  35. data/lib/rocket_cms/version.rb +1 -1
  36. data/template.rb +185 -40
  37. metadata +8 -12
  38. data/config/locales/ru.devise.yml +0 -65
  39. data/lib/filename_to_slug.rb +0 -32
  40. data/lib/generators/rocket_cms/templates/webpack/blocks/footer/index.sass +0 -2
  41. data/lib/generators/rocket_cms/templates/webpack/blocks/header/index.sass +0 -1
  42. data/lib/generators/rocket_cms/templates/webpack/errors/errors.pug +0 -7
  43. data/lib/generators/rocket_cms/templates/webpack/errors/index.es6 +0 -30
  44. data/lib/generators/rocket_cms/templates/webpack/errors/index.sass +0 -49
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 99f28386f0c25e7b5b4130753a92cbd67879a73103731cfc7ee7becbb5f51b56
4
- data.tar.gz: 4b40826b97201fac4d6e135b7626840b191ce27b196f3c2eae488ad47907ad06
3
+ metadata.gz: b6f4ecf3595ded8061376b41de02f02ea0bf0f57cd134894cfa6d53b24ed2da7
4
+ data.tar.gz: 20ef8b7ac32fa60fdeb1e9e4e87e63f8d85de1d891302d4b09a7381310998cc1
5
5
  SHA512:
6
- metadata.gz: 64a1c82f6fdd78704826efcf596168a8d8307b5d000cf7fc615f6f2a20aa595df4d8768b3d70a8f3a89293dcdc1beb8641ed42f253086b1e7337133c91ba0bd1
7
- data.tar.gz: 8b02db625b5ce810e9b14fe92b2048e00c78f759c940bed48916abe8481932d91fcc4aeeb74daeac8579d9564d4c11ccb7a0d20383aabe06b2b5f7109e5e1cf3
6
+ metadata.gz: 708da4b98596577733e91e2e87ca255e8bc0a3b3bd5087e5e1238f4156eedd1318e90be53b51f78a3fbd01bb561fa2c29ab3943809882027556bed411eb86497
7
+ data.tar.gz: 705c53d6285f644329d506cd65fa24e65bebcfa932b105db772a8eb004e671d7b04cc5cbbd19f23db1c8bbcab4d84f420664986c09b2e563079d06e533cbc1ab
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rocket_cms (0.30.0)
4
+ rocket_cms (0.31.0)
5
5
  addressable
6
6
  coffee-rails
7
7
  jquery-rails
data/README.md CHANGED
@@ -70,14 +70,19 @@ If not, uninstall rails and install again
70
70
 
71
71
  Then, for mongoid:
72
72
 
73
- rails new my_app -T -O -m https://gitlab.com/rocket-science/rocket_cms/raw/master/template.rb --skip-spring
73
+ rails new my_app -T -O -m https://gitlab.com/rocket-science/rocket_cms/raw/master/template.rb --skip-spring --skip-javascript
74
74
 
75
75
  for ActiveRecord:
76
76
 
77
- rails new my_app -T --database=postgresql -m https://gitlab.com/rocket-science/rocket_cms/raw/master/template.rb --skip-spring
77
+ rails new my_app -T --database=postgresql -m https://gitlab.com/rocket-science/rocket_cms/raw/master/template.rb --skip-spring --skip-javascript
78
78
 
79
79
  generator creates a new RVM gemset, so after cd'ing to app dir, you should run `bundle install` again if you use rvm.
80
80
 
81
+ Development mode template:
82
+
83
+ rails new my_app -T --database=postgresql -m /data/rocket_cms/template.rb --skip-spring --skip-javascript
84
+
85
+
81
86
  ### Localization
82
87
 
83
88
  All models included in the gem support localization via either [hstore_translate](https://github.com/Leadformance/hstore_translate) or built-in Mongoid localize: true option.
@@ -5,7 +5,6 @@ html lang="ru"
5
5
  meta name="viewport" content="width=device-width, maximum-scale=1, minimal-ui"
6
6
  -# meta property="fb:app_id" content=Rails.application.secrets.fb_app_id
7
7
  -# meta property="vk:app_id" content=Rails.application.secrets.vk_app_id
8
- meta name="turbolinks-cache-control" content="no-cache"
9
8
 
10
9
  title= page_title
11
10
  = yield :meta
@@ -18,7 +17,7 @@ html lang="ru"
18
17
  = javascript_include_tag *webpack_asset_paths('application', extension: 'js')
19
18
 
20
19
  body.no-js class=body_class
21
- = render 'blocks/header'
20
+ = render 'components/header'
22
21
  script.no-js-script
23
22
  | document.body.classList.remove('no-js');
24
23
 
@@ -26,14 +25,9 @@ html lang="ru"
26
25
  = render 'shared/messages'
27
26
  = yield
28
27
 
29
- = render 'blocks/footer'
30
-
31
- .no-js-error.alert.alert-error
32
- | К сожалению, в вашем браузере отключен JavaScript
33
- span Включите его, чтобы зайти на сайт
34
- a class="btn-transparent" target="_blank" href="https://yandex.ru/support/common/browsers-settings/browsers-java-js-settings.xml" Включить JavaScript
28
+ = render 'components/footer'
35
29
 
36
30
  #fb-root data-turbolinks-permanent=""
37
31
  #vk_api_transport data-turbolinks-permanent=""
38
32
 
39
- = render 'blocks/counters'
33
+ = render 'components/counters'
@@ -4,7 +4,10 @@
4
4
  .rs-news-date= l(news.time.to_date)
5
5
  a.rs-news-title href=news_path(news)
6
6
  = news.name
7
- - if !RocketCMS.config.news_image_styles.nil? && news.image?
8
- .rs-news-image= image_tag news.image.url(:thumb)
7
+ - if !RocketCMS.config.news_image_styles.nil?
8
+ - if RocketCMS.paperclip? && news.image?
9
+ .rs-news-image= image_tag news.image.url(:thumb)
10
+ - elsif RocketCMS.shrine? && !news.image.nil?
11
+ .rs-news-image= image_tag news.image(:thumb).url
9
12
  .rs-news-excerpt= news.excerpt
10
13
  = paginate @news
@@ -4,8 +4,10 @@
4
4
  = l(@news.time.to_date)
5
5
  .rs-news-text
6
6
  = @news.excerpt
7
- - if !RocketCMS.config.news_image_styles.nil? && @news.image?
8
- .rs-news-image
9
- = image_tag @news.image.url(:main)
7
+ - if !RocketCMS.config.news_image_styles.nil?
8
+ - if RocketCMS.paperclip? && @news.image?
9
+ .rs-news-image= image_tag @news.image.url(:main)
10
+ - elsif RocketCMS.shrine? && !news.image.nil?
11
+ .rs-news-image= image_tag @news.image(:main).url
10
12
  .rs-news-content
11
13
  = render 'shared/obj', obj: @news
@@ -8,10 +8,16 @@ ru:
8
8
  truncate: "…"
9
9
  helpers:
10
10
  page_entries_info:
11
+ entry:
12
+ one: "запись"
13
+ few: "записи"
14
+ many: "записей"
15
+ other: "записей"
11
16
  one_page:
12
17
  display_entries:
13
- zero: "%{entry_name} не найдены"
14
- one: "Показано <b>1</b> %{entry_name}"
18
+ one: "Показана <b>1</b> %{entry_name}"
19
+ few: "Показано <b>1</b> %{entry_name}"
20
+ many: "Показаны <b>все %{count}</b> %{entry_name}"
15
21
  other: "Показаны <b>все %{count}</b> %{entry_name}"
16
22
  more_pages:
17
23
  display_entries: "Показаны %{entry_name} <b>%{first}&nbsp;-&nbsp;%{last}</b> из <b>%{total}</b>"
@@ -9,9 +9,11 @@ module RocketCms
9
9
  desc 'RocketCMS Layout generator'
10
10
  def layout
11
11
  template('app/views/layouts/application.slim', 'app/views/layouts/application.slim')
12
- template('app/views/blocks/_footer.slim', 'app/views/blocks/_footer.slim')
13
- template('app/views/blocks/_header.slim', 'app/views/blocks/_header.slim')
14
- template('app/views/pages/home/index.slim', 'app/views/pages/home/index.slim')
12
+ template('app/views/components/_header.slim', 'app/views/components/_header.slim')
13
+ template('app/views/components/_footer.slim', 'app/views/components/_footer.slim')
14
+ template('app/views/components/_counters.html', 'app/views/components/_counters.html')
15
+ template('app/views/home/index.slim', 'app/views/home/index.slim')
16
+ template('app/views/pages/show.slim', 'app/views/pages/show.slim')
15
17
  end
16
18
  end
17
19
  end
@@ -7,12 +7,16 @@ class Ability
7
7
  can :manage, :all
8
8
  cannot :destroy, Menu
9
9
  cannot :update, Menu
10
+ if RocketCMS.active_record?
11
+ cannot :destroy, PaperTrail::Version
12
+ cannot :update, PaperTrail::Version
13
+ end
10
14
  admin_ui
11
15
  end
12
16
  end
13
17
 
14
18
  def admin_ui
15
- can :access, :rails_admin # grant access to rails_admin
16
- can :dashboard # grant access to the dashboard
19
+ can :access, :rails_admin
20
+ can :read, :dashboard
17
21
  end
18
22
  end
@@ -14,7 +14,7 @@ RailsAdmin.config do |config|
14
14
  config.current_user_method(&:current_user)
15
15
 
16
16
  ## == Cancan ==
17
- config.authorize_with :cancan
17
+ config.authorize_with :cancancan
18
18
  <% if RocketCMS.mongoid? %>
19
19
  ## == MongoidAudit
20
20
  # config.audit_with :mongoid_audit, 'HistoryTracker'
@@ -15,7 +15,11 @@ class RocketCmsCreateNews < ActiveRecord::Migration[5.0]
15
15
  end
16
16
 
17
17
  t.string :slug, null: false
18
- t.attachment :image
18
+ if RocketCMS.shrine?
19
+ t.jsonb :image_data
20
+ elsif RocketCMS.paperclip?
21
+ t.attachment :image
22
+ end
19
23
  t.timestamps
20
24
  end
21
25
 
@@ -5,6 +5,9 @@
5
5
  "private": true,
6
6
  "repository": "git@rscz.ru:rocket-science/<%= app_name.downcase %>.git",
7
7
  "dependencies": {
8
+ "@rails/actioncable": "^6.0.0",
9
+ "@rails/ujs": "^6.0.0",
10
+ "turbolinks": "^5.2.0",
8
11
  "@babel/core": "^7.0.0",
9
12
  "@babel/plugin-proposal-class-properties": "^7.0.0",
10
13
  "@babel/plugin-proposal-function-bind": "^7.0.0",
@@ -8,7 +8,7 @@ var autoprefixer = require('autoprefixer');
8
8
  var CompressionPlugin = require("compression-webpack-plugin");
9
9
 
10
10
  var host = process.env.HOST || 'localhost'
11
- var devServerPort = 3808;
11
+ var devServerPort = <%= port %>;
12
12
 
13
13
  var production = process.env.NODE_ENV === 'production';
14
14
 
@@ -1,30 +1,21 @@
1
1
  import './fonts';
2
2
  import './layout';
3
3
 
4
- import Errors from 'errors';
5
- import 'flash';
6
-
7
- var errors = new Errors()
8
- document.addEventListener("DOMContentLoaded", function(event) {
9
- errors.checkCookie();
10
- });
11
-
12
4
  import Turbolinks from "turbolinks";
13
5
  Turbolinks.start()
14
6
 
15
- import Rails from 'rails-ujs';
7
+ import Rails from '@rails/ujs';
16
8
  Rails.start();
17
9
 
18
- import axios from 'axios';
19
-
20
- import "./blocks";
10
+ import "./components";
21
11
  import "./pages";
22
12
 
23
- import "analytics"
13
+ //import "analytics"
24
14
  //import goal from "analytics"
25
15
 
26
- document.addEventListener("turbolinks:load", function() {
27
- axios.defaults.headers.common['X-CSRF-Token'] = $('meta[name=csrf-token]').attr('content');
28
- axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
29
- });
16
+ //import axios from 'axios';
17
+ //document.addEventListener("turbolinks:load", function() {
18
+ //axios.defaults.headers.common['X-CSRF-Token'] = $('meta[name=csrf-token]').attr('content');
19
+ //axios.defaults.headers.common['X-Requested-With'] = 'XMLHttpRequest';
20
+ //});
30
21
 
@@ -1,4 +1,4 @@
1
- // import your blocks here
1
+ // import your components here
2
2
  import "./header";
3
3
  import "./footer";
4
4
 
@@ -1 +1 @@
1
- // import page-specific blocks here
1
+ // import page-specific components here
@@ -12,15 +12,13 @@ module RocketCms
12
12
  desc 'RocketCMS webpack generator'
13
13
  def install
14
14
  copy_file ".babelrc", ".babelrc"
15
+ copy_file ".browserlistrc", ".browserlistrc"
16
+ copy_file "postcss.config.js", "postcss.config.js"
15
17
 
16
18
  copy_file "webpack/common/mixins.sass", "webpack/common/mixins.sass"
17
19
  copy_file "webpack/common/variables.sass", "webpack/common/variables.sass"
18
20
  copy_file "webpack/common/index.sass", "webpack/common/index.sass"
19
21
 
20
- copy_file "webpack/errors/errors.pug", "webpack/errors/errors.pug"
21
- copy_file "webpack/errors/index.es6", "webpack/errors/index.es6"
22
- copy_file "webpack/errors/index.sass", "webpack/errors/index.sass"
23
-
24
22
  copy_file "webpack/flash/index.es6", "webpack/flash/index.es6"
25
23
  copy_file "webpack/flash/index.sass", "webpack/flash/index.sass"
26
24
 
@@ -32,9 +30,9 @@ module RocketCms
32
30
  copy_file "webpack/layout/main.sass", "webpack/layout/main.sass"
33
31
  copy_file "webpack/layout/typography.sass", "webpack/layout/typography.sass"
34
32
 
35
- copy_file "webpack/blocks/index.es6", "webpack/blocks/index.es6"
36
- copy_file "webpack/blocks/header/index.sass", "webpack/blocks/header/index.sass"
37
- copy_file "webpack/blocks/footer/index.sass", "webpack/blocks/footer/index.sass"
33
+ copy_file "webpack/components/index.es6", "webpack/components/index.es6"
34
+ copy_file "webpack/components/header/index.sass", "webpack/components/header/index.sass"
35
+ copy_file "webpack/components/footer/index.sass", "webpack/components/footer/index.sass"
38
36
 
39
37
  copy_file "webpack/pages/index.es6", "webpack/pages/index.es6"
40
38
  copy_file "webpack/pages/home/index.es6", "webpack/pages/home/index.es6"
@@ -6,7 +6,6 @@ end
6
6
  require 'rocket_cms/version'
7
7
  require 'validates_email_format_of'
8
8
  require 'smart_excerpt'
9
- require 'filename_to_slug'
10
9
 
11
10
  require 'kaminari'
12
11
  require 'addressable/uri'
@@ -42,6 +41,13 @@ module RocketCMS
42
41
  "#{model_namespace}::#{name}".constantize
43
42
  end
44
43
 
44
+ def shrine?
45
+ defined?(::Shrine)
46
+ end
47
+ def paperclip?
48
+ !shrine? && defined(::Paperclip)
49
+ end
50
+
45
51
  def url_helper
46
52
  @@url_helper ||= RocketCMS::UrlHelper.new
47
53
  end
@@ -37,7 +37,11 @@ module RocketCMS
37
37
  field :robots, :string
38
38
 
39
39
  field :og_title, :string
40
- field :og_image, :paperclip
40
+ if RocketCMS.shrine?
41
+ field :og_image, :paperclip
42
+ elsif RocketCMS.paperclip?
43
+ field :og_image, :paperclip
44
+ end
41
45
  end
42
46
  end
43
47
 
@@ -60,7 +64,7 @@ module RocketCMS
60
64
  end
61
65
  edit do
62
66
  field :name
63
- field :content, :ck_editor
67
+ field :content, :ckeditor
64
68
  RocketCMS.apply_patches self
65
69
  group :menu do
66
70
  label I18n.t('rs.menu')
@@ -143,7 +147,7 @@ module RocketCMS
143
147
  end
144
148
 
145
149
  edit do
146
- field :content, :ck_editor
150
+ field :content, :ckeditor
147
151
  RocketCMS.apply_patches self
148
152
  group :seo, &RocketCMS.seo_config
149
153
  end
@@ -4,7 +4,7 @@ module RocketCMS::Controller
4
4
  include RsErrors
5
5
  include RsPages
6
6
  include RsMenu
7
- include RsCookies
7
+ #include RsCookies
8
8
  protect_from_forgery with: :exception
9
9
  helper_method :page_title
10
10
  helper_method :app_url
@@ -4,18 +4,6 @@ module RocketCMS
4
4
  require File.expand_path('../tasks', __FILE__)
5
5
  end
6
6
 
7
- initializer 'rocket_cms.paperclip' do
8
- require 'paperclip/style'
9
- module ::Paperclip
10
- class Style
11
- alias_method :processor_options_without_auto_orient, :processor_options
12
- def processor_options
13
- processor_options_without_auto_orient.merge(auto_orient: false)
14
- end
15
- end
16
- end
17
- end
18
-
19
7
  config.after_initialize do
20
8
  # trigger autoload so models are registered in Mongoid::Elasticearch
21
9
  RocketCMS.config.search_models.map(&:constantize)
@@ -17,7 +17,12 @@ module RocketCMS
17
17
  t.string :og_title
18
18
  end
19
19
  t.string :robots
20
- t.attachment :og_image
20
+
21
+ if RocketCMS.shrine?
22
+ t.jsonb :og_image_data
23
+ elsif RocketCMS.paperclip?
24
+ t.attachment :og_image
25
+ end
21
26
  end
22
27
 
23
28
  def map_fields(t)
@@ -4,8 +4,12 @@ module RocketCMS
4
4
  module News
5
5
  extend ActiveSupport::Concern
6
6
  included do
7
- unless RocketCMS.config.news_image_styles.nil?
8
- has_attached_file :image, styles: RocketCMS.config.news_image_styles
7
+ if !RocketCMS.config.news_image_styles.nil?
8
+ if RocketCMS.shrine?
9
+ include NewsUploader.attachment(:image)
10
+ elsif RocketCMS.paperclip?
11
+ has_attached_file :image, styles: RocketCMS.config.news_image_styles
12
+ end
9
13
  end
10
14
 
11
15
  has_paper_trail if respond_to?(:has_paper_trail)
@@ -4,7 +4,11 @@ module RocketCMS
4
4
  module Seo
5
5
  extend ActiveSupport::Concern
6
6
  included do
7
- has_attached_file :og_image, styles: {thumb: "800x600>"}
7
+ if RocketCMS.shrine?
8
+ include OgImageUploader.attachment(:og_image)
9
+ elsif RocketCMS.paperclip?
10
+ has_attached_file :og_image, styles: {thumb: "800x600>"}
11
+ end
8
12
  if RocketCMS.config.localize
9
13
  translates :h1, :title, :keywords, :description, :og_title
10
14
  end
@@ -3,13 +3,17 @@ module RocketCMS
3
3
  module Mongoid
4
4
  module News
5
5
  extend ActiveSupport::Concern
6
- unless RocketCMS.config.news_image_styles.nil?
7
- include ::Mongoid::Paperclip
6
+ if !RocketCMS.config.news_image_styles.nil?
7
+ if RocketCMS.shrine?
8
+ include ImageUploader::Attachment(:image)
9
+ elsif RocketCMS.paperclip?
10
+ include ::Mongoid::Paperclip
11
+ end
8
12
  end
9
13
  included do
10
14
  field :time, type: Time
11
15
  index({enabled: 1, time: 1})
12
- unless RocketCMS.config.news_image_styles.nil?
16
+ if RocketCMS.paperclip? && RocketCMS.config.news_image_styles.nil?
13
17
  has_mongoid_attached_file :image, styles: RocketCMS.config.news_image_styles
14
18
  end
15
19
  field :name, type: String, localize: RocketCMS.config.localize
@@ -3,7 +3,11 @@ module RocketCMS
3
3
  module Mongoid
4
4
  module Seo
5
5
  extend ActiveSupport::Concern
6
- include ::Mongoid::Paperclip
6
+ if RocketCMS.shrine?
7
+ include ImageUploader::Attachment(:og_image)
8
+ elsif RocketCMS.paperclip?
9
+ include ::Mongoid::Paperclip
10
+ end
7
11
  included do
8
12
  field :name, type: String, localize: RocketCMS.config.localize
9
13
  field :h1, type: String, localize: RocketCMS.config.localize
@@ -14,7 +18,10 @@ module RocketCMS
14
18
  field :robots, type: String, localize: RocketCMS.config.localize
15
19
 
16
20
  field :og_title, type: String, localize: RocketCMS.config.localize
17
- has_mongoid_attached_file :og_image, styles: {thumb: "800x600>"}
21
+
22
+ if RocketCMS.paperclip?
23
+ has_mongoid_attached_file :og_image, styles: {thumb: "800x600>"}
24
+ end
18
25
  end
19
26
  end
20
27
  end
@@ -13,7 +13,8 @@ module RocketCMS
13
13
  end
14
14
 
15
15
  included do
16
- unless RocketCMS.config.news_image_styles.nil?
16
+
17
+ if RocketCMS.paperclip? && !RocketCMS.config.news_image_styles.nil?
17
18
  validates_attachment_content_type :image, content_type: /\Aimage\/.*\Z/, if: :image?
18
19
  end
19
20
 
@@ -9,7 +9,9 @@ module RocketCMS
9
9
 
10
10
  included do
11
11
  RocketCMS.apply_patches self
12
- validates_attachment_content_type :og_image, content_type: /\Aimage\/.*\Z/, if: :og_image?
12
+ if RocketCMS.paperclip?
13
+ validates_attachment_content_type :og_image, content_type: /\Aimage\/.*\Z/, if: :og_image?
14
+ end
13
15
  end
14
16
  end
15
17
  end
@@ -1,3 +1,3 @@
1
1
  module RocketCMS
2
- VERSION = '0.30.0'
2
+ VERSION = '0.31.0'
3
3
  end
@@ -3,10 +3,10 @@ version = rails_spec.version.to_s
3
3
 
4
4
  mongoid = options[:skip_active_record]
5
5
  yarn = !options[:skip_yarn]
6
- no_dev = !options[:is_dev]
6
+ is_dev = options[:template].index("http").nil?
7
7
  spring = !options[:skip_spring]
8
8
 
9
- if Gem::Version.new(version) < Gem::Version.new('5.0.0')
9
+ if Gem::Version.new(version) < Gem::Version.new('6.0.0')
10
10
  puts "You are using an old version of Rails (#{version})"
11
11
  puts "Please update"
12
12
  puts "Stopping"
@@ -24,25 +24,27 @@ git_source(:github) do |repo_name|
24
24
  "https://github.com/#{repo_name}.git"
25
25
  end
26
26
  '}
27
- gem 'rails', '5.2.0'
27
+ gem 'rails', '6.0.1'
28
+ gem 'rails-i18n'
28
29
  #{if mongoid then "gem 'mongoid', '~> 6.1.0'" else "gem 'pg', '>= 0.18', '< 2.0'" end}
29
30
  gem 'turbolinks' #required for redirects even if using via webpack
30
31
 
31
- gem 'sass'
32
32
 
33
33
  #{
34
34
  "#{if mongoid then "gem 'rocket_cms_mongoid', path: '/data/rocket_cms'" else "gem 'rocket_cms_activerecord', path: '/data/rocket_cms'" end}
35
- gem 'rocket_cms', path: '/data/rocket_cms'" unless no_dev}
36
- #{"#{if mongoid then "gem 'rocket_cms_mongoid'" else "gem 'rocket_cms_activerecord'" end}" if no_dev}
35
+ gem 'rocket_cms', path: '/data/rocket_cms'" if is_dev}
36
+ #{"#{if mongoid then "gem 'rocket_cms_mongoid'" else "gem 'rocket_cms_activerecord'" end}" if !is_dev}
37
37
 
38
- gem 'rails_admin', github: 'sferik/rails_admin'
39
- #{"gem 'friendly_id', github: 'norman/friendly_id'" unless mongoid}
38
+ gem 'glebtv-ckeditor'
39
+
40
+ # wait for https://github.com/sferik/rails_admin/pull/3207
41
+ gem 'rails_admin', github: "sferik/rails_admin"
40
42
 
41
43
  gem 'slim'
42
- gem 'haml'
43
44
 
44
- gem 'sass-rails'
45
- gem 'rs-webpack-rails', '~> 0.11.1'
45
+ #gem 'sass'
46
+ #gem 'sass-rails'
47
+ gem 'rs-webpack-rails'
46
48
 
47
49
  gem 'devise'
48
50
  gem 'devise-i18n'
@@ -54,9 +56,13 @@ gem 'puma'
54
56
 
55
57
  gem 'sentry-raven'
56
58
 
57
- gem 'uglifier'
59
+ gem 'shrine'
60
+ #{"gem 'shrine-mongoid'" if mongoid}
61
+ gem 'image_processing'
62
+
63
+ #gem 'uglifier'
58
64
 
59
- gem 'rs_russian'
65
+ #gem 'rs_russian'
60
66
  #gem 'enumerize'
61
67
  #gem 'active_model_serializers'
62
68
 
@@ -65,6 +71,7 @@ gem 'tzinfo-data' if Gem.win_platform?
65
71
  gem 'wdm', '>= 0.1.0' if Gem.win_platform?
66
72
 
67
73
  gem 'bootsnap', require: false
74
+ gem 'irb'
68
75
 
69
76
  group :development do
70
77
  #gem 'binding_of_caller'
@@ -163,7 +170,7 @@ puma
163
170
 
164
171
  "
165
172
 
166
- #create_file '.ruby-version', "2.5.0\n"
173
+ #create_file '.ruby-version', "2.6.5\n"
167
174
  #create_file '.ruby-gemset', "#{app_name}\n"
168
175
 
169
176
  run 'bundle install --without production'
@@ -233,10 +240,11 @@ gsub_file 'app/models/user.rb', '# field :locked_at', 'field :locked_at'
233
240
  end
234
241
 
235
242
  if mongoid
236
- generate "ckeditor:install", "--orm=mongoid", "--backend=paperclip"
243
+ generate "ckeditor:install", "--orm=mongoid", "--backend=shrine"
237
244
  else
238
- generate "ckeditor:install", "--orm-active_record", "--backend=paperclip"
245
+ generate "ckeditor:install", "--orm-active_record", "--backend=shrine"
239
246
  end
247
+ remove_file 'config/initializers/ckeditor_shrine.rb'
240
248
 
241
249
  unless mongoid
242
250
  generate "rocket_cms:migration"
@@ -279,14 +287,6 @@ end
279
287
 
280
288
  create_file 'config/locales/ru.yml' do <<-TEXT
281
289
  ru:
282
- attributes:
283
- is_default: По умолчанию
284
- mongoid:
285
- models:
286
- item: Товар
287
- attributes:
288
- item:
289
- price: Цена
290
290
  TEXT
291
291
  end
292
292
 
@@ -301,36 +301,166 @@ User.create!(email: 'admin@#{app_name.dasherize.downcase}.ru', password: admin_p
301
301
 
302
302
  Page.destroy_all
303
303
  Menu.destroy_all
304
+ News.destroy_all
305
+
304
306
  h = Menu.create(name: 'Главное', text_slug: 'main').id
305
- p = Page.create!(name: 'Проекты', content: 'проекты', fullpath: '/projects', menu_ids: [h])
306
- Page.create!(name: 'Прайс лист', fullpath: '/price', menu_ids: [h])
307
- Page.create!(name: 'Галерея', fullpath: '/galleries', menu_ids: [h])
308
- c = Page.create!(name: 'О компании', fullpath: '/company', menu_ids: [h], content: 'О Компании')
307
+ Page.create!(name: 'О компании', fullpath: '/company', menu_ids: [h], content: 'О Компании')
309
308
  Page.create!(name: 'Новости', fullpath: '/news', menu_ids: [h])
310
309
  Page.create!(name: 'Контакты', fullpath: '/contacts', menu_ids: [h], content: 'Текст стр контакты')
311
310
 
311
+ 3.times do |i|
312
+ News.create!(name: "test " + i.to_s, content: "test", time: i.days.ago)
313
+ end
314
+
312
315
  TEXT
313
316
  end
314
317
 
315
- create_file 'config/initializers/rack.rb' do <<-TEXT
316
- Rack::Utils.multipart_part_limit = 0
318
+ create_file 'app/uploaders/news_uploader.rb' do <<-TEXT
319
+ class NewsUploader < Shrine
320
+ plugin :determine_mime_type
321
+ plugin :validation_helpers
322
+ plugin :derivatives
323
+
324
+ Attacher.validate do
325
+ validate_mime_type_inclusion %w[image/jpeg image/gif image/png]
326
+ validate_max_size 2.megabytes
327
+ end
328
+
329
+ Attacher.derivatives do |original|
330
+ magick = ImageProcessing::MiniMagick.source(original)
331
+
332
+ {
333
+ main: magick.resize_to_limit!(800, 800),
334
+ thumb: magick.resize_to_limit!(300, 300)
335
+ }
336
+ end
337
+ end
338
+ TEXT
339
+ end
317
340
 
318
- if Rails.env.development?
319
- module Rack
320
- class CommonLogger
321
- alias_method :log_without_assets, :log
322
- #{'ASSETS_PREFIX = "/#{Rails.application.config.assets.prefix[/\A\/?(.*?)\/?\z/, 1]}/"'}
323
- def log(env, status, header, began_at)
324
- unless env['REQUEST_PATH'].start_with?(ASSETS_PREFIX) || env['REQUEST_PATH'].start_with?('/uploads') || env['REQUEST_PATH'].start_with?('/system')
325
- log_without_assets(env, status, header, began_at)
341
+ create_file 'app/uploaders/og_image_uploader.rb' do <<-TEXT
342
+ class OgImageUploader < Shrine
343
+ plugin :determine_mime_type
344
+ plugin :validation_helpers
345
+
346
+ Attacher.validate do
347
+ validate_mime_type_inclusion %w[image/jpeg image/gif image/png]
348
+ validate_max_size 2.megabytes
349
+ end
350
+ end
351
+ TEXT
352
+ end
353
+
354
+ create_file 'extra/shrine/plugins/custom_pretty_location.rb' do <<-TEXT
355
+ require 'shrine/plugins/pretty_location'
356
+ class Shrine
357
+ module Plugins
358
+ module CustomPrettyLocation
359
+ include Shrine::Plugins::PrettyLocation
360
+
361
+ module InstanceMethods
362
+ include Shrine::Plugins::PrettyLocation::InstanceMethods
363
+
364
+ def record_identifier(record)
365
+ id = record.public_send(opts[:custom_pretty_location][:identifier])
366
+ case id
367
+ when Integer
368
+ str_id = "%09d".freeze % id
369
+ str_id.scan(/\d{3}/).join("/".freeze)
370
+ when String
371
+ id.scan(/.{3}/).first(3).join("/".freeze)
372
+ else
373
+ # NOTE: 'raise' cannot be used. It fails on save.
374
+ nil
375
+ end
326
376
  end
327
377
  end
378
+
328
379
  end
380
+ register_plugin(:custom_pretty_location, CustomPrettyLocation)
329
381
  end
330
382
  end
331
383
  TEXT
332
384
  end
333
385
 
386
+ remove_file 'app/assets/config/manifest.js'
387
+ create_file 'app/assets/config/manifest.js' do <<-TEXT
388
+ //= link_tree ../images
389
+ //= link_directory ../stylesheets .css
390
+ //= link ckcontent.css
391
+ //= link ckeditor/application.css
392
+ //= link ckeditor/application.js
393
+ TEXT
394
+ end
395
+
396
+ remove_file 'config/initializers/assets.rb'
397
+ create_file 'config/initializers/assets.rb' do <<-TEXT
398
+ # Be sure to restart your server when you modify this file.
399
+
400
+ # Version of your assets, change this if you want to expire all your assets.
401
+ Rails.application.config.assets.version = '1.0'
402
+
403
+ # Add additional assets to the asset load path.
404
+ # Rails.application.config.assets.paths << Emoji.images_path
405
+ # Add Yarn node_modules folder to the asset load path.
406
+ #Rails.application.config.assets.paths << Rails.root.join('node_modules')
407
+
408
+ # Precompile additional assets.
409
+ # application.js, application.css, and all non-JS/CSS in the app/assets
410
+ # folder are already added.
411
+ # Rails.application.config.assets.precompile += %w( admin.js admin.css )
412
+
413
+ TEXT
414
+ end
415
+
416
+ create_file 'config/initializers/shrine.rb' do <<-TEXT
417
+ require "shrine"
418
+ require "shrine/storage/file_system"
419
+
420
+ Shrine.logger = Rails.logger
421
+
422
+ # Choose your favorite image processor
423
+ require 'image_processing/mini_magick'
424
+ SHRINE_PICTURE_PROCESSOR = ImageProcessing::MiniMagick
425
+
426
+ Shrine.storages = {
427
+ # temporary
428
+ cache: Shrine::Storage::FileSystem.new(
429
+ "public",
430
+ prefix: "uploads/cache"
431
+ ),
432
+ # permanent
433
+ store: Shrine::Storage::FileSystem.new(
434
+ "public",
435
+ prefix: "uploads"
436
+ ),
437
+ }
438
+
439
+ Shrine.plugin :upload_options, cache: { move: true }, store: { move: true }
440
+
441
+ Shrine.plugin :custom_pretty_location, class_underscore: :true
442
+
443
+ Shrine.plugin :determine_mime_type
444
+ #{"Shrine.plugin :mongoid" if mongoid}
445
+ Shrine.plugin :instrumentation
446
+
447
+ Shrine.plugin :activerecord # loads Active Record integration
448
+ Shrine.plugin :cached_attachment_data # enables retaining cached file across form redisplays
449
+ Shrine.plugin :restore_cached_data # extracts metadata for assigned cached files
450
+
451
+ Shrine.plugin :validation_helpers
452
+ Shrine.plugin :derivatives
453
+
454
+ require 'ckeditor/backend/shrine'
455
+ TEXT
456
+ end
457
+
458
+
459
+ create_file 'config/initializers/rack.rb' do <<-TEXT
460
+ Rack::Utils.multipart_part_limit = 0
461
+ TEXT
462
+ end
463
+
334
464
  create_file 'app/assets/stylesheets/rails_admin/custom/theming.sass' do <<-TEXT
335
465
  TEXT
336
466
  end
@@ -431,6 +561,9 @@ Bundler.require(*Rails.groups)
431
561
 
432
562
  module #{app_name.camelize}
433
563
  class Application < Rails::Application
564
+ # Initialize configuration defaults for originally generated Rails version.
565
+ config.load_defaults 6.0
566
+
434
567
  config.generators do |g|
435
568
  g.test_framework :rspec
436
569
  g.view_specs false
@@ -472,11 +605,17 @@ create_file 'app/assets/javascripts/application.js' do <<-TEXT
472
605
  TEXT
473
606
  end
474
607
 
475
- remove_file 'app/assets/javascripts/application.css'
476
- create_file 'app/assets/javascripts/application.css' do <<-TEXT
608
+ remove_file 'app/assets/stylesheets/application.css'
609
+ create_file 'app/assets/stylesheets/application.css' do <<-TEXT
477
610
  TEXT
478
611
  end
479
612
 
613
+ create_file 'app/assets/stylesheets/ckcontent.css' do <<-TEXT
614
+ div.red {
615
+ color: red;
616
+ }
617
+ TEXT
618
+ end
480
619
 
481
620
  if mongoid
482
621
  FileUtils.cp(Pathname.new(destination_root).join('config', 'mongoid.yml').to_s, Pathname.new(destination_root).join('config', 'mongoid.yml.example').to_s)
@@ -745,3 +884,9 @@ end
745
884
 
746
885
  git add: "."
747
886
  git commit: %Q{ -m 'Initial commit' }
887
+
888
+ unless mongoid
889
+ rake "db:migrate"
890
+ end
891
+
892
+ rake 'db:seed'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rocket_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.30.0
4
+ version: 0.31.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - glebtv
@@ -228,9 +228,9 @@ files:
228
228
  - app/models/news.rb
229
229
  - app/models/page.rb
230
230
  - app/models/seo.rb
231
- - app/views/blocks/_counters.html
232
- - app/views/blocks/_footer.slim
233
- - app/views/blocks/_header.slim
231
+ - app/views/components/_counters.html
232
+ - app/views/components/_footer.slim
233
+ - app/views/components/_header.slim
234
234
  - app/views/contact_mailer/new_message_email.html.slim
235
235
  - app/views/contacts/new.slim
236
236
  - app/views/contacts/sent.slim
@@ -257,7 +257,6 @@ files:
257
257
  - config/locales/en.rocket_admin.yml
258
258
  - config/locales/en.rs.yml
259
259
  - config/locales/ru.cancan.yml
260
- - config/locales/ru.devise.yml
261
260
  - config/locales/ru.kaminari.yml
262
261
  - config/locales/ru.models.yml
263
262
  - config/locales/ru.rails_admin.yml
@@ -265,13 +264,13 @@ files:
265
264
  - config/locales/ru.rs.yml
266
265
  - config/locales/ru.simple_captcha.yml
267
266
  - config/locales/ru.simple_form.yml
268
- - lib/filename_to_slug.rb
269
267
  - lib/generators/rocket_cms/ability_generator.rb
270
268
  - lib/generators/rocket_cms/admin_generator.rb
271
269
  - lib/generators/rocket_cms/capify_generator.rb
272
270
  - lib/generators/rocket_cms/layout_generator.rb
273
271
  - lib/generators/rocket_cms/migration_generator.rb
274
272
  - lib/generators/rocket_cms/templates/.babelrc
273
+ - lib/generators/rocket_cms/templates/.browserlistrc
275
274
  - lib/generators/rocket_cms/templates/Capfile
276
275
  - lib/generators/rocket_cms/templates/ability.erb
277
276
  - lib/generators/rocket_cms/templates/admin.erb
@@ -288,15 +287,12 @@ files:
288
287
  - lib/generators/rocket_cms/templates/webpack.config.js
289
288
  - lib/generators/rocket_cms/templates/webpack/analytics.es6
290
289
  - lib/generators/rocket_cms/templates/webpack/application.es6
291
- - lib/generators/rocket_cms/templates/webpack/blocks/footer/index.sass
292
- - lib/generators/rocket_cms/templates/webpack/blocks/header/index.sass
293
- - lib/generators/rocket_cms/templates/webpack/blocks/index.es6
294
290
  - lib/generators/rocket_cms/templates/webpack/common/index.sass
295
291
  - lib/generators/rocket_cms/templates/webpack/common/mixins.sass
296
292
  - lib/generators/rocket_cms/templates/webpack/common/variables.sass
297
- - lib/generators/rocket_cms/templates/webpack/errors/errors.pug
298
- - lib/generators/rocket_cms/templates/webpack/errors/index.es6
299
- - lib/generators/rocket_cms/templates/webpack/errors/index.sass
293
+ - lib/generators/rocket_cms/templates/webpack/components/footer/index.sass
294
+ - lib/generators/rocket_cms/templates/webpack/components/header/index.sass
295
+ - lib/generators/rocket_cms/templates/webpack/components/index.es6
300
296
  - lib/generators/rocket_cms/templates/webpack/flash/index.es6
301
297
  - lib/generators/rocket_cms/templates/webpack/flash/index.sass
302
298
  - lib/generators/rocket_cms/templates/webpack/fonts/index.sass
@@ -1,65 +0,0 @@
1
- ru:
2
- devise:
3
- confirmations:
4
- confirmed: Ваша учётная запись подтверждена. Теперь вы вошли в систему.
5
- send_instructions: В течение нескольких минут вы получите письмо с инструкциями по подтверждению вашей учётной записи.
6
- send_paranoid_instructions: Если ваш адрес e-mail есть в нашей базе данных, то в течение нескольких минут вы получите письмо с инструкциями по подтверждению вашей учётной записи.
7
- failure:
8
- already_authenticated: Вы уже вошли в систему.
9
- inactive: Ваша учётная запись ещё не активирована.
10
- invalid: Неверный адрес e-mail или пароль.
11
- invalid_token: Неверный ключ аутентификации.
12
- locked: Ваша учётная запись заблокирована.
13
- not_found_in_database:
14
- timeout: Ваш сеанс закончился. Пожалуйста, войдите в систему снова.
15
- unauthenticated: Вам необходимо войти в систему или зарегистрироваться.
16
- unconfirmed: Вы должны подтвердить вашу учётную запись.
17
- mailer:
18
- confirmation_instructions:
19
- subject: Инструкции по подтверждению учётной записи
20
- reset_password_instructions:
21
- subject: Инструкции по восстановлению пароля
22
- unlock_instructions:
23
- subject: Инструкции по разблокировке учётной записи
24
- omniauth_callbacks:
25
- failure: Вы не можете войти в систему с учётной записью из %{kind}, т.к. "%{reason}".
26
- success: Вход в систему выполнен с учётной записью из %{kind}.
27
- passwords:
28
- no_token: Доступ к этой странице возможен только по ссылке из письма о восстановлении пароля. Если Вы пришли по такой ссылке, пожалуйста убедитесь что Вы скопировали всю ссылку целиком.
29
- send_instructions: В течение нескольких минут вы получите письмо с инструкциями по восстановлению вашего пароля.
30
- send_paranoid_instructions: Если ваш адрес e-mail есть в нашей базе данных, то в течение нескольких минут вы получите письмо с инструкциями по восстановлению вашего пароля.
31
- updated: Ваш пароль изменён. Теперь вы вошли в систему.
32
- updated_not_active: Ваш пароль изменен.
33
- registrations:
34
- destroyed: До свидания! Ваша учётная запись удалена. Надеемся снова увидеть вас.
35
- signed_up: Добро пожаловать! Вы успешно зарегистрировались.
36
- signed_up_but_inactive: Вы успешно зарегистрированы. Однако, вы не можете войти в систему, потому что ваша учетная запись не активирована.
37
- signed_up_but_locked: Вы успешно зарегистрированы. Однако, вы не можете войти в систему, потому что ваша учетная запись заблокирована.
38
- signed_up_but_unconfirmed: Письмо со ссылкой для подтверждения было отправлено на ваш e-mail. Пожалуйста, перейдите по ссылке, чтобы подтвердить вашу учетную запись.
39
- update_needs_confirmation: Вы успешно обновили данные вашей учетной записи, но нам нужно проверить ваш новый адрес e-mail. Пожалуйста, проверьте ваш почтовый ящик и перейдите по ссылке, чтобы закончить процедуру проверки вашего нового адреса e-mail.
40
- updated: Ваша учётная запись изменена.
41
- sessions:
42
- signed_in: Вход в систему выполнен.
43
- signed_out: Выход из системы выполнен.
44
- unlocks:
45
- send_instructions: В течение нескольких минут вы получите письмо с инструкциями по разблокировке вашей учётной записи.
46
- send_paranoid_instructions: Если ваша учётная запись существует, то в течение нескольких минут вы получите письмо с инструкциями по её разблокировке.
47
- unlocked: Ваша учётная запись разблокирована. Теперь вы можете войти в систему.
48
- failure:
49
- user:
50
- not_found_in_database: Пользователь не найден в базе
51
- invalid: Неверный пароль
52
- unauthenticated: Необходимо авторизоваться
53
- unconfirmed: 'Необходимо подтвердить адрес электронной почты'
54
- errors:
55
- messages:
56
- already_confirmed: уже подтверждена. Пожалуйста, попробуйте войти в систему
57
- confirmation_period_expired:
58
- expired: устарела. Пожалуйста, запросите новую
59
- not_found: не найдена
60
- not_locked: не заблокирована
61
- not_saved:
62
- few: ! '%{resource}: сохранение не удалось из-за %{count} ошибок'
63
- many: ! '%{resource}: сохранение не удалось из-за %{count} ошибок'
64
- one: ! '%{resource}: сохранение не удалось из-за %{count} ошибки'
65
- other: ! '%{resource}: сохранение не удалось из-за %{count} ошибки'
@@ -1,32 +0,0 @@
1
- require 'stringex'
2
- require 'digest/md5'
3
-
4
- class String
5
- def filename_to_slug
6
- s = self.to_url
7
- if s.blank?
8
- return Digest::MD5.hexdigest(self)
9
- end
10
- s
11
- end
12
- end
13
-
14
- module FilenameToSlug
15
- extend ActiveSupport::Concern
16
- included do
17
- before_post_process :filename_to_slug
18
- end
19
-
20
- def filename_to_slug
21
- if self.class.attachment_definitions
22
- self.class.attachment_definitions.each do |k,v|
23
- if self.send(k).file?
24
- full_file_name = self.send("#{k}_file_name")
25
- extension = File.extname(full_file_name)[1..-1]
26
- file_name = full_file_name[0..full_file_name.size-extension.size-1]
27
- self.send("#{k}").instance_write(:file_name, "#{file_name.filename_to_slug}.#{extension.filename_to_slug}")
28
- end
29
- end
30
- end
31
- end
32
- end
@@ -1,7 +0,0 @@
1
- .errors
2
- .errors-inner
3
- h3= title
4
- a(target="_blank" href=link)
5
- = anchor
6
- = message
7
-
@@ -1,30 +0,0 @@
1
- import './index.sass';
2
- import Cookies from 'js-cookie';
3
- import template from './errors.pug';
4
-
5
- const COOKIE_ERROR = {
6
- title: 'В вашем броузере отключены Cookies',
7
- link: 'https://yandex.ru/support/common/browsers-settings/browsers-cookies.xml',
8
- anchor: 'Включите их',
9
- message: 'чтобы зайти на сайт'
10
- }
11
-
12
- class Errors {
13
- show(error) {
14
- $('body').prepend(template(error));
15
- }
16
-
17
- checkCookie() {
18
- $(".no-js-error").remove()
19
- $(".no-js-script").remove()
20
- if (!Cookies.get('cookies_on')) {
21
- this.show(COOKIE_ERROR);
22
- console.error('cookies not supported');
23
- } else {
24
- //console.info('cookies supported');
25
- }
26
- }
27
- }
28
-
29
- export default Errors;
30
-
@@ -1,49 +0,0 @@
1
- .errors
2
- position: fixed
3
- top: 0
4
- left: 0
5
- right: 0
6
- bottom: 0
7
- background: #b70f25 no-repeat 100% 100% / cover
8
- color: #fff
9
- z-index: 2000
10
- .logo-ta
11
- top: 55px
12
-
13
- .errors-inner
14
- display: table-cell
15
- text-align: center
16
- vertical-align: middle
17
- width: 100vw
18
- height: 100vh
19
- a
20
- color: #fff
21
- h3
22
- max-width: 720px
23
- margin: 0 auto 20px
24
- font-size: 44px
25
- font-weight: 700
26
- span
27
- display: block
28
- font-size: 34px
29
- font-weight: 400
30
- margin-bottom: 45px
31
- margin-top: 20px
32
-
33
- .btn-transparent
34
- height: 66px
35
- padding: 22px 25px
36
- text-transform: uppercase
37
- font-size: 17px
38
- text-transform: none
39
- &:hover
40
- border-color: #fff
41
- background: #fff
42
- color: #ff0026
43
-
44
- .no-js-error
45
- display: none
46
-
47
- body.no-js
48
- .no-js-error
49
- display: block