tramway-landing 1.2.8 → 1.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/stylesheets/tramway/landing/justified.css +0 -1
- data/app/helpers/tramway/landing/application_helper.rb +4 -0
- data/app/views/layouts/tramway/landing/application.html.haml +7 -8
- data/app/views/tramway/landing/blocks/block_types/_header.html.haml +4 -17
- data/app/views/tramway/landing/blocks/templates/_full_page.html.haml +17 -0
- data/lib/tramway/landing/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8de38280949a53e0ef7437452cf1f2daed516eae051fa09280de23582a1c1fc
|
4
|
+
data.tar.gz: e124f80e17a87f9936c1bac4d44f491f3c5489c1f60d66d3a42233f61e4cd50e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77b94f9ab3775c9b82da7fa20ec5f11d40e6a147e439a7a74908724029b23302e9161ed435700a215b3cc574e381a59da80cce5e58d2963f39d7d84f54bb9008
|
7
|
+
data.tar.gz: 4e6ea88b50439ac715b6b8a25c522a14f5dea8a8a583eba06e53befee1603d992b7405fe87b570936bc0545ab134c424b6b823ab05ec214dc816da84ec909781
|
@@ -3,6 +3,10 @@ module Tramway
|
|
3
3
|
module ApplicationHelper
|
4
4
|
include Tramway::Admin::RussianCasesHelper
|
5
5
|
include Tramway::Profiles::LinksHelper
|
6
|
+
|
7
|
+
def header_block(block, title:, tagline:)
|
8
|
+
OpenStruct.new title: title, tagline: tagline, background: block.background
|
9
|
+
end
|
6
10
|
end
|
7
11
|
end
|
8
12
|
end
|
@@ -13,7 +13,7 @@
|
|
13
13
|
= yield :head_content
|
14
14
|
-#= render 'layouts/tramway/landing/yandex_metrika'
|
15
15
|
/ Yandex.Metrika counter
|
16
|
-
|
16
|
+
-#:javascript
|
17
17
|
(function (d, w, c) {
|
18
18
|
(w[c] = w[c] || []).push(function() {
|
19
19
|
try {
|
@@ -38,7 +38,7 @@
|
|
38
38
|
d.addEventListener("DOMContentLoaded", f, false);
|
39
39
|
} else { f(); }
|
40
40
|
})(document, window, "yandex_metrika_callbacks");
|
41
|
-
|
41
|
+
-#%noscript
|
42
42
|
%div
|
43
43
|
%img{alt: "", src: "https://mc.yandex.ru/watch/49054148", style: "position:absolute; left:-9999px;"}/
|
44
44
|
/ /Yandex.Metrika counter
|
@@ -46,18 +46,17 @@
|
|
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
|
+
= yield :body_content
|
49
50
|
- if @blocks&.any?
|
50
51
|
-# FIXME
|
51
52
|
= render "tramway/landing/blocks/block_types/header", block: @blocks.select { |block| block.model.block_type.header? }.first
|
52
|
-
|
53
|
-
|
54
|
-
- if @blocks&.any?
|
53
|
+
%main{ class: ('mt-5' if @blocks&.any?) }
|
54
|
+
.container
|
55
55
|
- @blocks.each_with_index do |block, index|
|
56
56
|
- if !block.model.block_type.header? && !block.model.block_type.footer?
|
57
57
|
= render "tramway/landing/blocks/block_types/#{block.block_type}", block: block
|
58
58
|
- if index < array_of_blocks.count - 1
|
59
59
|
%hr
|
60
|
-
|
61
|
-
|
62
|
-
- if @blocks&.any?
|
60
|
+
.container-fluid
|
61
|
+
= yield
|
63
62
|
= render "tramway/landing/blocks/block_types/footer", block: @blocks.select { |block| block.model.block_type.footer? }.first
|
@@ -1,26 +1,13 @@
|
|
1
1
|
= javascript_include_tag 'tramway/landing/smooth-scroll'
|
2
|
-
|
2
|
+
- content_for(:navbar) do
|
3
3
|
%nav.navbar.navbar-expand-lg.navbar-dark.indigo.scrolling-navbar.fixed-top
|
4
4
|
= link_to yield(:application_name), '#', class: 'navbar-brand'
|
5
|
-
|
6
5
|
%button.navbar-toggler{ type: :button, data: { toggle: :collapse, target: '#navbarSupportedContent' }, aria: { controls: 'navbarSupportedContent', expanded: 'false', label: 'Toggle navigation' } }
|
7
6
|
= fa_icon :bars
|
8
7
|
.collapse.navbar-collapse#navbarSupportedContent
|
9
8
|
%ul.navbar-nav.mr-auto
|
10
9
|
- @links.each do |link|
|
11
10
|
= menu_item link.title, link.link
|
12
|
-
|
13
|
-
|
14
|
-
|
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
|
-
- @links.each do |link|
|
23
|
-
%button.btn.btn-outline-white.waves-effect.waves-light.header-buttons{ type: :button, data: { anchor: "##{link.link}" } }
|
24
|
-
= link.title
|
25
|
-
%script
|
26
|
-
var scroll = new SmoothScroll('a[href*="#"]');
|
11
|
+
= render 'tramway/landing/blocks/templates/full_page', block: header_block(block, title: yield(:application_name), tagline: yield(:application_tagline)), buttons: @links
|
12
|
+
%script
|
13
|
+
var scroll = new SmoothScroll('a[href*="#"]');
|
@@ -0,0 +1,17 @@
|
|
1
|
+
%header
|
2
|
+
= yield :navbar
|
3
|
+
#intro.view.hm-black-strong{ style: "background-image: url('#{block.background.url}')" }
|
4
|
+
.container-fluid.full-bg-img.d-flex.align-items-center.justify-content-center
|
5
|
+
.row.d-flex.justify-content-center
|
6
|
+
.col-md-10.text-center
|
7
|
+
%h2.display-3.font-bold.white-text.mb-2
|
8
|
+
= block.title
|
9
|
+
%hr.hr-light
|
10
|
+
%h4.white-text.my-4
|
11
|
+
= block.tagline
|
12
|
+
- if defined?(buttons)
|
13
|
+
- buttons.each do |button|
|
14
|
+
%button.btn.btn-outline-white.waves-effect.waves-light.header-buttons{ type: :button, data: { anchor: "##{button.link}" } }
|
15
|
+
= button.title
|
16
|
+
- else
|
17
|
+
= yield
|
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.
|
4
|
+
version: 1.2.9
|
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-
|
11
|
+
date: 2018-09-02 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/templates/_full_page.html.haml
|
51
52
|
- config/initializers/assets.rb
|
52
53
|
- config/initializers/tramway.rb
|
53
54
|
- config/locales/models.yml
|