0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-01-20 22:42:53 -05:00

Added avatar saturation parameter to comments helper

refs https://github.com/TryGhost/Team/issues/1664
This commit is contained in:
Peter Zimon 2022-07-07 12:38:55 +02:00 committed by Simon Backx
parent 379771ccc7
commit 41a8134c40

View file

@ -15,6 +15,11 @@ async function comments(options) {
colorScheme = options.hash.color_scheme;
}
let avatarSaturation = parseInt(options.hash.avatar_saturation);
if (isNaN(avatarSaturation)) {
avatarSaturation = 50;
}
const frontendKey = await getFrontendKey();
const data = {
@ -24,7 +29,8 @@ async function comments(options) {
key: frontendKey,
'post-id': this.id,
'sentry-dsn': '', /* todo: insert sentry dsn key here */
'color-scheme': colorScheme
'color-scheme': colorScheme,
'avatar-saturation': avatarSaturation
};
let dataAttributes = '';