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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a07142655ea5f526eac28bc7cf0a3927cc409cb109406295da0069166a4f8119
4
- data.tar.gz: 352a98f439a4d8ff0e95c833e838813bfda780ce4e32ef91905396977efb06cc
3
+ metadata.gz: 1173a00383661feff98ffb68918d16347cf47f9a64295d0aa10825abb2a51dc2
4
+ data.tar.gz: bd45201e8a212c7abbeeebf2ae9d7f83f90715cb2f531ce4d5b4f282af0019de
5
5
  SHA512:
6
- metadata.gz: 87cb4fd35bd7397d62fc117f302cfbee55144d8a026a3c87bc7cf974eb058eaf43cd92a2329f48558fd8d8ed23c07fb3666828cc55f289595b493234defe111f
7
- data.tar.gz: b864e61fa4e4c31be1b8015daa538545b1f18a812d56bf70b3ae5bf9547a10ab83c725c656093b82917cc2f1e3697fb14adf23f2bbcc37f5a5f9cadcaa977e01
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
- for (const selector in iframe_selectors_for_video) {
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
- unless block.is_a? Array
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.each do |_current_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
- %nav.navbar.navbar-expand-lg.navbar-dark.indigo.scrolling-navbar.fixed-top
2
- = link_to @application.public_name || yield(:application_name), '/', class: 'navbar-brand'
3
- %button.navbar-toggler{ type: :button, data: { toggle: :collapse, target: '#navbarSupportedContent' }, aria: { controls: 'navbarSupportedContent', expanded: 'false', label: 'Toggle navigation' } }
4
- - if @links&.any?
5
- = fa_icon :bars
6
- .collapse.navbar-collapse#navbarSupportedContent
7
- - left_links = @links.is_a?(Hash) ? @links[:left] : @links
8
- - if left_links&.any?
9
- %ul.navbar-nav.mr-auto
10
- - left_links.each do |link|
11
- = render 'layouts/tramway/landing/navbar/link', link: link
12
- - right_links = @links.is_a?(Hash) ? @links.dig(:right) : []
13
- - if right_links&.any?
14
- %ul.navbar-nav.ml-auto
15
- - right_links.each do |link|
16
- = render 'layouts/tramway/landing/navbar/link', link: link
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
- = image_tag block.background.url, class: 'img-fluid'
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
- ivalid_email_or_password: email или пароль введены неверно
10
+
@@ -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
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Landing
5
- VERSION = '3.1.1.8'
5
+ VERSION = '3.2'
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: 3.1.1.8
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: 2020-09-07 00:00:00.000000000 Z
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: