mirror of
https://codeberg.org/PostERG/xamxam.git
synced 2026-05-07 03:29:19 +02:00
52 lines
1.6 KiB
PHP
52 lines
1.6 KiB
PHP
<?php
|
||
require_once __DIR__ . '/../config/bootstrap.php';
|
||
require_once APP_ROOT . '/src/Database.php';
|
||
require_once APP_ROOT . '/src/Parsedown.php';
|
||
|
||
$currentNav = 'licence';
|
||
|
||
try {
|
||
$db = Database::getInstance();
|
||
$dbPage = $db->getPage('licenses');
|
||
$content = $dbPage ? $dbPage['content'] : '';
|
||
$licencePageTitle = $dbPage ? $dbPage['title'] : 'Licences';
|
||
} catch (Exception $e) {
|
||
error_log("Error loading licence page: " . $e->getMessage());
|
||
$content = '';
|
||
$licencePageTitle = 'Licences';
|
||
}
|
||
|
||
$pd = new Parsedown();
|
||
$pd->setSafeMode(true);
|
||
$html = $pd->text($content);
|
||
|
||
$pageTitle = $licencePageTitle . ' – Posterg';
|
||
$metaDescription = 'Informations sur les licences d\'utilisation des mémoires publiés sur Posterg, le répertoire des TFE de l\'erg.';
|
||
$ogTags = [
|
||
'type' => 'website',
|
||
'title' => $pageTitle,
|
||
'description' => $metaDescription,
|
||
'url' => 'https://posterg.erg.be/licence.php',
|
||
'site_name' => 'Posterg – ERG',
|
||
];
|
||
$extraCss = ['/assets/css/apropos.css'];
|
||
?>
|
||
<?php include APP_ROOT . '/templates/public/head.php'; ?>
|
||
<body class="apropos-body">
|
||
<a href="#main-content" class="skip-link">Aller au contenu principal</a>
|
||
|
||
<?php include APP_ROOT . '/templates/nav.php'; ?>
|
||
<?php include APP_ROOT . '/templates/search-bar.php'; ?>
|
||
|
||
<main class="apropos-main" id="main-content">
|
||
<div class="prose apropos-single">
|
||
<?php if (!empty(trim($content))): ?>
|
||
<?= $html ?>
|
||
<?php else: ?>
|
||
<p>Contenu à venir.</p>
|
||
<?php endif; ?>
|
||
</div>
|
||
</main>
|
||
|
||
<?php include APP_ROOT . '/templates/footer.php'; ?>
|