tramway-landing 1.2.1 → 1.2.2

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: e26b32b7d13f6f68ec1e35bb141d6acd905f4c107752bf63dcd4b61de31f89f0
4
- data.tar.gz: 784bdc4efdb3483e9e9140abf93f917aa34dff4172a9720932cc61f3f0fedf9e
3
+ metadata.gz: 3bfb761b8d76367640bf4a745402175dde2f503721ffe0d21cd9f6d4c2ea536e
4
+ data.tar.gz: 0ed2a239f80d86a38abc8d0888b2c800155e7603380ab3c0a73de8d4f99d16c5
5
5
  SHA512:
6
- metadata.gz: 6273939bce92a54510c938d2ba94747beeb5f5fba8504c23bc34f452d4ba4767caab0609beeab45343c84e5b39319331e6bd3996fca28fbf5fe2355b91c58a80
7
- data.tar.gz: e486c0327c24a39f2a8e96095800252786f50a6af6e7d704d69a2fc9ff3c93458b4868f05c3aaa86b9d17d8b1d5dbd0a788267f6d73a1e355a2676a0a3311a33
6
+ metadata.gz: 8957b32873343bbde6bced57e25a42d0f79340740f458a0372573ffffcfc48d99eb9eb5bb755c1552196926d37e71e3f79946bb0a7f4b55f4713bff8a4b2a33a
7
+ data.tar.gz: b9842b37545e55b23546d5f2e7af3a4f4ff6d1c9b16648c746f0450b39d4eede01133ec90498e8c4c2acccb9f33c30cbe1c0dc6b89303e51cc65f7f737a59ec9
@@ -5,12 +5,16 @@ class Tramway::Landing::BlockDecorator < ::Tramway::Core::ApplicationDecorator
5
5
  end
6
6
 
7
7
  def list_attributes
8
- [ :position, :view_state ]
8
+ [ :position, :view_state, :block_type ]
9
9
  end
10
10
  end
11
11
 
12
12
  delegate :position, to: :object
13
13
 
14
+ def block_type
15
+ object.block_type_text
16
+ end
17
+
14
18
  def view_state
15
19
  object.human_view_state_name
16
20
  end
@@ -46,8 +46,9 @@
46
46
  = stylesheet_link_tag 'https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.4.5/css/mdb.min.css'
47
47
  = javascript_include_tag 'https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.4.5/js/mdb.js'
48
48
  = javascript_include_tag 'https://cdn.rawgit.com/CezarLuiz0/anchor.js/master/dist/anchor.min.js'
49
- - if @blocks&.any?
50
- = render "tramway/landing/blocks/block_types/header", block: @blocks.header
49
+ - if @blocks.any?
50
+ -# FIXME
51
+ = render "tramway/landing/blocks/block_types/header", block: @blocks.on_main_page.where(block_type: :header).first
51
52
  %main{ class: ('mt-5' if @blocks&.any?) }
52
53
  .container
53
54
  - if @blocks&.any?
@@ -56,7 +57,5 @@
56
57
  = render "tramway/landing/blocks/block_types/#{block.block_type}", block: block
57
58
  - if index < array_of_blocks.count - 1
58
59
  %hr
59
- .container-fluid
60
- = yield
61
60
  - if @blocks&.any?
62
61
  = render "tramway/landing/blocks/block_types/footer", block: @blocks.footer
@@ -9,17 +9,18 @@
9
9
  %ul.navbar-nav.mr-auto
10
10
  - @blocks.with_navbar_link.each do |block|
11
11
  = menu_item block.title, "##{block.anchor}"
12
- #intro.view.hm-black-strong{ style: "background-image: url('#{block.background.url}')" }
13
- .container-fluid.full-bg-img.d-flex.align-items-center.justify-content-center
14
- .row.d-flex.justify-content-center
15
- .col-md-10.text-center
16
- %h2.display-3.font-bold.white-text.mb-2
17
- = yield(:application_name)
18
- %hr.hr-light
19
- %h4.white-text.my-4
20
- = yield(:application_tagline)
21
- - @blocks.with_navbar_link.each do |block|
22
- %button.btn.btn-outline-white.waves-effect.waves-light.header-buttons{ type: :button, data: { anchor: "##{block.anchor}" } }
23
- = block.title
12
+ - if block
13
+ #intro.view.hm-black-strong{ style: "background-image: url('#{block.background.url}')" }
14
+ .container-fluid.full-bg-img.d-flex.align-items-center.justify-content-center
15
+ .row.d-flex.justify-content-center
16
+ .col-md-10.text-center
17
+ %h2.display-3.font-bold.white-text.mb-2
18
+ = yield(:application_name)
19
+ %hr.hr-light
20
+ %h4.white-text.my-4
21
+ = yield(:application_tagline)
22
+ - @blocks.with_navbar_link.each do |block|
23
+ %button.btn.btn-outline-white.waves-effect.waves-light.header-buttons{ type: :button, data: { anchor: "##{block.anchor}" } }
24
+ = block.title
24
25
  %script
25
26
  var scroll = new SmoothScroll('a[href*="#"]');
@@ -1,5 +1,5 @@
1
1
  module Tramway
2
2
  module Landing
3
- VERSION = '1.2.1'
3
+ VERSION = '1.2.2'
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.2.1
4
+ version: 1.2.2
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-06-01 00:00:00.000000000 Z
11
+ date: 2018-06-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Landing Engine for your Rails projects
14
14
  email:
@@ -48,7 +48,6 @@ files:
48
48
  - app/views/tramway/landing/blocks/block_types/_header.html.haml
49
49
  - app/views/tramway/landing/blocks/block_types/_link.html.haml
50
50
  - app/views/tramway/landing/blocks/block_types/_page.html.haml
51
- - app/views/tramway/landing/blocks/block_types/index.html.haml
52
51
  - config/initializers/assets.rb
53
52
  - config/initializers/tramway.rb
54
53
  - config/locales/models.yml