tramway-landing 1.4 → 1.4.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: 2b8ae53ed49fccd5be8e6c7006a4698e794132e57070df7af37c1b6fdcd74098
4
- data.tar.gz: b27217f06c5ed82309ad17b6b502911c2d9bc73b965e9c9915b95f2d3ab4276e
3
+ metadata.gz: e9ee27f8f4b17a274f1c8bb53c9ed7030a18a932fa8a9c13a2cd029f7b9444ff
4
+ data.tar.gz: 190069c9c9cbe8aabecde7702550338166b5f935349e0ed00d4b6d53cb194344
5
5
  SHA512:
6
- metadata.gz: 6b78c63050d57dbbd7305545a0d1c59a589801ec818f9ac344f5d56c866f6f45cc495d9928a49c09b3cca51e8b718eaa741963535a74596e0466550519d2054b
7
- data.tar.gz: 48ba7c0b5d4eddf270c4fff05b22a9adc212f70c08fcf683363b48af347114d82f68eedc0038830090577096f5b17193e91cc322ef0f232046a7187133a7248e
6
+ metadata.gz: dda68528c6b0dccf6fd29a1b75baf2ce84ea19e65faf9d1d2a469c7a23f82329f426b6e670c2516302fdf7de007dc4d68b833afa3528516d03ce3a0bb149d29b
7
+ data.tar.gz: cc046e0eeb50d33ab733d6470001b82e3e659a6bb0dec01dcf9c45410b9b620574f602d3e9d242e29a5488ef3d584c430e739cd45537c2f2831ee7e5030f65c8
@@ -10,4 +10,22 @@ class Tramway::Landing::BlockTypes::FeaturesDecorator < ::Tramway::Core::Applica
10
10
  def anchor; end
11
11
 
12
12
  def full_text; end
13
+
14
+ def external_link; end
15
+
16
+ def active_link
17
+ if anchor.present?
18
+ "##{anchor}"
19
+ else
20
+ if external_link.present?
21
+ if external_link.match?(/^https?:\/\//)
22
+ external_link
23
+ else
24
+ "http://#{external_link}"
25
+ end
26
+ else
27
+ ''
28
+ end
29
+ end
30
+ end
13
31
  end
@@ -12,7 +12,7 @@
12
12
  .row
13
13
  - if collection.count == 1
14
14
  - item = collection.first
15
- .col.col-sm-2.col-xl-4.col-lg-4.col-md-4.mb-1.auto{ class: (item.anchor.present? ? :link : ''), data: { href: item.anchor.present? ? "##{item.anchor}" : '' } }
15
+ .col.col-sm-2.col-xl-4.col-lg-4.col-md-4.mb-1.auto{ class: (item.active_link.present? ? :link : ''), data: { href: item.active_link } }
16
16
  - if item.icon.present?
17
17
  = fa_icon item.icon, class: 'fa-4x blue-text'
18
18
  - else
@@ -22,13 +22,13 @@
22
22
  = item.title
23
23
  %p.grey-text
24
24
  != item.text
25
- .col.col-sm-10.col-xl-8.col-lg-8.col-md-8.mb-1.auto{ class: (item.anchor.present? ? :link : ''), data: { href: item.anchor.present? ? "##{item.anchor}" : '' } }
25
+ .col.col-sm-10.col-xl-8.col-lg-8.col-md-8.mb-1.auto{ class: (item.active_link.present? ? :link : ''), data: { href: item.active_link } }
26
26
  %p.grey-text
27
27
  != item.full_text
28
28
  - else
29
29
  - collection.each_slice 3 do |sub_collection|
30
30
  - sub_collection.each do |item|
31
- .col.col-sm-2.col-xl-4.col-lg-4.col-md-4.mb-1.auto{ class: (item.anchor.present? ? :link : ''), data: { href: item.anchor.present? ? "##{item.anchor}" : '' } }
31
+ .col.col-sm-2.col-xl-4.col-lg-4.col-md-4.mb-1.auto{ class: (item.active_link.present? ? :link : ''), data: { href: item.active_link } }
32
32
  - if item.icon.present?
33
33
  = fa_icon item.icon, class: 'fa-4x blue-text'
34
34
  - else
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Landing
3
- VERSION = '1.4'
3
+ VERSION = '1.4.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.4'
4
+ version: 1.4.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-11-25 00:00:00.000000000 Z
11
+ date: 2018-12-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Landing Engine for your Rails projects
14
14
  email: