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

@@ -1,9 +1,4 @@
# TODO
## Fixes
- [x] Typography: switch `--font-display` / title font from Combined to Ductus (`DuctusRegular.otf`)
- [x] Replace `mb_strlen`/`mb_substr` with `strlen`/`substr` in TfeController, SearchController, Parsedown — mbstring extension not available on production server
- [x] system.css: retheme to site light palette — remove all `--sys-bg/border/text` dark tokens from variables.css; replace with standard `--bg-*`, `--border-*`, `--text-*` tokens; remap `--sys-syntax-*` to light-appropriate colours; remove dark terminal aesthetic
- [x] SystemController: PHP-FPM status check — dynamically probe `phpX.Y-fpm` unit derived from running PHP version before static fallback list; add `php8.4-fpm` to cover current production PHP 8.4
- [x] Favicon: replace SVG placeholder with full PNG/ICO favicon set from `public/assets/favicon/` in `templates/head.php`
- [x] Rebrand: replace "PostErg" with "XAMXAM" in admin header link, default `<title>`, and OG site_name fallback
- [x] Remove random HSL gradients from homepage cards and use header's background gradient
- [ ] Review other gradient usages (check if any leftover random hue generation anywhere)

View File

@@ -114,6 +114,15 @@
text-align: center;
box-sizing: border-box;
border-radius: 7px 7px 0 0;
background: linear-gradient(
180deg,
var(--gradient-start) 0%,
var(--gradient-2) 20%,
var(--gradient-3) 40%,
var(--gradient-4) 60%,
var(--gradient-4) 88%,
var(--header-gradient-fade) 96%
);
}
.card__gradient-author {

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>