Replace random HSL gradients in homepage cards with header gradient

This commit is contained in:
Pontoporeia
2026-04-09 14:29:17 +02:00
parent 07f0afde25
commit a13e73aed3
3 changed files with 11 additions and 12 deletions

View File

@@ -48,12 +48,7 @@ extract($vars);
loading="lazy">
</figure>
<?php else: ?>
<?php
$hue = ($item['id'] * 47 + 160) % 360;
$hue2 = ($hue + 40) % 360;
?>
<div class="card__media--gradient"
style="background:linear-gradient(135deg,hsl(<?= $hue ?>,55%,40%),hsl(<?= $hue2 ?>,50%,28%));"
aria-hidden="true">
<span class="card__gradient-author"><?= htmlspecialchars($item['authors'] ?? '') ?></span>
<span class="card__gradient-title"><?= htmlspecialchars($item['title']) ?></span>