tramway-landing 1.8.3.3 → 2.0
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 +4 -4
- data/README.md +27 -3
- data/app/views/layouts/tramway/landing/application.html.haml +1 -1
- data/lib/tramway/landing/version.rb +1 -1
- data/lib/tramway/landing.rb +3 -0
- 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: c92fbaf61c7b2ca3fc746687530e0c8ff7dd32ea88de36a91a190f7b1927c55b
|
|
4
|
+
data.tar.gz: 8d30fb134d23de2a467e982d634caeb8394858c1657f00b51f1219c68814097e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
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
|
-
|
|
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'
|
data/lib/tramway/landing.rb
CHANGED
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: '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-
|
|
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:
|