tramway-landing 1.3 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 62eef85a9ae8e39a81586f911c559952e6dbd8ccef648d1e9907141678f79cc4
4
- data.tar.gz: 267904745078f6bb221b7bf08724fe417b72ffe3a422632e8185592e28ca3007
3
+ metadata.gz: bf9ecdb263cc857540e746b561a57c2c4072518ae2199ce3768f5fca77e38937
4
+ data.tar.gz: 245825f98494763df2fc6aae22f33f527e5be6f193a2cf20e05af1f6e084e136
5
5
  SHA512:
6
- metadata.gz: 02a149ef826544adb0426fd7d1750713211e33a20eeb2bce9b41f19a3cc9b130f2eebb232c521e745633b1881c996f518bd1cbde200d283082bd4732b5e001c2
7
- data.tar.gz: b85a60f327af5a8b8d29335479b677d050bb9224416870996e7fef299139a52c07b263a485dafa6e4cde27e68b0328b9e180cb3a938db645fb2555386e2ef292
6
+ metadata.gz: bd43975a90f49edeada5d751d1a0572306fe449fce9947c350ec4c9e21e386f445b6c2727fb4400bf87be1dab09918d5be32109a8d595ba0fcba8b6b3e3d4b7d
7
+ data.tar.gz: 6d5b7b500ee142e2a7706c159ef89adf5f282c499e4fa000f315d987642fdb29c6c58bad46e497ea7edbe724cfd68956fd598413f03e3eebe8a1b8fc489c525b
@@ -6,4 +6,6 @@ class Tramway::Landing::BlockTypes::FeaturesDecorator < ::Tramway::Core::Applica
6
6
  def title; end
7
7
 
8
8
  def text; end
9
+
10
+ def anchor; end
9
11
  end
@@ -1,13 +1,14 @@
1
1
  - if collection.any?
2
- %main.mt-5{ id: block.anchor }
2
+ %main.mt-5{ id: defined?(block) ? block.anchor : "#{collection.class.name.underscore}_as_features" }
3
3
  .container
4
4
  %section#best-features.text-center
5
- %h2.mb-4.font-weight-bold
6
- = block.title
7
- .row.d-flex.justify-content-center.mb-4
8
- .col-md-8
9
- %p.grey-text
10
- = block.description
5
+ - if defined?(block)
6
+ %h2.mb-4.font-weight-bold
7
+ = block.title
8
+ .row.d-flex.justify-content-center.mb-4
9
+ .col-md-8
10
+ %p.grey-text
11
+ = block.description
11
12
  - collection.each_slice 5 do |sub_collection|
12
13
  .row
13
14
  - sub_collection.each do |item|
@@ -15,7 +16,8 @@
15
16
  - if item.icon.present?
16
17
  = fa_icon item.icon, class: 'fa-4x blue-text'
17
18
  - else
18
- = image_tag item.image
19
+ - image_css_class_name = defined?(options) ? options.dig(:image, :css, :class_name) : ''
20
+ = image_tag item.image, class: image_css_class_name
19
21
  %h4.my-4
20
22
  = item.title
21
23
  %p.grey-text
@@ -12,12 +12,18 @@ module Tramway::Landing::Generators
12
12
  end
13
13
 
14
14
  def copy_migrations
15
- migration_template 'create_tramway_landing_blocks.rb', 'db/migrate/create_tramway_landing_blocks.rb'
16
- migration_template 'add_navbar_link_to_tramway_landing_blocks.rb', 'db/migrate/add_navbar_link_to_tramway_landing_blocks.rb'
17
- migration_template 'add_anchor_to_tramway_landing_blocks.rb', 'db/migrate/add_anchor_to_tramway_landing_blocks.rb'
18
- migration_template 'add_description_to_tramway_landing_blocks.rb', 'db/migrate/add_description_to_tramway_landing_blocks.rb'
19
- migration_template 'add_link_object_id_to_tramway_landing_blocks.rb', 'db/migrate/add_link_object_id_to_tramway_landing_blocks.rb'
20
- migration_template 'add_link_object_type_to_tramway_landing_blocks.rb', 'db/migrate/add_link_object_type_to_tramway_landing_blocks.rb'
15
+ migrations = [
16
+ :create_tramway_landing_blocks,
17
+ :add_navbar_link_to_tramway_landing_blocks,
18
+ :add_anchor_to_tramway_landing_blocks,
19
+ :add_description_to_tramway_landing_blocks,
20
+ :add_link_object_id_to_tramway_landing_blocks,
21
+ :add_link_object_type_to_tramway_landing_blocks
22
+ ]
23
+
24
+ migrations.each do |migration|
25
+ migration_template "#{migration}.rb", "db/migrate/#{migration}.rb"
26
+ end
21
27
  end
22
28
  end
23
29
  end
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Landing
3
- VERSION = '1.3'
3
+ VERSION = '1.3.1'
4
4
  end
5
5
  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: '1.3'
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-26 00:00:00.000000000 Z
11
+ date: 2018-10-07 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Landing Engine for your Rails projects
14
14
  email: