feat(planner): use cuisine gradient as fallback when no protein tag
Fallback chain: heroImageUrl → protein gradient → cuisine gradient → surface. Also rename --gradient-cuisine-italienisch → --gradient-cuisine-deutsch (actual seed tag) with an earthy warm-grey colour. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -64,7 +64,7 @@ const requiredTokens = [
|
||||
'--gradient-protein-kaese',
|
||||
'--gradient-protein-huelsenfruechte',
|
||||
// Cuisine gradient tokens
|
||||
'--gradient-cuisine-italienisch',
|
||||
'--gradient-cuisine-deutsch',
|
||||
'--gradient-cuisine-asiatisch',
|
||||
'--gradient-cuisine-indisch',
|
||||
'--gradient-cuisine-mexikanisch',
|
||||
|
||||
@@ -84,6 +84,10 @@
|
||||
if (proteinTag?.name) {
|
||||
return `var(--gradient-protein-${toCssKey(proteinTag.name)})`;
|
||||
}
|
||||
const cuisineTag = slot.recipe.tags?.find((t) => t.tagType === 'cuisine');
|
||||
if (cuisineTag?.name) {
|
||||
return `var(--gradient-cuisine-${toCssKey(cuisineTag.name)})`;
|
||||
}
|
||||
return 'var(--color-surface)';
|
||||
})());
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user