amp-html 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/app/helpers/amp_html/base_helper.rb +11 -0
- data/app/views/mozaic/amp/_head.html.erb +2 -2
- data/lib/amp-html/version.rb +1 -1
- metadata +30 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d3fe2287cdfe4c4e9affc65691e2cd219a08680b27e8aa437119ec78b011a44e
|
4
|
+
data.tar.gz: d3953a2516a7a75a89045629535644e35e150913d3344bae5dde63168b8556fb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5036faefbf235d67e07aa407f6a0f27d38c7e5b86a9afe0cb5426ce3ccedc42c3bbe985ef88988d3572ef098107870f659c7dbd70679d7ba30d3087a309020d7
|
7
|
+
data.tar.gz: 62d92bf61441f2ebb85f3bc7428b4c4a55dbc91f6c90878b884531d6388702066b9961a5e4da0857c3d998c1fffa80fcd9b9fd59242ec2c449e3603711c51528
|
data/CHANGELOG.md
CHANGED
@@ -10,5 +10,16 @@ module AmpHtml
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
+
# Fix for accessing AMP assets in different environments
|
14
|
+
def get_asset name
|
15
|
+
if Rails.application.assets
|
16
|
+
asset = Rails.application.assets[name]
|
17
|
+
return asset.to_s if asset
|
18
|
+
end
|
19
|
+
asset = Rails.application.assets_manifest.assets[name]
|
20
|
+
return nil unless asset
|
21
|
+
return File.binread(File.join(Rails.application.assets_manifest.dir, asset))
|
22
|
+
end
|
23
|
+
|
13
24
|
end
|
14
25
|
end
|
@@ -7,7 +7,7 @@
|
|
7
7
|
|
8
8
|
<style amp-boilerplate>body{-webkit-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-moz-animation:-amp-start 8s steps(1,end) 0s 1 normal both;-ms-animation:-amp-start 8s steps(1,end) 0s 1 normal both;animation:-amp-start 8s steps(1,end) 0s 1 normal both}@-webkit-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-moz-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-ms-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@-o-keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}@keyframes -amp-start{from{visibility:hidden}to{visibility:visible}}</style><noscript><style amp-boilerplate>body{-webkit-animation:none;-moz-animation:none;-ms-animation:none;animation:none}</style></noscript>
|
9
9
|
<style amp-custom>
|
10
|
-
<%=
|
11
|
-
<%=
|
10
|
+
<%= get_asset 'application.css' if AmpHtml.configuration.inherit_stylesheets %>
|
11
|
+
<%= get_asset 'amp/application.css' %>
|
12
12
|
<%= area :css %>
|
13
13
|
</style>
|
data/lib/amp-html/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: amp-html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Hübotter
|
@@ -11,7 +11,7 @@ cert_chain: []
|
|
11
11
|
date: 2018-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: railties
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
@@ -24,6 +24,34 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '5.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: actionpack
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: sprockets-rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.2'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.2'
|
27
55
|
- !ruby/object:Gem::Dependency
|
28
56
|
name: mozaic
|
29
57
|
requirement: !ruby/object:Gem::Requirement
|