tramway-landing 3.0 → 3.0.0.1
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/README.md +40 -2
- data/app/models/tramway/landing/block.rb +1 -0
- data/lib/tramway/landing/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a858bf426aae65cd94c66d7585362a45325e45143b71dd71b545cc802599651e
|
4
|
+
data.tar.gz: 662a4a8d294b05a9d18a4ab66a368149ba20ecd801898629c00ad04eca06f0e6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 108aee3bc02a9db5b39f5501c61daf96eeb5fa0781e27760f0399d86df77c2cb63dba515aa37e3dc9e3cd1b9aace3ff775d2654283e300f429cec38d104a0963
|
7
|
+
data.tar.gz: f66279ef8b9a055cb3043e07dba9b3111d3c71477264e4bdce8c1133fd8d496f17d531aa14fa0e61745dc032d05929f44b89e85461d70ad8d346c12c90990fe0
|
data/README.md
CHANGED
@@ -11,12 +11,13 @@ Tramway-landing provides several types of blocks for main page.
|
|
11
11
|
List of blocks:
|
12
12
|
|
13
13
|
* Header
|
14
|
+
* Header with form
|
14
15
|
* Footer
|
15
16
|
* Block with text and image
|
16
17
|
* Block with text, image and button
|
17
18
|
* Cards
|
18
19
|
* Features list
|
19
|
-
* Contacts
|
20
|
+
* Contacts, also Contacts without map
|
20
21
|
* View
|
21
22
|
* Just text
|
22
23
|
* Link to the object
|
@@ -144,17 +145,54 @@ It will push this content to `<head>` tag only on main page. You aren't able to
|
|
144
145
|
|
145
146
|
Then all your showing blocks will be on the main page.
|
146
147
|
|
147
|
-
##
|
148
|
+
## Migrate from tramway-landing 2.x to tramway-landing 3.x
|
149
|
+
|
150
|
+
#### 1. Add tramway-page gem to the Gemfile
|
151
|
+
|
152
|
+
*Gemfile*
|
153
|
+
```ruby
|
154
|
+
gem 'tramway-page', '>= 1.4.1'
|
155
|
+
```
|
156
|
+
|
157
|
+
#### 2. Run install generator of tramway-page gem
|
158
|
+
|
159
|
+
```shell
|
160
|
+
rails g tramway:page:install
|
161
|
+
```
|
162
|
+
|
163
|
+
#### 3. Run upgraded generator of tramway-landing gem
|
164
|
+
|
165
|
+
```shell
|
166
|
+
rails g tramway:landing:install
|
167
|
+
```
|
168
|
+
|
169
|
+
#### 4. Create new Tramway::Page::Page object for main page
|
170
|
+
|
171
|
+
```ruby
|
172
|
+
$> rails c
|
173
|
+
Tramway::Page::Page.create! title: 'Main page', page_type: :main
|
174
|
+
```
|
175
|
+
|
176
|
+
#### 5. Associate every Tramway::Landing::Block with the main page
|
177
|
+
|
178
|
+
```ruby
|
179
|
+
$> rails c
|
180
|
+
Tramway::Landing::Block.update_all page_id: Tramway::Page::Page.last.id
|
181
|
+
```
|
182
|
+
|
183
|
+
## Blocks docs
|
148
184
|
|
149
185
|
How create blocks you can find here
|
150
186
|
|
151
187
|
* [Header](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/header/main.md)
|
188
|
+
* Header with form
|
152
189
|
* [Footer](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/footer/main.md)
|
153
190
|
* [Block with text and image](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/block_with_text_and_image/main.md)
|
154
191
|
* [Block with text, image and button](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/block_with_text_image_and_button/main.md)
|
155
192
|
* [Cards](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/cards/main.md)
|
156
193
|
* [Features list](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/features/main.md)
|
157
194
|
* [Contacts](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/contacts/main.md)
|
195
|
+
* Contacts without map
|
158
196
|
* [View](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/view/main.md)
|
159
197
|
* [Just text](https://github.com/ulmic/tramway-dev/blob/develop/tramway-landing/docs/just_text/main.md)
|
160
198
|
* Link to object
|
@@ -32,6 +32,7 @@ class Tramway::Landing::Block < ::Tramway::Landing::ApplicationRecord
|
|
32
32
|
scope :with_navbar_link, -> { where navbar_link: :exist }
|
33
33
|
scope :header, -> { on_main_page.where(block_type: :header).first }
|
34
34
|
scope :footer, -> { on_main_page.where(block_type: :footer).first }
|
35
|
+
scope :published, -> { where(view_state: :published) }
|
35
36
|
|
36
37
|
def link_object
|
37
38
|
link_object_type.constantize.find link_object_id
|
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:
|
4
|
+
version: 3.0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- moshinaan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-04-
|
11
|
+
date: 2020-04-04 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Landing Engine for your Rails projects
|
14
14
|
email:
|