tramway-landing 3.1.1.8 → 3.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/tramway/landing/application.js +2 -2
- data/app/helpers/tramway/landing/application_helper.rb +8 -4
- data/app/views/layouts/tramway/landing/_navbar.html.haml +17 -16
- data/app/views/layouts/tramway/landing/navbar/_link.html.haml +1 -1
- data/app/views/tramway/landing/templates/_section_with_image_and_text.html.haml +5 -1
- data/config/locales/templates.yml +2 -1
- data/lib/tramway/landing.rb +9 -0
- data/lib/tramway/landing/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1173a00383661feff98ffb68918d16347cf47f9a64295d0aa10825abb2a51dc2
|
4
|
+
data.tar.gz: bd45201e8a212c7abbeeebf2ae9d7f83f90715cb2f531ce4d5b4f282af0019de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1af9464dc5d86e6ba1dd6ac45d7de7aa35b6f6d925d5fc69472bae4888d99bc51d38ac2a1cee575c001389011cbb08d896171159f1190e4195c44f5193be565c
|
7
|
+
data.tar.gz: 0af0304af1452fd235cd0b020cb11f034e9f91d0c1f9c948b02eb9db42bd3b4ef866dd8109da102b179c1a5875d0e46bc833dd47103c1dc38f57639b02d58ae1
|
@@ -8,12 +8,12 @@ $(document).ready(function() {
|
|
8
8
|
});
|
9
9
|
|
10
10
|
const iframe_selectors_for_video = ['iframe[src*="vk.com"]', 'iframe[src*="youtu.be"]', 'iframe[src*="youtube.com"]'];
|
11
|
-
|
11
|
+
iframe_selectors_for_video.forEach(function(selector) {
|
12
12
|
$(selector).each(function() {
|
13
13
|
width = $(this).parents('div').first().width();
|
14
14
|
height = width / 16 * 9;
|
15
15
|
$(this).width(width);
|
16
16
|
$(this).height(height);
|
17
17
|
});
|
18
|
-
}
|
18
|
+
})
|
19
19
|
});
|
@@ -20,18 +20,22 @@ module Tramway
|
|
20
20
|
else
|
21
21
|
if block.page.page_type.main?
|
22
22
|
content_for?(:application_name) && content_for(:application_name).present? ? content_for(:application_name) : @application.public_name
|
23
|
+
else
|
24
|
+
block.page.title
|
23
25
|
end
|
24
26
|
end
|
25
27
|
end
|
26
28
|
|
27
29
|
def block_tagline(block)
|
28
|
-
|
30
|
+
if block.is_a? Array
|
31
|
+
block.each do |_current_block|
|
32
|
+
raw _current_block.page.body
|
33
|
+
end
|
34
|
+
else
|
29
35
|
if block.page.page_type.main?
|
30
36
|
content_for?(:application_tagline) && content_for(:application_tagline).present? ? content_for(:application_tagline) : @application.tagline
|
31
37
|
else
|
32
|
-
block.
|
33
|
-
raw block.page.body
|
34
|
-
end
|
38
|
+
raw block.page.body
|
35
39
|
end
|
36
40
|
end
|
37
41
|
end
|
@@ -1,16 +1,17 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
-
|
5
|
-
|
6
|
-
|
7
|
-
-
|
8
|
-
|
9
|
-
|
10
|
-
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
-
|
16
|
-
|
1
|
+
- if Tramway::Landing.navbar_for(@application_engine || @application.name)
|
2
|
+
%nav.navbar.navbar-expand-lg.navbar-dark.indigo.scrolling-navbar.fixed-top
|
3
|
+
= link_to @application.public_name || yield(:application_name), '/', class: 'navbar-brand'
|
4
|
+
%button.navbar-toggler{ type: :button, data: { toggle: :collapse, target: '#navbarSupportedContent' }, aria: { controls: 'navbarSupportedContent', expanded: 'false', label: 'Toggle navigation' } }
|
5
|
+
- if @links&.any?
|
6
|
+
= fa_icon :bars
|
7
|
+
.collapse.navbar-collapse#navbarSupportedContent
|
8
|
+
- left_links = @links.is_a?(Hash) ? @links[:left] : @links
|
9
|
+
- if left_links&.any?
|
10
|
+
%ul.navbar-nav.mr-auto
|
11
|
+
- left_links.each do |link|
|
12
|
+
= render 'layouts/tramway/landing/navbar/link', link: link
|
13
|
+
- right_links = @links.is_a?(Hash) ? @links.dig(:right) : []
|
14
|
+
- if right_links&.any?
|
15
|
+
%ul.navbar-nav.ml-auto
|
16
|
+
- right_links.each do |link|
|
17
|
+
= render 'layouts/tramway/landing/navbar/link', link: link
|
@@ -1,7 +1,7 @@
|
|
1
1
|
- if link.is_a? Hash
|
2
2
|
.nav-item.dropdown
|
3
3
|
%a.nav-link.dropdown-toggle.scrollable{id: "dropdown_menu_button_#{link.keys.first}", aria: { expanded: :false, haspopup: :true }, data: { toggle: :dropdown } }
|
4
|
-
= link.keys.first
|
4
|
+
= t("navbar.links.#{link.keys.first}")
|
5
5
|
.dropdown-menu.dropdown-primary.scrollable{ aria: { labelledby: "dropdown_menu_button_#{link.keys.first}" } }
|
6
6
|
- link.values.first.each do |menu_item|
|
7
7
|
= link_to menu_item.title, menu_item.link, class: 'dropdown-item'
|
@@ -1,5 +1,9 @@
|
|
1
1
|
.row.page{ id: block.anchor }
|
2
2
|
.col-md-7
|
3
|
-
|
3
|
+
- if block.background.present?
|
4
|
+
- background_url = block.background.is_a?(String) ? block.background : block.background.url
|
5
|
+
= image_tag background_url, class: 'img-fluid'
|
6
|
+
- else
|
7
|
+
- raise "Block background should valid image URL or PhotoUploader object. Block: #{block}"
|
4
8
|
.col-md-5{ style: 'text-align: justify' }
|
5
9
|
= render 'tramway/landing/templates/text', block: block
|
@@ -3,7 +3,8 @@ ru:
|
|
3
3
|
landing:
|
4
4
|
templates:
|
5
5
|
alert:
|
6
|
+
invalid_email_or_password: Пользователь не найден или введен неверный пароль
|
6
7
|
sign_up_successful: Регистрация прошла успешно
|
7
8
|
ign_in_successful: Авторизация прошла успешно
|
8
9
|
there_is_some_errors: Исправьте ошибки
|
9
|
-
|
10
|
+
|
data/lib/tramway/landing.rb
CHANGED
@@ -14,6 +14,15 @@ module Tramway
|
|
14
14
|
def head_content
|
15
15
|
(defined?(@@head_content) && @@head_content) || []
|
16
16
|
end
|
17
|
+
|
18
|
+
def set_navbar(bool, project:)
|
19
|
+
@@navbars ||= {}
|
20
|
+
@@navbars.merge! project => bool
|
21
|
+
end
|
22
|
+
|
23
|
+
def navbar_for(project)
|
24
|
+
@@navbars.with_indifferent_access[project]
|
25
|
+
end
|
17
26
|
end
|
18
27
|
end
|
19
28
|
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: 3.
|
4
|
+
version: '3.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- moshinaan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Landing Engine for your Rails projects
|
14
14
|
email:
|