tramway-landing 1.8.3.3 → 2.0

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: 9c6127a11d67afa8071d0c664a8c2b6f162dcffcda0dbd5f89cb89d7bd6a8e6d
4
- data.tar.gz: 9ed9d974e374fe06b36ae525b864fe2e5202c40f5c0aa017d95bc5ff22fe616e
3
+ metadata.gz: c92fbaf61c7b2ca3fc746687530e0c8ff7dd32ea88de36a91a190f7b1927c55b
4
+ data.tar.gz: 8d30fb134d23de2a467e982d634caeb8394858c1657f00b51f1219c68814097e
5
5
  SHA512:
6
- metadata.gz: bcee207d0b0f0610ac051900582cf6b4dab1646f298b756a85e76d5e60598214c69cc8c6c6d5dd0b174c072ceee359303e8260dd023e6c8e7d17c141853b40af
7
- data.tar.gz: 2fa29412833258a913ae3a3668f2da5e27057f60941b337d396b3664b1db7dbafa8bb54e55ec83631475b308447903496b08db07c2f738c28e4722c362d7ed6b
6
+ metadata.gz: e076bd494b2146761d4fc35bece376ba42f83388ca2cbf136560ed6c3696700516070e7ab1b0ac747dbd36294f02af3177e173038e3f948789d9884feaaee327
7
+ data.tar.gz: b036c4a2b74d682fd771b7094075682fb206cbb8444039da1acf99e0d7b08a8e0a59187b5ecbc441c30db6cd3c52cf1c3303fa2bb6a496b4f10a60296ad07a81
data/README.md CHANGED
@@ -74,9 +74,6 @@ root to: 'web/welcome#index'
74
74
 
75
75
  *app/views/web/welcome/index.html.haml*
76
76
  ```haml
77
- = content_for :head_content do
78
- -# your content for <head>
79
-
80
77
  = content_for :title do
81
78
  -# your content for <title>
82
79
 
@@ -104,6 +101,33 @@ root to: 'web/welcome#index'
104
101
  -# everything you want on the main page
105
102
  ```
106
103
 
104
+ ## Head Content
105
+
106
+ ### Tramway::Landing 2.x
107
+
108
+ It will push this content to `<head>` tag in every landing page. Including public page in `tramway-event`, `tramway-sport_school`, `tramway-conference`, `tramway-news`, `tramway-page` gems.
109
+
110
+ *config/initializers/tramway.rb*
111
+
112
+ ```ruby
113
+ ::Tramway::Landing.head_content = lambda do
114
+ concat javascript_include_tag :application
115
+ concat stylesheet_link_tag :application
116
+ # don't forget to use `concat` method here
117
+ end
118
+ ```
119
+
120
+ ### Tramway::Landing 1.x
121
+
122
+ It will push this content to `<head>` tag only on main page. You aren't able to manage head tag in other gems and pages.
123
+
124
+ *app/views/web/welcome/index.html.haml*
125
+
126
+ ```haml
127
+ = content_for :head_content do
128
+ -# your content for <head>
129
+ ```
130
+
107
131
  Then all your showing blocks will be on the main page.
108
132
 
109
133
  ## Blocks
@@ -10,7 +10,7 @@
10
10
  = javascript_include_tag 'https://code.jquery.com/jquery-3.2.1.slim.min.js', integrity: 'sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN', crossorigin: 'anonymous'
11
11
  = javascript_include_tag 'https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js', integrity: 'sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q', crossorigin: 'anonymous'
12
12
  = csrf_meta_tags
13
- = yield :head_content
13
+ - self.instance_exec &::Tramway::Landing.head_content
14
14
  %body
15
15
  = stylesheet_link_tag 'https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.4.5/css/mdb.min.css'
16
16
  = javascript_include_tag 'https://cdnjs.cloudflare.com/ajax/libs/mdbootstrap/4.4.5/js/mdb.js'
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Tramway
4
4
  module Landing
5
- VERSION = '1.8.3.3'
5
+ VERSION = '2.0'
6
6
  end
7
7
  end
@@ -5,5 +5,8 @@ require 'tramway/landing/generates/install_generator'
5
5
 
6
6
  module Tramway
7
7
  module Landing
8
+ class << self
9
+ attr_accessor :head_content
10
+ end
8
11
  end
9
12
  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.8.3.3
4
+ version: '2.0'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Kalashnikov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-01-25 00:00:00.000000000 Z
11
+ date: 2020-01-29 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Landing Engine for your Rails projects
14
14
  email: