49 lines
1.8 KiB
PHP
49 lines
1.8 KiB
PHP
<?php ob_start(); ?>
|
|
|
|
<div class="d-flex align-items-center gap-3 mb-5">
|
|
<h1 class="h4 mb-0">Flux agrégés</h1>
|
|
</div>
|
|
|
|
<?php if (empty($fluxItems)): ?>
|
|
<p class="text-muted">Aucun article disponible pour l'instant.</p>
|
|
<?php else: ?>
|
|
<div class="flux-list">
|
|
<?php foreach ($fluxItems as $_item):
|
|
$_date = $_item['date'] > 0 ? date('d/m/Y', $_item['date']) : '';
|
|
$_authorName = $_item['author_name'] ?? '';
|
|
$_authorSlug = $_item['author_slug'] ?? '';
|
|
?>
|
|
<article class="flux-item">
|
|
<div class="flux-item-meta">
|
|
<?php if ($_authorSlug !== ''): ?>
|
|
<a href="/profil/<?= rawurlencode($_authorSlug) ?>" class="flux-author"><?= htmlspecialchars($_authorName) ?></a>
|
|
<?php elseif ($_authorName !== ''): ?>
|
|
<span class="flux-author"><?= htmlspecialchars($_authorName) ?></span>
|
|
<?php endif; ?>
|
|
<?php if ($_item['feed_title'] !== ''): ?>
|
|
<span class="flux-feed-name"><?= htmlspecialchars($_item['feed_title']) ?></span>
|
|
<?php endif; ?>
|
|
<?php if ($_date !== ''): ?>
|
|
<span class="flux-date"><?= $_date ?></span>
|
|
<?php endif; ?>
|
|
</div>
|
|
<h2 class="flux-item-title">
|
|
<a href="<?= htmlspecialchars($_item['url']) ?>" target="_blank" rel="noopener">
|
|
<?= htmlspecialchars($_item['title']) ?> ↗
|
|
</a>
|
|
</h2>
|
|
<?php if ($_item['summary'] !== ''): ?>
|
|
<p class="flux-item-summary"><?= htmlspecialchars($_item['summary']) ?></p>
|
|
<?php endif; ?>
|
|
</article>
|
|
<?php endforeach; ?>
|
|
</div>
|
|
<?php endif; ?>
|
|
|
|
<?php
|
|
$content = ob_get_clean();
|
|
$title = 'Flux — ' . siteTitle();
|
|
$canonical = rtrim(APP_URL, '/') . '/flux';
|
|
$mainClass = 'container-fluid';
|
|
include __DIR__ . '/layout.php';
|