card-mod-carrierwave 0.15.6 → 0.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE +674 -0
- data/README.md +6 -0
- data/config/admin.yml +4 -0
- data/data/files/decko_logo/image-original.svg +1 -84
- data/data/files/favicon/image-large.png +0 -0
- data/data/files/favicon/image-medium.png +0 -0
- data/data/files/favicon/image-small.png +0 -0
- data/data/files/logo/image-original.svg +1 -84
- data/data/files/logo.svg +1 -84
- data/data/files/mao2.jpg +0 -0
- data/data/transform/20230130141025_move_favicon.rb +8 -0
- data/lib/carrier_wave/card_mount.rb +26 -17
- data/lib/carrier_wave/file_card_uploader.rb +25 -6
- data/lib/carrier_wave/image_card_uploader.rb +2 -2
- data/set/abstract/attachment/coded.rb +5 -1
- data/set/type/file.rb +13 -1
- metadata +34 -17
- data/db/migrate_core_cards/20230130141025_move_favicon.rb +0 -8
data/config/admin.yml
ADDED
@@ -1,84 +1 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
2
|
-
version="1.1" viewBox="0 0 242 218">
|
3
|
-
<title>b&w_logo</title>
|
4
|
-
<desc>Created with Sketch.</desc>
|
5
|
-
<defs>
|
6
|
-
<rect id="path-1" width="157.28" height="190.607" x="35.33" y="10.485" rx="12.491"/>
|
7
|
-
<filter id="filter-2" width="125.4%" height="121%" x="-12.1%" y="-10.5%"
|
8
|
-
filterUnits="objectBoundingBox">
|
9
|
-
<feMorphology in="SourceAlpha" operator="dilate" radius="1"
|
10
|
-
result="shadowSpreadOuter1"/>
|
11
|
-
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/>
|
12
|
-
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1"
|
13
|
-
stdDeviation="5.5"/>
|
14
|
-
<feColorMatrix in="shadowBlurOuter1" type="matrix"
|
15
|
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
16
|
-
</filter>
|
17
|
-
<rect id="path-3" width="123.953" height="171.161" x="51.988" y="19.404" rx="9.689"/>
|
18
|
-
<filter id="filter-4" width="132.3%" height="123.4%" x="-15.3%" y="-11.7%"
|
19
|
-
filterUnits="objectBoundingBox">
|
20
|
-
<feMorphology in="SourceAlpha" operator="dilate" radius="1"
|
21
|
-
result="shadowSpreadOuter1"/>
|
22
|
-
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/>
|
23
|
-
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1"
|
24
|
-
stdDeviation="5.5"/>
|
25
|
-
<feColorMatrix in="shadowBlurOuter1" type="matrix"
|
26
|
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
27
|
-
</filter>
|
28
|
-
<path id="path-5"
|
29
|
-
d="M70.1050368,35.6666109 L159.089911,35.6666109 L159.089911,35.6666109 C163.678051,35.6666109 167.397473,39.386033 167.397473,43.9741728 L167.397473,87.717145 L167.397473,166.808436 L167.397473,166.808436 C167.397473,171.396576 163.678051,175.115998 159.089911,175.115998 L70.1050368,175.115998 L70.1050368,175.115998 C65.516897,175.115998 61.7974749,171.396576 61.7974749,166.808436 L61.7974749,43.9741728 L61.7974749,43.9741728 C61.7974749,39.386033 65.516897,35.6666109 70.1050368,35.6666109 Z"/>
|
30
|
-
<filter id="filter-6" width="137.9%" height="128.7%" x="-18%" y="-14.3%"
|
31
|
-
filterUnits="objectBoundingBox">
|
32
|
-
<feMorphology in="SourceAlpha" operator="dilate" radius="1"
|
33
|
-
result="shadowSpreadOuter1"/>
|
34
|
-
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/>
|
35
|
-
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1"
|
36
|
-
stdDeviation="5.5"/>
|
37
|
-
<feColorMatrix in="shadowBlurOuter1" type="matrix"
|
38
|
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
39
|
-
</filter>
|
40
|
-
<rect id="path-7" width="92.149" height="107.187" x="70.764" y="49.853" rx="7.866"/>
|
41
|
-
<filter id="filter-8" width="143.4%" height="137.3%" x="-20.6%" y="-18.7%"
|
42
|
-
filterUnits="objectBoundingBox">
|
43
|
-
<feMorphology in="SourceAlpha" operator="dilate" radius="1"
|
44
|
-
result="shadowSpreadOuter1"/>
|
45
|
-
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/>
|
46
|
-
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1"
|
47
|
-
stdDeviation="5.5"/>
|
48
|
-
<feColorMatrix in="shadowBlurOuter1" type="matrix"
|
49
|
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.102553216 0"/>
|
50
|
-
</filter>
|
51
|
-
</defs>
|
52
|
-
<g id="Page-3" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1">
|
53
|
-
<g id="b&w_logo" fill-rule="nonzero">
|
54
|
-
<g id="Decko-Logo-" transform="translate(7.000000, 4.000000)">
|
55
|
-
<g id="g5642">
|
56
|
-
<g id="svg-card-1"
|
57
|
-
transform="translate(113.969540, 105.788552) scale(-1, 1) rotate(105.855860) translate(-113.969540, -105.788552)">
|
58
|
-
<use fill="#000" fill-opacity="1" filter="url(#filter-2)"
|
59
|
-
xlink:href="#path-1"/>
|
60
|
-
<use fill="#4D4D4D" fill-rule="evenodd" xlink:href="#path-1"/>
|
61
|
-
</g>
|
62
|
-
<g id="svg-card-2" opacity=".88"
|
63
|
-
transform="translate(113.964538, 104.984820) scale(-1, 1) rotate(117.480003) translate(-113.964538, -104.984820)">
|
64
|
-
<use fill="#000" fill-opacity="1" filter="url(#filter-4)"
|
65
|
-
xlink:href="#path-3"/>
|
66
|
-
<use fill="#FFF" fill-rule="evenodd" xlink:href="#path-3"/>
|
67
|
-
</g>
|
68
|
-
<g id="svg-card-3"
|
69
|
-
transform="translate(114.597474, 105.391304) scale(-1, 1) rotate(133.539993) translate(-114.597474, -105.391304)">
|
70
|
-
<use fill="#000" fill-opacity="1" filter="url(#filter-6)"
|
71
|
-
xlink:href="#path-5"/>
|
72
|
-
<use fill="#4C4C4C" fill-rule="evenodd" xlink:href="#path-5"/>
|
73
|
-
</g>
|
74
|
-
<g id="svg-card-4" opacity=".88"
|
75
|
-
transform="translate(116.838368, 103.446228) scale(-1, 1) rotate(142.690002) translate(-116.838368, -103.446228)">
|
76
|
-
<use fill="#000" fill-opacity="1" filter="url(#filter-8)"
|
77
|
-
xlink:href="#path-7"/>
|
78
|
-
<use fill="#FFF" fill-rule="evenodd" xlink:href="#path-7"/>
|
79
|
-
</g>
|
80
|
-
</g>
|
81
|
-
</g>
|
82
|
-
</g>
|
83
|
-
</g>
|
84
|
-
</svg>
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 242 218"><title>b&w_logo</title><desc>Created with Sketch.</desc><defs><rect id="path-1" width="157.28" height="190.607" x="35.33" y="10.485" rx="12.491"/><filter id="filter-2" width="125.4%" height="121%" x="-12.1%" y="-10.5%" filterUnits="objectBoundingBox"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="5.5"/><feColorMatrix in="shadowBlurOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/></filter><rect id="path-3" width="123.953" height="171.161" x="51.988" y="19.404" rx="9.689"/><filter id="filter-4" width="132.3%" height="123.4%" x="-15.3%" y="-11.7%" filterUnits="objectBoundingBox"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="5.5"/><feColorMatrix in="shadowBlurOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/></filter><path id="path-5" d="M70.1050368,35.6666109 L159.089911,35.6666109 L159.089911,35.6666109 C163.678051,35.6666109 167.397473,39.386033 167.397473,43.9741728 L167.397473,87.717145 L167.397473,166.808436 L167.397473,166.808436 C167.397473,171.396576 163.678051,175.115998 159.089911,175.115998 L70.1050368,175.115998 L70.1050368,175.115998 C65.516897,175.115998 61.7974749,171.396576 61.7974749,166.808436 L61.7974749,43.9741728 L61.7974749,43.9741728 C61.7974749,39.386033 65.516897,35.6666109 70.1050368,35.6666109 Z"/><filter id="filter-6" width="137.9%" height="128.7%" x="-18%" y="-14.3%" filterUnits="objectBoundingBox"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="5.5"/><feColorMatrix in="shadowBlurOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/></filter><rect id="path-7" width="92.149" height="107.187" x="70.764" y="49.853" rx="7.866"/><filter id="filter-8" width="143.4%" height="137.3%" x="-20.6%" y="-18.7%" filterUnits="objectBoundingBox"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="5.5"/><feColorMatrix in="shadowBlurOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.102553216 0"/></filter></defs><g id="Page-3" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="b&w_logo" fill-rule="nonzero"><g id="Decko-Logo-" transform="translate(7.000000, 4.000000)"><g id="g5642"><g id="svg-card-1" transform="translate(113.969540, 105.788552) scale(-1, 1) rotate(105.855860) translate(-113.969540, -105.788552)"><use fill="#000" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"/><use fill="#4D4D4D" fill-rule="evenodd" xlink:href="#path-1"/></g><g id="svg-card-2" opacity=".88" transform="translate(113.964538, 104.984820) scale(-1, 1) rotate(117.480003) translate(-113.964538, -104.984820)"><use fill="#000" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"/><use fill="#FFF" fill-rule="evenodd" xlink:href="#path-3"/></g><g id="svg-card-3" transform="translate(114.597474, 105.391304) scale(-1, 1) rotate(133.539993) translate(-114.597474, -105.391304)"><use fill="#000" fill-opacity="1" filter="url(#filter-6)" xlink:href="#path-5"/><use fill="#4C4C4C" fill-rule="evenodd" xlink:href="#path-5"/></g><g id="svg-card-4" opacity=".88" transform="translate(116.838368, 103.446228) scale(-1, 1) rotate(142.690002) translate(-116.838368, -103.446228)"><use fill="#000" fill-opacity="1" filter="url(#filter-8)" xlink:href="#path-7"/><use fill="#FFF" fill-rule="evenodd" xlink:href="#path-7"/></g></g></g></g></g></svg>
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,84 +1 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
2
|
-
version="1.1" viewBox="0 0 242 218">
|
3
|
-
<title>b&w_logo</title>
|
4
|
-
<desc>Created with Sketch.</desc>
|
5
|
-
<defs>
|
6
|
-
<rect id="path-1" width="157.28" height="190.607" x="35.33" y="10.485" rx="12.491"/>
|
7
|
-
<filter id="filter-2" width="125.4%" height="121%" x="-12.1%" y="-10.5%"
|
8
|
-
filterUnits="objectBoundingBox">
|
9
|
-
<feMorphology in="SourceAlpha" operator="dilate" radius="1"
|
10
|
-
result="shadowSpreadOuter1"/>
|
11
|
-
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/>
|
12
|
-
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1"
|
13
|
-
stdDeviation="5.5"/>
|
14
|
-
<feColorMatrix in="shadowBlurOuter1" type="matrix"
|
15
|
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
16
|
-
</filter>
|
17
|
-
<rect id="path-3" width="123.953" height="171.161" x="51.988" y="19.404" rx="9.689"/>
|
18
|
-
<filter id="filter-4" width="132.3%" height="123.4%" x="-15.3%" y="-11.7%"
|
19
|
-
filterUnits="objectBoundingBox">
|
20
|
-
<feMorphology in="SourceAlpha" operator="dilate" radius="1"
|
21
|
-
result="shadowSpreadOuter1"/>
|
22
|
-
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/>
|
23
|
-
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1"
|
24
|
-
stdDeviation="5.5"/>
|
25
|
-
<feColorMatrix in="shadowBlurOuter1" type="matrix"
|
26
|
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
27
|
-
</filter>
|
28
|
-
<path id="path-5"
|
29
|
-
d="M70.1050368,35.6666109 L159.089911,35.6666109 L159.089911,35.6666109 C163.678051,35.6666109 167.397473,39.386033 167.397473,43.9741728 L167.397473,87.717145 L167.397473,166.808436 L167.397473,166.808436 C167.397473,171.396576 163.678051,175.115998 159.089911,175.115998 L70.1050368,175.115998 L70.1050368,175.115998 C65.516897,175.115998 61.7974749,171.396576 61.7974749,166.808436 L61.7974749,43.9741728 L61.7974749,43.9741728 C61.7974749,39.386033 65.516897,35.6666109 70.1050368,35.6666109 Z"/>
|
30
|
-
<filter id="filter-6" width="137.9%" height="128.7%" x="-18%" y="-14.3%"
|
31
|
-
filterUnits="objectBoundingBox">
|
32
|
-
<feMorphology in="SourceAlpha" operator="dilate" radius="1"
|
33
|
-
result="shadowSpreadOuter1"/>
|
34
|
-
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/>
|
35
|
-
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1"
|
36
|
-
stdDeviation="5.5"/>
|
37
|
-
<feColorMatrix in="shadowBlurOuter1" type="matrix"
|
38
|
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
39
|
-
</filter>
|
40
|
-
<rect id="path-7" width="92.149" height="107.187" x="70.764" y="49.853" rx="7.866"/>
|
41
|
-
<filter id="filter-8" width="143.4%" height="137.3%" x="-20.6%" y="-18.7%"
|
42
|
-
filterUnits="objectBoundingBox">
|
43
|
-
<feMorphology in="SourceAlpha" operator="dilate" radius="1"
|
44
|
-
result="shadowSpreadOuter1"/>
|
45
|
-
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/>
|
46
|
-
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1"
|
47
|
-
stdDeviation="5.5"/>
|
48
|
-
<feColorMatrix in="shadowBlurOuter1" type="matrix"
|
49
|
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.102553216 0"/>
|
50
|
-
</filter>
|
51
|
-
</defs>
|
52
|
-
<g id="Page-3" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1">
|
53
|
-
<g id="b&w_logo" fill-rule="nonzero">
|
54
|
-
<g id="Decko-Logo-" transform="translate(7.000000, 4.000000)">
|
55
|
-
<g id="g5642">
|
56
|
-
<g id="svg-card-1"
|
57
|
-
transform="translate(113.969540, 105.788552) scale(-1, 1) rotate(105.855860) translate(-113.969540, -105.788552)">
|
58
|
-
<use fill="#000" fill-opacity="1" filter="url(#filter-2)"
|
59
|
-
xlink:href="#path-1"/>
|
60
|
-
<use fill="#4D4D4D" fill-rule="evenodd" xlink:href="#path-1"/>
|
61
|
-
</g>
|
62
|
-
<g id="svg-card-2" opacity=".88"
|
63
|
-
transform="translate(113.964538, 104.984820) scale(-1, 1) rotate(117.480003) translate(-113.964538, -104.984820)">
|
64
|
-
<use fill="#000" fill-opacity="1" filter="url(#filter-4)"
|
65
|
-
xlink:href="#path-3"/>
|
66
|
-
<use fill="#FFF" fill-rule="evenodd" xlink:href="#path-3"/>
|
67
|
-
</g>
|
68
|
-
<g id="svg-card-3"
|
69
|
-
transform="translate(114.597474, 105.391304) scale(-1, 1) rotate(133.539993) translate(-114.597474, -105.391304)">
|
70
|
-
<use fill="#000" fill-opacity="1" filter="url(#filter-6)"
|
71
|
-
xlink:href="#path-5"/>
|
72
|
-
<use fill="#4C4C4C" fill-rule="evenodd" xlink:href="#path-5"/>
|
73
|
-
</g>
|
74
|
-
<g id="svg-card-4" opacity=".88"
|
75
|
-
transform="translate(116.838368, 103.446228) scale(-1, 1) rotate(142.690002) translate(-116.838368, -103.446228)">
|
76
|
-
<use fill="#000" fill-opacity="1" filter="url(#filter-8)"
|
77
|
-
xlink:href="#path-7"/>
|
78
|
-
<use fill="#FFF" fill-rule="evenodd" xlink:href="#path-7"/>
|
79
|
-
</g>
|
80
|
-
</g>
|
81
|
-
</g>
|
82
|
-
</g>
|
83
|
-
</g>
|
84
|
-
</svg>
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 242 218"><title>b&w_logo</title><desc>Created with Sketch.</desc><defs><rect id="path-1" width="157.28" height="190.607" x="35.33" y="10.485" rx="12.491"/><filter id="filter-2" width="125.4%" height="121%" x="-12.1%" y="-10.5%" filterUnits="objectBoundingBox"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="5.5"/><feColorMatrix in="shadowBlurOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/></filter><rect id="path-3" width="123.953" height="171.161" x="51.988" y="19.404" rx="9.689"/><filter id="filter-4" width="132.3%" height="123.4%" x="-15.3%" y="-11.7%" filterUnits="objectBoundingBox"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="5.5"/><feColorMatrix in="shadowBlurOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/></filter><path id="path-5" d="M70.1050368,35.6666109 L159.089911,35.6666109 L159.089911,35.6666109 C163.678051,35.6666109 167.397473,39.386033 167.397473,43.9741728 L167.397473,87.717145 L167.397473,166.808436 L167.397473,166.808436 C167.397473,171.396576 163.678051,175.115998 159.089911,175.115998 L70.1050368,175.115998 L70.1050368,175.115998 C65.516897,175.115998 61.7974749,171.396576 61.7974749,166.808436 L61.7974749,43.9741728 L61.7974749,43.9741728 C61.7974749,39.386033 65.516897,35.6666109 70.1050368,35.6666109 Z"/><filter id="filter-6" width="137.9%" height="128.7%" x="-18%" y="-14.3%" filterUnits="objectBoundingBox"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="5.5"/><feColorMatrix in="shadowBlurOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/></filter><rect id="path-7" width="92.149" height="107.187" x="70.764" y="49.853" rx="7.866"/><filter id="filter-8" width="143.4%" height="137.3%" x="-20.6%" y="-18.7%" filterUnits="objectBoundingBox"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="5.5"/><feColorMatrix in="shadowBlurOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.102553216 0"/></filter></defs><g id="Page-3" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="b&w_logo" fill-rule="nonzero"><g id="Decko-Logo-" transform="translate(7.000000, 4.000000)"><g id="g5642"><g id="svg-card-1" transform="translate(113.969540, 105.788552) scale(-1, 1) rotate(105.855860) translate(-113.969540, -105.788552)"><use fill="#000" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"/><use fill="#4D4D4D" fill-rule="evenodd" xlink:href="#path-1"/></g><g id="svg-card-2" opacity=".88" transform="translate(113.964538, 104.984820) scale(-1, 1) rotate(117.480003) translate(-113.964538, -104.984820)"><use fill="#000" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"/><use fill="#FFF" fill-rule="evenodd" xlink:href="#path-3"/></g><g id="svg-card-3" transform="translate(114.597474, 105.391304) scale(-1, 1) rotate(133.539993) translate(-114.597474, -105.391304)"><use fill="#000" fill-opacity="1" filter="url(#filter-6)" xlink:href="#path-5"/><use fill="#4C4C4C" fill-rule="evenodd" xlink:href="#path-5"/></g><g id="svg-card-4" opacity=".88" transform="translate(116.838368, 103.446228) scale(-1, 1) rotate(142.690002) translate(-116.838368, -103.446228)"><use fill="#000" fill-opacity="1" filter="url(#filter-8)" xlink:href="#path-7"/><use fill="#FFF" fill-rule="evenodd" xlink:href="#path-7"/></g></g></g></g></g></svg>
|
data/data/files/logo.svg
CHANGED
@@ -1,84 +1 @@
|
|
1
|
-
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
2
|
-
version="1.1" viewBox="0 0 242 218">
|
3
|
-
<title>b&w_logo</title>
|
4
|
-
<desc>Created with Sketch.</desc>
|
5
|
-
<defs>
|
6
|
-
<rect id="path-1" width="157.28" height="190.607" x="35.33" y="10.485" rx="12.491"/>
|
7
|
-
<filter id="filter-2" width="125.4%" height="121%" x="-12.1%" y="-10.5%"
|
8
|
-
filterUnits="objectBoundingBox">
|
9
|
-
<feMorphology in="SourceAlpha" operator="dilate" radius="1"
|
10
|
-
result="shadowSpreadOuter1"/>
|
11
|
-
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/>
|
12
|
-
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1"
|
13
|
-
stdDeviation="5.5"/>
|
14
|
-
<feColorMatrix in="shadowBlurOuter1" type="matrix"
|
15
|
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
16
|
-
</filter>
|
17
|
-
<rect id="path-3" width="123.953" height="171.161" x="51.988" y="19.404" rx="9.689"/>
|
18
|
-
<filter id="filter-4" width="132.3%" height="123.4%" x="-15.3%" y="-11.7%"
|
19
|
-
filterUnits="objectBoundingBox">
|
20
|
-
<feMorphology in="SourceAlpha" operator="dilate" radius="1"
|
21
|
-
result="shadowSpreadOuter1"/>
|
22
|
-
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/>
|
23
|
-
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1"
|
24
|
-
stdDeviation="5.5"/>
|
25
|
-
<feColorMatrix in="shadowBlurOuter1" type="matrix"
|
26
|
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
27
|
-
</filter>
|
28
|
-
<path id="path-5"
|
29
|
-
d="M70.1050368,35.6666109 L159.089911,35.6666109 L159.089911,35.6666109 C163.678051,35.6666109 167.397473,39.386033 167.397473,43.9741728 L167.397473,87.717145 L167.397473,166.808436 L167.397473,166.808436 C167.397473,171.396576 163.678051,175.115998 159.089911,175.115998 L70.1050368,175.115998 L70.1050368,175.115998 C65.516897,175.115998 61.7974749,171.396576 61.7974749,166.808436 L61.7974749,43.9741728 L61.7974749,43.9741728 C61.7974749,39.386033 65.516897,35.6666109 70.1050368,35.6666109 Z"/>
|
30
|
-
<filter id="filter-6" width="137.9%" height="128.7%" x="-18%" y="-14.3%"
|
31
|
-
filterUnits="objectBoundingBox">
|
32
|
-
<feMorphology in="SourceAlpha" operator="dilate" radius="1"
|
33
|
-
result="shadowSpreadOuter1"/>
|
34
|
-
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/>
|
35
|
-
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1"
|
36
|
-
stdDeviation="5.5"/>
|
37
|
-
<feColorMatrix in="shadowBlurOuter1" type="matrix"
|
38
|
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/>
|
39
|
-
</filter>
|
40
|
-
<rect id="path-7" width="92.149" height="107.187" x="70.764" y="49.853" rx="7.866"/>
|
41
|
-
<filter id="filter-8" width="143.4%" height="137.3%" x="-20.6%" y="-18.7%"
|
42
|
-
filterUnits="objectBoundingBox">
|
43
|
-
<feMorphology in="SourceAlpha" operator="dilate" radius="1"
|
44
|
-
result="shadowSpreadOuter1"/>
|
45
|
-
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/>
|
46
|
-
<feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1"
|
47
|
-
stdDeviation="5.5"/>
|
48
|
-
<feColorMatrix in="shadowBlurOuter1" type="matrix"
|
49
|
-
values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.102553216 0"/>
|
50
|
-
</filter>
|
51
|
-
</defs>
|
52
|
-
<g id="Page-3" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1">
|
53
|
-
<g id="b&w_logo" fill-rule="nonzero">
|
54
|
-
<g id="Decko-Logo-" transform="translate(7.000000, 4.000000)">
|
55
|
-
<g id="g5642">
|
56
|
-
<g id="svg-card-1"
|
57
|
-
transform="translate(113.969540, 105.788552) scale(-1, 1) rotate(105.855860) translate(-113.969540, -105.788552)">
|
58
|
-
<use fill="#000" fill-opacity="1" filter="url(#filter-2)"
|
59
|
-
xlink:href="#path-1"/>
|
60
|
-
<use fill="#4D4D4D" fill-rule="evenodd" xlink:href="#path-1"/>
|
61
|
-
</g>
|
62
|
-
<g id="svg-card-2" opacity=".88"
|
63
|
-
transform="translate(113.964538, 104.984820) scale(-1, 1) rotate(117.480003) translate(-113.964538, -104.984820)">
|
64
|
-
<use fill="#000" fill-opacity="1" filter="url(#filter-4)"
|
65
|
-
xlink:href="#path-3"/>
|
66
|
-
<use fill="#FFF" fill-rule="evenodd" xlink:href="#path-3"/>
|
67
|
-
</g>
|
68
|
-
<g id="svg-card-3"
|
69
|
-
transform="translate(114.597474, 105.391304) scale(-1, 1) rotate(133.539993) translate(-114.597474, -105.391304)">
|
70
|
-
<use fill="#000" fill-opacity="1" filter="url(#filter-6)"
|
71
|
-
xlink:href="#path-5"/>
|
72
|
-
<use fill="#4C4C4C" fill-rule="evenodd" xlink:href="#path-5"/>
|
73
|
-
</g>
|
74
|
-
<g id="svg-card-4" opacity=".88"
|
75
|
-
transform="translate(116.838368, 103.446228) scale(-1, 1) rotate(142.690002) translate(-116.838368, -103.446228)">
|
76
|
-
<use fill="#000" fill-opacity="1" filter="url(#filter-8)"
|
77
|
-
xlink:href="#path-7"/>
|
78
|
-
<use fill="#FFF" fill-rule="evenodd" xlink:href="#path-7"/>
|
79
|
-
</g>
|
80
|
-
</g>
|
81
|
-
</g>
|
82
|
-
</g>
|
83
|
-
</g>
|
84
|
-
</svg>
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" viewBox="0 0 242 218"><title>b&w_logo</title><desc>Created with Sketch.</desc><defs><rect id="path-1" width="157.28" height="190.607" x="35.33" y="10.485" rx="12.491"/><filter id="filter-2" width="125.4%" height="121%" x="-12.1%" y="-10.5%" filterUnits="objectBoundingBox"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="5.5"/><feColorMatrix in="shadowBlurOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/></filter><rect id="path-3" width="123.953" height="171.161" x="51.988" y="19.404" rx="9.689"/><filter id="filter-4" width="132.3%" height="123.4%" x="-15.3%" y="-11.7%" filterUnits="objectBoundingBox"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="5.5"/><feColorMatrix in="shadowBlurOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/></filter><path id="path-5" d="M70.1050368,35.6666109 L159.089911,35.6666109 L159.089911,35.6666109 C163.678051,35.6666109 167.397473,39.386033 167.397473,43.9741728 L167.397473,87.717145 L167.397473,166.808436 L167.397473,166.808436 C167.397473,171.396576 163.678051,175.115998 159.089911,175.115998 L70.1050368,175.115998 L70.1050368,175.115998 C65.516897,175.115998 61.7974749,171.396576 61.7974749,166.808436 L61.7974749,43.9741728 L61.7974749,43.9741728 C61.7974749,39.386033 65.516897,35.6666109 70.1050368,35.6666109 Z"/><filter id="filter-6" width="137.9%" height="128.7%" x="-18%" y="-14.3%" filterUnits="objectBoundingBox"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="5.5"/><feColorMatrix in="shadowBlurOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0"/></filter><rect id="path-7" width="92.149" height="107.187" x="70.764" y="49.853" rx="7.866"/><filter id="filter-8" width="143.4%" height="137.3%" x="-20.6%" y="-18.7%" filterUnits="objectBoundingBox"><feMorphology in="SourceAlpha" operator="dilate" radius="1" result="shadowSpreadOuter1"/><feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"/><feGaussianBlur in="shadowOffsetOuter1" result="shadowBlurOuter1" stdDeviation="5.5"/><feColorMatrix in="shadowBlurOuter1" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.102553216 0"/></filter></defs><g id="Page-3" fill="none" fill-rule="evenodd" stroke="none" stroke-width="1"><g id="b&w_logo" fill-rule="nonzero"><g id="Decko-Logo-" transform="translate(7.000000, 4.000000)"><g id="g5642"><g id="svg-card-1" transform="translate(113.969540, 105.788552) scale(-1, 1) rotate(105.855860) translate(-113.969540, -105.788552)"><use fill="#000" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"/><use fill="#4D4D4D" fill-rule="evenodd" xlink:href="#path-1"/></g><g id="svg-card-2" opacity=".88" transform="translate(113.964538, 104.984820) scale(-1, 1) rotate(117.480003) translate(-113.964538, -104.984820)"><use fill="#000" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"/><use fill="#FFF" fill-rule="evenodd" xlink:href="#path-3"/></g><g id="svg-card-3" transform="translate(114.597474, 105.391304) scale(-1, 1) rotate(133.539993) translate(-114.597474, -105.391304)"><use fill="#000" fill-opacity="1" filter="url(#filter-6)" xlink:href="#path-5"/><use fill="#4C4C4C" fill-rule="evenodd" xlink:href="#path-5"/></g><g id="svg-card-4" opacity=".88" transform="translate(116.838368, 103.446228) scale(-1, 1) rotate(142.690002) translate(-116.838368, -103.446228)"><use fill="#000" fill-opacity="1" filter="url(#filter-8)" xlink:href="#path-7"/><use fill="#FFF" fill-rule="evenodd" xlink:href="#path-7"/></g></g></g></g></g></svg>
|
data/data/files/mao2.jpg
CHANGED
Binary file
|
@@ -1,7 +1,10 @@
|
|
1
1
|
require "carrierwave"
|
2
2
|
|
3
3
|
module CarrierWave
|
4
|
-
#
|
4
|
+
# Adapt carrierwave mount to cards.
|
5
|
+
# We translate the active record hooks in
|
6
|
+
# https://github.com/carrierwaveuploader/carrierwave/blob/v3.0.5/lib/carrierwave/orm/activerecord.rb
|
7
|
+
# to card events.
|
5
8
|
module CardMount
|
6
9
|
include CarrierWave::Mount
|
7
10
|
|
@@ -18,14 +21,12 @@ module CarrierWave
|
|
18
21
|
super
|
19
22
|
|
20
23
|
class_eval <<-RUBY, __FILE__, __LINE__ + 1
|
21
|
-
event :store_#{column}_event, :finalize,
|
22
|
-
on: :save, when: :store_#{column}_event? do
|
24
|
+
event :store_#{column}_event, :finalize, when: :store_#{column}_event? do
|
23
25
|
store_#{column}!
|
24
26
|
end
|
25
27
|
|
26
28
|
# remove files only if card has no history
|
27
|
-
event :remove_#{column}_event, :finalize,
|
28
|
-
on: :delete, when: proc { |c| !c.history? } do
|
29
|
+
event :remove_#{column}_event, :finalize, on: :delete, when: :no_history? do
|
29
30
|
remove_#{column}!
|
30
31
|
end
|
31
32
|
|
@@ -33,13 +34,13 @@ module CarrierWave
|
|
33
34
|
mark_remove_#{column}_false
|
34
35
|
end
|
35
36
|
|
36
|
-
event :
|
37
|
-
|
38
|
-
|
37
|
+
event :reset_previous_changes_for_#{column}_event, :finalize,
|
38
|
+
when: :no_history? do
|
39
|
+
reset_previous_changes_for_#{column}
|
39
40
|
end
|
40
41
|
|
41
|
-
event :remove_previously_stored_#{column}_event, :finalize,
|
42
|
-
|
42
|
+
event :remove_previously_stored_#{column}_event, :finalize, on: :update,
|
43
|
+
when: :no_history? do
|
43
44
|
remove_previously_stored_#{column}
|
44
45
|
end
|
45
46
|
|
@@ -61,13 +62,8 @@ module CarrierWave
|
|
61
62
|
"#{column}".to_sym
|
62
63
|
end
|
63
64
|
|
64
|
-
def read_uploader *args
|
65
|
-
|
66
|
-
end
|
67
|
-
|
68
|
-
def write_uploader *args
|
69
|
-
write_attribute *args
|
70
|
-
end
|
65
|
+
def read_uploader *args; read_attribute *args; end
|
66
|
+
def write_uploader *args; write_attribute *args; end
|
71
67
|
|
72
68
|
def #{column}=(new_file)
|
73
69
|
return if new_file.blank?
|
@@ -128,7 +124,20 @@ module CarrierWave
|
|
128
124
|
end
|
129
125
|
end
|
130
126
|
end
|
127
|
+
|
128
|
+
def reload(*)
|
129
|
+
@_mounters = nil
|
130
|
+
super
|
131
|
+
end
|
131
132
|
RUBY
|
132
133
|
end
|
133
134
|
end
|
135
|
+
|
136
|
+
# The temporary identifiers from Carrierwave's mounters kill CardMount;
|
137
|
+
# We don't seem to need them.
|
138
|
+
class Mounter
|
139
|
+
def write_temporary_identifier
|
140
|
+
# noop
|
141
|
+
end
|
142
|
+
end
|
134
143
|
end
|
@@ -175,6 +175,10 @@ module CarrierWave
|
|
175
175
|
end
|
176
176
|
end
|
177
177
|
|
178
|
+
def temporary_identifier
|
179
|
+
db_content
|
180
|
+
end
|
181
|
+
|
178
182
|
# @option opts [Symbol] :absolute - return absolute url
|
179
183
|
def url opts={}
|
180
184
|
if model.cloud?
|
@@ -234,13 +238,26 @@ module CarrierWave
|
|
234
238
|
class SanitizedFile
|
235
239
|
def content_type
|
236
240
|
# the original content_type method doesn't seem to be very reliable
|
237
|
-
# It uses
|
238
|
-
#
|
239
|
-
# use it as the third option)
|
241
|
+
# It uses declared_content_type - which sometimes returns "text/plain" for asset
|
242
|
+
# files for unknown reasons. (we switch the order and use it as the third option)
|
240
243
|
@content_type ||=
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
+
guessed_safe_content_type ||
|
245
|
+
identified_content_type ||
|
246
|
+
declared_content_type ||
|
247
|
+
Marcel::MimeType::BINARY
|
248
|
+
end
|
249
|
+
|
250
|
+
def guessed_safe_content_type
|
251
|
+
# overrides the default method which was returning "application/javascript" instead
|
252
|
+
# of "text/javascript" for our .js files.
|
253
|
+
return unless path
|
254
|
+
|
255
|
+
type = Marcel::Magic.by_path(original_filename).to_s
|
256
|
+
if type.start_with? "text/", "application/json'"
|
257
|
+
type
|
258
|
+
elsif type == "application/javascript"
|
259
|
+
"text/javascript"
|
260
|
+
end
|
244
261
|
end
|
245
262
|
end
|
246
263
|
|
@@ -254,6 +271,8 @@ module CarrierWave
|
|
254
271
|
# put version at the end of the filename
|
255
272
|
def full_filename for_file
|
256
273
|
name = super(for_file)
|
274
|
+
return unless name.present?
|
275
|
+
|
257
276
|
parts = name.split "."
|
258
277
|
basename = [parts.shift, version_name].compact.join("-")
|
259
278
|
"#{basename}.#{parts.join('.')}"
|
@@ -3,7 +3,7 @@ require "mini_magick"
|
|
3
3
|
module CarrierWave
|
4
4
|
# Adds image specific version handling to {FileCardUploader}.
|
5
5
|
# The ImageCardUploader creates five versions of different sizes when it
|
6
|
-
# uploads an
|
6
|
+
# uploads an image file:
|
7
7
|
# icon (16x16), small (75x75), medium (200X200), large (500x500) and
|
8
8
|
# the original size.
|
9
9
|
class ImageCardUploader < FileCardUploader
|
@@ -48,7 +48,7 @@ module CarrierWave
|
|
48
48
|
# add 'original' if no version is given
|
49
49
|
def full_filename for_file
|
50
50
|
name = super(for_file)
|
51
|
-
if version_name
|
51
|
+
if name.blank? || version_name
|
52
52
|
name
|
53
53
|
else
|
54
54
|
parts = name.split "."
|
@@ -29,13 +29,17 @@ def storage_type_error error_name
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def mod_from_content
|
32
|
-
if (m = content
|
32
|
+
if (m = mod_name_match content)
|
33
33
|
m[1] # current mod_file format
|
34
34
|
else
|
35
35
|
mod_from_deprecated_content
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
+
def mod_name_match cont
|
40
|
+
cont&.match %r{^:[^/]+/([^.]+)}
|
41
|
+
end
|
42
|
+
|
39
43
|
# place for files of mod file cards
|
40
44
|
def coded_dir new_mod=nil
|
41
45
|
dir = File.join mod_dir(new_mod), MOD_FILE_DIR, codename.to_s
|
data/set/type/file.rb
CHANGED
@@ -69,12 +69,24 @@ format :file do
|
|
69
69
|
args_for_send_file
|
70
70
|
end
|
71
71
|
|
72
|
+
private
|
73
|
+
|
72
74
|
def args_for_send_file
|
73
75
|
file = selected_version
|
74
76
|
[file.path, { type: file.content_type,
|
75
77
|
filename: "#{card.name.safe_key}#{file.extension}",
|
76
78
|
x_sendfile: true,
|
77
|
-
disposition:
|
79
|
+
disposition: disposition }]
|
80
|
+
end
|
81
|
+
|
82
|
+
def disposition
|
83
|
+
if params[:disposition]
|
84
|
+
params[:disposition]
|
85
|
+
elsif params[:format] == "file"
|
86
|
+
"attachment"
|
87
|
+
else
|
88
|
+
"inline"
|
89
|
+
end
|
78
90
|
end
|
79
91
|
|
80
92
|
def set_response_headers
|