active_material 2.1.0 → 2.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/config/importmap.rb +2 -0
- data/lib/active_material/font_loader.rb +16 -2
- data/lib/active_material/version.rb +1 -1
- data/package.json +23 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0befeef9159040b47e03da4f2d258451c580a0d9ab33b2e0c10e249e8a7ac556
|
4
|
+
data.tar.gz: 550bc54c62434b4c81b1156a7d402283f22e497051b4d47a660ae5631be40790
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d0d4ed26ce6857b0837e759b8113e3a6f598a80b6880b79669d9303fdf3f8d320366f2618048ebead4452c0c27cf09490c704c3a0d7fa89edce07c93bcf3a2d6
|
7
|
+
data.tar.gz: 9174bfa663d0b9ae7718de7558883adc9ff8df4c82dc7195e1fa0ee7c1b5fa5dfd3e95e42c25cf872d2a75092ac4f9594614b856b067798291c3ef9d46b999e3
|
data/config/importmap.rb
ADDED
@@ -3,10 +3,24 @@ module ActiveMaterial
|
|
3
3
|
def build_active_admin_head
|
4
4
|
within super do
|
5
5
|
uri = URI.parse(ActiveMaterial::Rails::Engine.config.active_material.font_url)
|
6
|
-
|
7
|
-
|
6
|
+
origin = extract_origin(uri)
|
7
|
+
|
8
|
+
link(rel: "preconnect", href: origin)
|
9
|
+
link(rel: "preconnect", href: origin, crossorigin: true)
|
8
10
|
link(rel: "stylesheet", href: uri.to_s)
|
9
11
|
end
|
10
12
|
end
|
13
|
+
|
14
|
+
private
|
15
|
+
|
16
|
+
def extract_origin(uri)
|
17
|
+
origin = "#{uri.scheme}://#{uri.host}"
|
18
|
+
origin += ":#{uri.port}" if uri.port && !default_port?(uri)
|
19
|
+
origin
|
20
|
+
end
|
21
|
+
|
22
|
+
def default_port?(uri)
|
23
|
+
(uri.scheme == 'http' && uri.port == 80) || (uri.scheme == 'https' && uri.port == 443)
|
24
|
+
end
|
11
25
|
end
|
12
26
|
end
|
data/package.json
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
{
|
2
|
+
"name": "active_material",
|
3
|
+
"version": "2.1.1",
|
4
|
+
"description": "ActiveAdmin skin based on Google's Material Design.",
|
5
|
+
"main": "src/javascripts/active_material.js",
|
6
|
+
"directories": {
|
7
|
+
"lib": "lib"
|
8
|
+
},
|
9
|
+
"scripts": {
|
10
|
+
},
|
11
|
+
"repository": {
|
12
|
+
"type": "git",
|
13
|
+
"url": "git+https://github.com/dkniffin/active_material.git"
|
14
|
+
},
|
15
|
+
"author": "Derek Kniffin",
|
16
|
+
"license": "MIT",
|
17
|
+
"bugs": {
|
18
|
+
"url": "https://github.com/dkniffin/active_material/issues"
|
19
|
+
},
|
20
|
+
"homepage": "https://github.com/dkniffin/active_material#readme",
|
21
|
+
"dependencies": {},
|
22
|
+
"devDependencies": {}
|
23
|
+
}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: active_material
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Derek Kniffin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-07
|
11
|
+
date: 2024-08-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -130,9 +130,11 @@ files:
|
|
130
130
|
- app/assets/stylesheets/active_material/values/elevation.scss
|
131
131
|
- app/assets/stylesheets/active_material/values/fonts.scss
|
132
132
|
- app/assets/stylesheets/active_material/values/units.scss
|
133
|
+
- config/importmap.rb
|
133
134
|
- lib/active_material.rb
|
134
135
|
- lib/active_material/font_loader.rb
|
135
136
|
- lib/active_material/version.rb
|
137
|
+
- package.json
|
136
138
|
homepage: ''
|
137
139
|
licenses:
|
138
140
|
- MIT
|