Skip to content

Commit 69230f5

Browse files
fixing transparent contribution thumbnails
1 parent b098f25 commit 69230f5

File tree

1 file changed

+17
-55
lines changed

1 file changed

+17
-55
lines changed

server/services/contributions/contributions.hooks.js

Lines changed: 17 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,18 @@ const commentsSchema = {
6868
}
6969
};
7070

71+
const thumbs = {
72+
teaserImg: {
73+
cardS: '300x0/filters:background_color(fff)',
74+
cardM: '400x0/filters:background_color(fff)',
75+
cardL: '740x0/filters:background_color(fff)',
76+
placeholder: '100x0/filters:blur(30):background_color(fff)',
77+
zoom: '0x1024/filters:background_color(fff)',
78+
cover: '729x300/smart/filters:background_color(fff)',
79+
coverPlaceholder: '243x100/smart/filters:blur(30):background_color(fff)'
80+
}
81+
};
82+
7183
module.exports = {
7284
before: {
7385
all: [],
@@ -148,77 +160,27 @@ module.exports = {
148160
getAssociatedCanDos()
149161
),
150162
xss({ fields: ['content', 'contentExcerpt'] }),
151-
thumbnails({
152-
teaserImg: {
153-
cardS: '300x0',
154-
cardM: '400x0',
155-
cardL: '740x0',
156-
placeholder: '100x0/filters:blur(30)',
157-
zoom: '0x1024',
158-
cover: '729x300/smart',
159-
coverPlaceholder: '243x100/smart/filters:blur(30)'
160-
}
161-
})
163+
thumbnails(thumbs)
162164
],
163165
get: [
164166
getAssociatedCanDos(),
165167
xss({ fields: ['content', 'contentExcerpt'] }),
166-
thumbnails({
167-
teaserImg: {
168-
cardS: '300x0',
169-
cardM: '400x0',
170-
cardL: '740x0',
171-
zoom: '0x1024',
172-
cover: '800x300/smart',
173-
placeholder: '800x300/filters:blur(10)',
174-
coverPlaceholder: '243x100/smart/filters:blur(30)'
175-
}
176-
})
168+
thumbnails(thumbs)
177169
],
178170
create: [
179171
createMentionNotifications(),
180172
xss({ fields: ['content', 'contentExcerpt'] }),
181-
thumbnails({
182-
teaserImg: {
183-
cardS: '300x0',
184-
cardM: '400x0',
185-
cardL: '740x0',
186-
placeholder: '100x0/filters:blur(30)',
187-
zoom: '0x1024',
188-
cover: '729x300/smart',
189-
coverPlaceholder: '243x100/smart/filters:blur(30)'
190-
}
191-
})
173+
thumbnails(thumbs)
192174
],
193175
update: [
194176
createMentionNotifications(),
195177
xss({ fields: ['content', 'contentExcerpt'] }),
196-
thumbnails({
197-
teaserImg: {
198-
cardS: '300x0',
199-
cardM: '400x0',
200-
cardL: '740x0',
201-
placeholder: '100x0/filters:blur(30)',
202-
zoom: '0x1024',
203-
cover: '729x300/smart',
204-
coverPlaceholder: '243x100/smart/filters:blur(30)'
205-
}
206-
})
178+
thumbnails(thumbs)
207179
],
208180
patch: [
209181
createMentionNotifications(),
210182
xss({ fields: ['content', 'contentExcerpt'] }),
211-
thumbnails({
212-
teaserImg: {
213-
cardS: '300x0',
214-
cardM: '400x0',
215-
cardL: '740x0',
216-
placeholder: '100x0/filters:blur(30)',
217-
zoom: '0x1024',
218-
cover: '729x300/smart',
219-
coverPlaceholder: '243x100/smart/filters:blur(30)'
220-
}
221-
})
183+
thumbnails(thumbs)
222184
],
223185
remove: []
224186
},

0 commit comments

Comments
 (0)