kamifusen 1.8 → 1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/views/kamifusen/_view.html.erb +2 -3
- data/lib/kamifusen/version.rb +1 -1
- data/lib/kamifusen.rb +30 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a82b418d1a07d8b33f845d6ded2bdf3d1309943e41350f8e003bbdcbfe867f08
|
4
|
+
data.tar.gz: 0d20f1c01167036520f1451f1d295d8c7a32d40e315b8ac6fdee707fb3236c43
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 999758e2fece72df932546f261091b4ffc1584b85668fc9102852d703d4c45526a66ae980ae918f64a6884b99267d2c8c2d3c4646b78a7475ccfd5c01ccf64e0
|
7
|
+
data.tar.gz: be8d74901d1bb3f1859e01e6940c00aa2c9ee67aa086c34fb241de5e5adb510e14a93f39c040ba8dfa8708b1134d7637783775b3a7225cb400575d57643c316c
|
@@ -11,9 +11,8 @@ picture_class = options[:picture_class]
|
|
11
11
|
width = options[:width]
|
12
12
|
height = options[:height]
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
quality = 80
|
14
|
+
sizes = Kamifusen.sizes
|
15
|
+
quality = Kamifusen.quality
|
17
16
|
|
18
17
|
if source&.metadata &&
|
19
18
|
source.metadata['analyzed'] &&
|
data/lib/kamifusen/version.rb
CHANGED
data/lib/kamifusen.rb
CHANGED
@@ -9,6 +9,36 @@ module Kamifusen
|
|
9
9
|
mattr_accessor :with_webp
|
10
10
|
@@with_webp = true
|
11
11
|
|
12
|
+
mattr_accessor :sizes
|
13
|
+
@@sizes = [
|
14
|
+
# 360, # Old android
|
15
|
+
375, # Old iPhone
|
16
|
+
# 414, # ?
|
17
|
+
576, # Tablets desktop
|
18
|
+
640, # iPhone SE, some tablets
|
19
|
+
750, # iPhone 6/7/8, 375@2x
|
20
|
+
768, # Old iPads, Old desktops
|
21
|
+
# 828, # ?
|
22
|
+
# 992, # Breakpoint bootstrap
|
23
|
+
1080, # iPhone 6/7/8 plus, 414@2.608 (sorry)
|
24
|
+
# 1125, # iPhone 10, 375@3x
|
25
|
+
1152,
|
26
|
+
# 1172, # iPhone 12, 390@3x
|
27
|
+
1200, # Desktop
|
28
|
+
1366, # Desktop
|
29
|
+
# 1400, # Breakpoint boostrap
|
30
|
+
1440, # Samsung Galaxy S20, 360@4x
|
31
|
+
1536, # Desktop, some iPads
|
32
|
+
1920, # Desktop 2k
|
33
|
+
2048, # Some iPad
|
34
|
+
2240, # Desktop iMac M1 chipset
|
35
|
+
2880, # Desktop MacBook Pro/Air 13" @2x
|
36
|
+
3072 # Desktop MacBook Pro 16" @2x
|
37
|
+
]
|
38
|
+
|
39
|
+
mattr_accessor :quality
|
40
|
+
@@quality = 80
|
41
|
+
|
12
42
|
class Engine < ::Rails::Engine
|
13
43
|
end
|
14
44
|
|