tramway-landing 2.0.1.3 → 2.0.1.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2f09a437f02e3931d02d1dc3f5bd340c0cd37323ba865ed1fd09b685705e13ee
4
- data.tar.gz: e5af4801b9f6c5761fc2183885d496495e303ee17e550d41ba1e045cf37bb83e
3
+ metadata.gz: 06db1315e39e0c0c0a4e0c57e7f60d8e67ef6ec2b1c7e6165420d8b100e94c09
4
+ data.tar.gz: 274bb1bd4b5014f6e6f2a4da8f105607a0252c0c2d69ffa0dea5b56c671dc7f3
5
5
  SHA512:
6
- metadata.gz: 794e14bcfcbeadc33e739fddc3cd2251f088157c5db724356104a0a833b3882e1e696d1ca0d3a4bb21387a896d8902ca724da212f56589194751da3a82a1c6ae
7
- data.tar.gz: f96a9a4cfaaf7c09608379f62ad874003ec25faa92d4113dc1cb7dac13936676c361980626f4f4f21ea4964127ac4a9ae1d9cacb8abdb91d484c0e494273ec30
6
+ metadata.gz: c1f9ea58666cee23d2635855282cf5b5813fc7e6bcb13517149cd7058befcf210e84682bd0bcd6aff5ca2f8c94d5e84e513cd220159ab56685bb045d4615c80e
7
+ data.tar.gz: 527a9f7d3f6a6854af14af74323b830ae0baf5f80de37dc0d76873fd2d02625d1f1ec054e42cfaee976c9ac05997600dfc0a0f893d6409ddfed5778525170ed7
data/README.md CHANGED
@@ -21,30 +21,34 @@ List of blocks:
21
21
  All block's previews you can see at the bottom of this Readme
22
22
 
23
23
  ## Installation
24
- Add this line to your application's Gemfile:
24
+
25
+ #### 1. Add this line to your application's Gemfile:
25
26
 
26
27
  ```ruby
27
28
  gem 'tramway-landing'
28
29
  ```
29
30
 
30
- Then run:
31
+ #### 2. Then run:
31
32
 
32
33
  ```shell
33
34
  rails g tramway:landing:install
34
35
  rails db:migrate
35
36
  ```
36
37
 
38
+ #### 3. Add landing blocks to the initializer
39
+
37
40
  *config/initializers/tramway.rb*
38
41
  ```ruby
39
42
  Tramway::Admin.set_available_models ::Tramway::Landing::Block, project: #{project_name_which_you_use_in_the_application}
43
+ Tramway::Admin.navbar_structure ::Tramway::Landing::Block
40
44
  ```
41
45
 
42
- Run server `rails s`
43
- Open `localhost:3000/admin`
44
- Click on `Block`, add new block with type `Header`
45
- Click `Show` in the block menu
46
+ #### 4. Run server `rails s`
47
+ #### 5. Open `localhost:3000/admin`
48
+ #### 6. Click on `Blocks`, add new block with type `Header`
49
+ #### 7. Click `Show` in the block menu
46
50
 
47
- Then create your main page controller `rails g controller web/welcome`
51
+ #### 8. Then create your main page controller `rails g controller web/welcome`
48
52
 
49
53
  *app/controllers/web/welcome_controller.rb*
50
54
  ```ruby
@@ -65,6 +69,8 @@ class Web::WelcomeController < ApplicationController
65
69
  end
66
70
  ```
67
71
 
72
+ #### 9. Add new controller to the routes
73
+
68
74
  *config/routes.rb*
69
75
  ```ruby
70
76
  # ...
@@ -72,11 +78,16 @@ root to: 'web/welcome#index'
72
78
  # ...
73
79
  ```
74
80
 
81
+ #### 10. Add view for the new landing
82
+
75
83
  *app/views/web/welcome/index.html.haml*
76
84
  ```haml
77
85
  = content_for :title do
78
86
  -# your content for <title>
79
87
 
88
+ = content_for :application_name do
89
+ -# your content for h1
90
+
80
91
  = content_for :application_tagline do
81
92
  -# tagline in the header type block
82
93
 
@@ -0,0 +1,6 @@
1
+ en:
2
+ hints:
3
+ tramway:
4
+ landing:
5
+ block:
6
+ position: "Busy positions. Block type 'Header' should be always the first. Block type 'Footer' should be always the last"
@@ -12,7 +12,7 @@ module Tramway
12
12
  end
13
13
 
14
14
  def head_content
15
- @@head_content || []
15
+ (defined?(@@head_content) && @@head_content) || []
16
16
  end
17
17
  end
18
18
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Landing
5
- VERSION = '2.0.1.3'
5
+ VERSION = '2.0.1.4'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tramway-landing
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1.3
4
+ version: 2.0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-08 00:00:00.000000000 Z
11
+ date: 2020-03-10 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Landing Engine for your Rails projects
14
14
  email:
@@ -62,9 +62,10 @@ files:
62
62
  - app/views/tramway/landing/blocks/templates/_text.html.haml
63
63
  - config/initializers/assets.rb
64
64
  - config/initializers/tramway.rb
65
- - config/locales/forms.yml
66
- - config/locales/models.yml
67
- - config/locales/state_machines.yml
65
+ - config/locales/en/forms.yml
66
+ - config/locales/ru/forms.yml
67
+ - config/locales/ru/models.yml
68
+ - config/locales/ru/state_machines.yml
68
69
  - config/routes.rb
69
70
  - lib/tasks/tramway/landing_tasks.rake
70
71
  - lib/tramway/landing.rb