intranet-pictures 1.0.3 → 1.0.4
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/lib/intranet/pictures/responder.rb +1 -1
- data/lib/intranet/pictures/version.rb +1 -1
- data/lib/intranet/resources/www/group_thumbnail.svg +9 -0
- data/lib/intranet/resources/www/style.css +2 -2
- data/spec/intranet/pictures/responder_spec.rb +2 -2
- metadata +3 -3
- data/lib/intranet/resources/www/group_thumbnail.jpg +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 564df3bd8811c29b26f35a7a9a883e5af23d4092e63d616240d76cd73c77c2bd
|
4
|
+
data.tar.gz: af344718de64f2952b30ed0249cf52bddfafc30eaf45498e02378bbcb1198623
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6a321298b67ea2822c0bc75b2bdaa5473b0cf38b9fc2dac6badb90f37f9dd1535425101f129b5f8d61c457d3611e28ee2d33e397ce792d8cf380be66c46d831d
|
7
|
+
data.tar.gz: '098fe4089fd07dd9843dc1ebd023c841be1668113c394cddc7dc0407457d1f19bcc4060342969facebeb9eea7c29c9abb484caf3d0720041971251f68bcbfe6f'
|
@@ -222,7 +222,7 @@ module Intranet
|
|
222
222
|
group_type = path.split('/')[2].to_s
|
223
223
|
pic = @provider.group_thumbnail(group_type, selector(query))
|
224
224
|
if pic.nil?
|
225
|
-
pic = ['image/
|
225
|
+
pic = ['image/svg+xml', File.read(File.join(resources_dir, 'www', 'group_thumbnail.svg'))]
|
226
226
|
end
|
227
227
|
pic
|
228
228
|
end
|
@@ -0,0 +1,9 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="860" height="380">
|
3
|
+
<rect width="860" height="380" style="fill:rgb(226,226,226)" />
|
4
|
+
<rect x="308" y="96" width="211" height="154" rx="2" ry="2" style="fill:rgb(226,226,226);stroke-width:13.5;stroke:rgb(245,245,245)" />
|
5
|
+
<rect x="323" y="111" width="211" height="154" style="fill:rgb(226,226,226)" />
|
6
|
+
<rect x="344" y="132" width="211" height="154" rx="2" ry="2" style="fill:rgb(226,226,226);stroke-width:13.5;stroke:rgb(245,245,245)" />
|
7
|
+
<circle cx="401" cy="185" r="18" fill="rgb(245,245,245)" />
|
8
|
+
<path d="M 368 257 Q 374 223 435 231 L 469 178 L 496 219 L 511 199 L 531 257 Z" fill="rgb(245,245,245)" />
|
9
|
+
</svg>
|
@@ -53,12 +53,12 @@ ul.groups li figure {
|
|
53
53
|
}
|
54
54
|
ul.groups li figure div {
|
55
55
|
height: 0px;
|
56
|
-
padding-bottom:
|
56
|
+
padding-bottom: 75%; /* 300:400 ratio */
|
57
57
|
background: no-repeat center;
|
58
58
|
background-size: cover;
|
59
59
|
}
|
60
60
|
ul.groups.wide li figure div {
|
61
|
-
padding-bottom:
|
61
|
+
padding-bottom: 44.186%; /* 380:860 ratio */
|
62
62
|
}
|
63
63
|
ul.groups li figcaption {
|
64
64
|
display: block;
|
@@ -404,9 +404,9 @@ RSpec.describe Intranet::Pictures::Responder do
|
|
404
404
|
query = { 'group2' => 'group2_title2' }
|
405
405
|
code, mime, content = @responder.generate_page('/api/group/group2', query)
|
406
406
|
expect(code).to eql(200)
|
407
|
-
expect(mime).to eql('image/
|
407
|
+
expect(mime).to eql('image/svg+xml')
|
408
408
|
expect(content).to eql(
|
409
|
-
File.read(File.join(__dir__, '../../../lib/intranet/resources/www/group_thumbnail.
|
409
|
+
File.read(File.join(__dir__, '../../../lib/intranet/resources/www/group_thumbnail.svg'))
|
410
410
|
)
|
411
411
|
|
412
412
|
# Existing group with non-existant thumbnail
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: intranet-pictures
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ebling Mis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: intranet-core
|
@@ -128,7 +128,7 @@ files:
|
|
128
128
|
- lib/intranet/resources/haml/pictures_photoswipe.haml
|
129
129
|
- lib/intranet/resources/locales/en.yml
|
130
130
|
- lib/intranet/resources/locales/fr.yml
|
131
|
-
- lib/intranet/resources/www/group_thumbnail.
|
131
|
+
- lib/intranet/resources/www/group_thumbnail.svg
|
132
132
|
- lib/intranet/resources/www/jpictures.js
|
133
133
|
- lib/intranet/resources/www/photoswipe/LICENSE
|
134
134
|
- lib/intranet/resources/www/photoswipe/default-skin/default-skin.css
|
Binary file
|