tramway-landing 2.0.1.6 → 2.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: fcb799d2d30bef1b6511284d34d4a081db4c70247d677fb40159bcbb1cfad03e
4
- data.tar.gz: 0d1c2d3681ea42a9591a4c3aa98b51d4dfffae0badeee0a9868ea1209ed0b70c
3
+ metadata.gz: 6bbc7272f4345996e4ee11f7e84abc20d589e0a6aa2b837c9ee65b6d0277bdf6
4
+ data.tar.gz: 85aeed11a8b3736770ccffd2f8a1789c6fa1194a10cbb31ed3a5fabf1659b0c5
5
5
  SHA512:
6
- metadata.gz: f6fc8517c78ce7bcee876a63d10142680df6c0d6f6db162d0e1b8e1c08220ef2eab15407f8af8c96369424502edea360a597faacdaa468667efd9002a660cb23
7
- data.tar.gz: ae262b66f550d7270a1612d9eafd79c3c114f8369fb9d66b4f00e93d421ecad11a04df9013c49baa04e36e8f993d305b9efd7093313169253898e361ce32ef52
6
+ metadata.gz: 25f924bd9131f2bafc6808a88552ad5a18ab3631b6f06857e09f90e19bff48e8e46338bb38bc2a8c65dbdce82aee5cb92aff7f7a0bc199acba17e7a2f076c483
7
+ data.tar.gz: d01724b1fe93871e8ef4bce092f915a2a19ad69458409f65e18b7c694ede9f25b31b0c2102937c1cdc844bc4475b775de414b310536b983c2708e0f24da504ce
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # Tramway::Landing
2
- Short description and motivation.
2
+ It uses [Material Design Bootstrap](https://mdbootstrap.com/) by default
3
3
 
4
4
  ## Description
5
5
 
@@ -1,51 +1,8 @@
1
- %script{ src: 'https://maps.google.com/maps/api/js?key=AIzaSyD4shvkgS4S4Mz-SEWbigeCQ54fHmFPxUo' }
2
- :javascript
3
- function regular_map() {
4
- var var_location = new google.maps.LatLng(#{yield(:latitude)}, #{yield(:longtitude)});
5
-
6
- var var_mapoptions = {
7
- center: var_location,
8
- zoom: 14
9
- };
10
-
11
- var var_map = new google.maps.Map(document.getElementById("map-container"),
12
- var_mapoptions);
13
-
14
- var var_marker = new google.maps.Marker({
15
- position: var_location,
16
- map: var_map,
17
- title: "School"
18
- });
19
- }
20
- google.maps.event.addDomListener(window, 'load', regular_map);
1
+ - map_exists = yield(:longtitude).present? && yield(:latitude).present?
21
2
  #contacts
22
3
  %h2.mb-5.font-weight-bold.text-center
23
4
  = block.title
24
- .row
25
- - if defined?(::Tramway::Profiles)
26
- .col-lg-5.col-md-12
27
- - social_networks = @application.respond_to?(:social_networks) ? @application.social_networks.active : Tramway::Profiles::SocialNetwork.active
28
- - social_networks.each do |profile|
29
- %ul.list-group
30
- %li.list-group-item
31
- = profile_link profile
32
- .col-lg-7.col-md-12
33
- .row.text-center
34
- - if yield(:address).present?
35
- .col-lg-4.col-md-12.mb-3
36
- %p
37
- = fa_icon :map, class: 'grey-text'
38
- = yield :address
39
- - if yield(:schedule).present?
40
- .col-lg-4.col-md-6.mb-3
41
- %p
42
- = fas_icon :building, class: 'grey-text'
43
- = yield :schedule
44
- - if yield(:phone).present?
45
- .col-lg-4.col-md-6.mb-3
46
- %p
47
- = tel_tag yield(:phone) do
48
- = fa_icon :phone, class: 'grey-text'
49
- = yield :phone
50
- - if yield(:longtitude).present? && yield(:latitude).present?
51
- #map-container.z-depth-1-half.map-container{ style: 'height: 400px' }
5
+ - if map_exists
6
+ = render 'tramway/landing/blocks/block_types/contacts/with_map', block: block, social_networks: defined?(social_networks) ? social_networks : nil
7
+ - else
8
+ = render 'tramway/landing/blocks/block_types/contacts/without_map', block: block, social_networks: defined?(social_networks) ? social_networks : nil, phone: defined?(phone) ? phone : nil, email: defined?(email) ? email : nil
@@ -0,0 +1,47 @@
1
+ %script{ src: 'https://maps.google.com/maps/api/js?key=AIzaSyD4shvkgS4S4Mz-SEWbigeCQ54fHmFPxUo' }
2
+ :javascript
3
+ function regular_map() {
4
+ var var_location = new google.maps.LatLng(#{yield(:latitude)}, #{yield(:longtitude)});
5
+
6
+ var var_mapoptions = {
7
+ center: var_location,
8
+ zoom: 14
9
+ };
10
+
11
+ var var_map = new google.maps.Map(document.getElementById("map-container"),
12
+ var_mapoptions);
13
+
14
+ var var_marker = new google.maps.Marker({
15
+ position: var_location,
16
+ map: var_map,
17
+ title: "School"
18
+ });
19
+ }
20
+ google.maps.event.addDomListener(window, 'load', regular_map);
21
+ .row
22
+ - if defined?(::Tramway::Profiles)
23
+ .col-lg-5.col-md-12
24
+ - social_networks = (@application.social_networks.active if @application.respond_to?(:social_networks)) unless social_networks
25
+ - social_networks&.each do |profile|
26
+ %ul.list-group
27
+ %li.list-group-item
28
+ = profile_link profile
29
+ .col-lg-7.col-md-12
30
+ .row.text-center
31
+ - if yield(:address).present?
32
+ .col-lg-4.col-md-12.mb-3
33
+ %p
34
+ = fa_icon :map, class: 'grey-text'
35
+ = yield :address
36
+ - if yield(:schedule).present?
37
+ .col-lg-4.col-md-6.mb-3
38
+ %p
39
+ = fas_icon :building, class: 'grey-text'
40
+ = yield :schedule
41
+ - if yield(:phone).present?
42
+ .col-lg-4.col-md-6.mb-3
43
+ %p
44
+ = tel_tag yield(:phone) do
45
+ = fa_icon :phone, class: 'grey-text'
46
+ = yield :phone
47
+ #map-container.z-depth-1-half.map-container{ style: 'height: 400px' }
@@ -0,0 +1,29 @@
1
+ - records_in_the_row = 4
2
+ - if phone.present? || email.present?
3
+ .row.features-small.mt-5.wow.fadeIn
4
+ - if phone.present?
5
+ .col-xl-3.col-lg-6
6
+ .row.link{ data: { href: "tel:#{phone}" } }
7
+ .col-2
8
+ %i.fab.fa-2x.mb-1.fa-phone.indigo-text{ aria: { hidden: 'true' } }
9
+ .col-10.mb-2.pl-3
10
+ %h5.feature-title.font-bold.mb-1
11
+ = phone
12
+ - if email.present?
13
+ .col-xl-3.col-lg-6
14
+ .row.link{ data: { href: "mailto:#{email}" } }
15
+ .col-2
16
+ %i.fab.fa-2x.mb-1.fa-envelop.indigo-text{ aria: { hidden: 'true' } }
17
+ .col-10.mb-2.pl-3
18
+ %h5.feature-title.font-bold.mb-1
19
+ = email
20
+ - social_networks.each_slice(records_in_the_row) do |slice|
21
+ .row.features-small.mt-5.wow.fadeIn
22
+ - slice.each do |social_network, index|
23
+ .col-xl-3.col-lg-6
24
+ .row.link{ data: { href: profile_url(social_network) } }
25
+ .col-2
26
+ %i.fab.fa-2x.mb-1.indigo-text{ aria: { hidden: 'true' }, class: "fa-#{social_network.network_name}" }
27
+ .col-10.mb-2.pl-3
28
+ %h5.feature-title.font-bold.mb-1
29
+ = social_network.title
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Landing
5
- VERSION = '2.0.1.6'
5
+ VERSION = '2.1'
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.6
4
+ version: '2.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: 2020-03-16 00:00:00.000000000 Z
11
+ date: 2020-03-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Landing Engine for your Rails projects
14
14
  email:
@@ -56,6 +56,8 @@ files:
56
56
  - app/views/tramway/landing/blocks/block_types/_page.html.haml
57
57
  - app/views/tramway/landing/blocks/block_types/_page_with_button.html.haml
58
58
  - app/views/tramway/landing/blocks/block_types/_view.html.haml
59
+ - app/views/tramway/landing/blocks/block_types/contacts/_with_map.html.haml
60
+ - app/views/tramway/landing/blocks/block_types/contacts/_without_map.html.haml
59
61
  - app/views/tramway/landing/blocks/templates/_features_list.html.haml
60
62
  - app/views/tramway/landing/blocks/templates/_full_page.html.haml
61
63
  - app/views/tramway/landing/blocks/templates/_section_with_image_and_text.html.haml