$post): ?>
text($post['content']);
$preview = mb_strimwidth(strip_tags($html), 0, 120, '…');
$category = trim((string)($post['category'] ?? ''));
$gradient = coverGradient($category !== '' ? $category : $post['uuid'], $allCats ?? []);
$postUrl = '/post/' . rawurlencode($post['slug']);
$isDraft = !$post['published'];
$isAvantPremiere = $post['published'] && strtotime((string)($post['published_at'] ?? '')) > time();
$postCat = trim($post['category'] ?? '');
$isPrivate = $postCat !== '' && in_array($postCat, $privateCats ?? [], true);
$isLocked = $isAvantPremiere;
?>
Brouillon
Avant-première
Privé
= htmlspecialchars($category) ?>
= htmlspecialchars($preview) ?>
Disponible le = htmlspecialchars(date('d/m/Y \à H\hi', strtotime((string)($post['published_at'] ?? '')))) ?>
= htmlspecialchars(date('d/m/Y', strtotime((string)($post['published_at'] ?? $post['created_at'] ?? '')))) ?>
modifier
→ lire
'https://schema.org',
'@type' => 'WebSite',
'name' => 'varlog',
'url' => rtrim(APP_URL, '/') . '/',
'description' => 'Journal personnel de Cédrix. Informatique, hack et loisirs techniques.',
'inLanguage' => 'fr-FR',
'author' => ['@type' => 'Person', 'name' => 'Cédrix'],
], JSON_UNESCAPED_SLASHES | JSON_UNESCAPED_UNICODE);
}
$mainClass = 'container-fluid';
include __DIR__ . '/layout.php';