fix single color

This commit is contained in:
j 2025-02-20 10:17:10 -05:00
commit 4cc3bd0835

View file

@ -327,5 +327,7 @@ class Week(models.Model):
colors.append(f'hsl({color}, 80%, 15%, 0.8)')
else:
colors.append(f'hsl({color}, 50%, 15%, 0.8)')
if len(colors) == 1:
colors.append(colors[0].replace('80%', '50%'))
return 'linear-gradient(to bottom, %s)' % ', '.join(colors)
return ''