tramway-landing 1.2 → 1.2.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
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: e26b32b7d13f6f68ec1e35bb141d6acd905f4c107752bf63dcd4b61de31f89f0
         | 
| 4 | 
            +
              data.tar.gz: 784bdc4efdb3483e9e9140abf93f917aa34dff4172a9720932cc61f3f0fedf9e
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 6273939bce92a54510c938d2ba94747beeb5f5fba8504c23bc34f452d4ba4767caab0609beeab45343c84e5b39319331e6bd3996fca28fbf5fe2355b91c58a80
         | 
| 7 | 
            +
              data.tar.gz: e486c0327c24a39f2a8e96095800252786f50a6af6e7d704d69a2fc9ff3c93458b4868f05c3aaa86b9d17d8b1d5dbd0a788267f6d73a1e355a2676a0a3311a33
         | 
| @@ -1,6 +1,4 @@ | |
| 1 1 | 
             
            class Tramway::Landing::Block < ::Tramway::Landing::ApplicationRecord
         | 
| 2 | 
            -
              belongs_to :link_object, polymorphic: true
         | 
| 3 | 
            -
             | 
| 4 2 | 
             
              enumerize :block_type, in: [ :header, :footer, :page, :cards, :features, :contacts, :news, :link ]
         | 
| 5 3 | 
             
              enumerize :navbar_link, in: [ :exist, :not_exist ], default: :not_exist
         | 
| 6 4 | 
             
              enumerize :link_object_type, in: [ 'Tramway::SportSchool::Document' ]
         | 
| @@ -24,4 +22,8 @@ class Tramway::Landing::Block < ::Tramway::Landing::ApplicationRecord | |
| 24 22 | 
             
              scope :with_navbar_link, -> { where navbar_link: :exist }
         | 
| 25 23 | 
             
              scope :header, -> { on_main_page.where(block_type: :header).first }
         | 
| 26 24 | 
             
              scope :footer, -> { on_main_page.where(block_type: :footer).first }
         | 
| 25 | 
            +
             | 
| 26 | 
            +
              def link_object
         | 
| 27 | 
            +
                link_object_type.constantize.find link_object_id
         | 
| 28 | 
            +
              end
         | 
| 27 29 | 
             
            end
         | 
| @@ -8,29 +8,30 @@ | |
| 8 8 | 
             
                - eval("@collection_#{block.anchor}")&.each do |item|
         | 
| 9 9 | 
             
                  .col-lg-4.col-md-12.mb-4
         | 
| 10 10 | 
             
                    - if item.path.present?
         | 
| 11 | 
            -
                       | 
| 12 | 
            -
             | 
| 13 | 
            -
             | 
| 14 | 
            -
             | 
| 15 | 
            -
             | 
| 16 | 
            -
             | 
| 17 | 
            -
             | 
| 18 | 
            -
             | 
| 19 | 
            -
             | 
| 20 | 
            -
             | 
| 21 | 
            -
             | 
| 22 | 
            -
             | 
| 23 | 
            -
             | 
| 11 | 
            +
                      -# FIXME
         | 
| 12 | 
            +
                      .card.link{ onclick: "window.location.href = '#{item.path}';" }
         | 
| 13 | 
            +
                        .view.overlay.hm-white-slight
         | 
| 14 | 
            +
                          = image_tag item.image || '', class: 'img-fluid'
         | 
| 15 | 
            +
                        = link_to '#' do
         | 
| 16 | 
            +
                          .mask
         | 
| 17 | 
            +
                        .card-body
         | 
| 18 | 
            +
                          %h4.card-title
         | 
| 19 | 
            +
                            = item.title
         | 
| 20 | 
            +
                          %p.card-text
         | 
| 21 | 
            +
                            = strip_tags item.description
         | 
| 22 | 
            +
                          - if item.button.present?
         | 
| 23 | 
            +
                            = link_to item.button.text, item.button.url, class: 'btn btn-primary'
         | 
| 24 24 | 
             
                    - else
         | 
| 25 25 | 
             
                      .card
         | 
| 26 26 | 
             
                        .view.overlay.hm-white-slight
         | 
| 27 | 
            -
                          = image_tag item.image, class: 'img-fluid'
         | 
| 27 | 
            +
                          = image_tag item.image || '', class: 'img-fluid'
         | 
| 28 28 | 
             
                        = link_to '#' do
         | 
| 29 29 | 
             
                          .mask
         | 
| 30 30 | 
             
                        .card-body
         | 
| 31 31 | 
             
                          %h4.card-title
         | 
| 32 32 | 
             
                            = item.title
         | 
| 33 | 
            -
                           | 
| 34 | 
            -
                             | 
| 33 | 
            +
                          - if item.description
         | 
| 34 | 
            +
                            %p.card-text
         | 
| 35 | 
            +
                              = item.description
         | 
| 35 36 | 
             
                          - if item.button.present?
         | 
| 36 37 | 
             
                            = link_to item.button.text, item.button.url, class: 'btn btn-primary'
         | 
| 
            File without changes
         | 
    
        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: 1.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: 2018- | 
| 11 | 
            +
            date: 2018-06-01 00:00:00.000000000 Z
         | 
| 12 12 | 
             
            dependencies: []
         | 
| 13 13 | 
             
            description: Landing Engine for your Rails projects
         | 
| 14 14 | 
             
            email:
         | 
| @@ -48,6 +48,7 @@ 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
         | 
| 51 52 | 
             
            - config/initializers/assets.rb
         | 
| 52 53 | 
             
            - config/initializers/tramway.rb
         | 
| 53 54 | 
             
            - config/locales/models.yml
         |