' . e($message) . '
';
}
function fws_packages_changelog(array $pkg): string
{
$html = 'Historique
';
if (empty($pkg['changelog'])) {
$html .= fws_packages_empty('Historique en cours de rédaction.') . '';
return $html;
}
$html .= '';
foreach ($pkg['changelog'] as $entry) {
$html .= '- '
. '' . e((string) ($entry['version'] ?? '—')) . ''
. ''
. (!empty($entry['notes']) ? '' . e((string) $entry['notes']) . '' : '')
. '
';
}
$html .= '
';
return $html;
}
function fws_packages_screens(array $pkg): string
{
$html = 'Captures d\'écran
';
if (empty($pkg['screens'])) {
$html .= fws_packages_empty("Captures d'écran à venir.") . '';
return $html;
}
$html .= '';
foreach ($pkg['screens'] as $screen) {
$html .= '
';
if (!empty($screen['caption'])) {
$html .= '' . e((string) $screen['caption']) . '';
}
$html .= '';
}
$html .= '
';
return $html;
}
function fws_packages_links(array $pkg): string
{
$html = 'Liens utiles
';
if (empty($pkg['links'])) {
$html .= fws_packages_empty('Aucun lien pour le moment.') . '';
return $html;
}
foreach ($pkg['links'] as $link) {
$url = (string) ($link['url'] ?? '');
$external = (bool) preg_match('/^https?:\/\//i', $url);
$html .= ''
. e((string) ($link['label'] ?? '') !== '' ? (string) $link['label'] : $url) . '';
}
$html .= '';
return $html;
}
function fws_packages_card(array $pkg, int $position): string
{
$latest = $pkg['latest'] ?? null;
$latestText = ($latest !== null && ($latest['name'] ?? '') !== '')
? 'Dernière release : ' . $latest['name'] . (!empty($latest['date']) ? ' — ' . fws_format_date((string) $latest['date']) : '')
: 'Aucune release publiée pour le moment.';
$html = ''
. ''
. '' . fws_packages_changelog($pkg) . fws_packages_screens($pkg) . fws_packages_links($pkg) . '
'
. '';
return $html;
}
?>
Paquets
Tous les outils développés pour FWS Linux, leur historique, leurs captures d'écran et les liens utiles.
= fws_packages_empty('Aucun paquet pour le moment. Revenez bientôt !') ?>
$pkg): ?>
= fws_packages_card($pkg, max($i + 1, (int) ($pkg['dbId'] ?? 0))) . "\n" ?>