Update 3 files

- /html/journal.php
- /content/journal/0.md
- /config/global.ini
This commit is contained in:
Jan BELLON 2024-03-06 23:43:50 +00:00
parent a08a3c491a
commit f8be5807e9
3 changed files with 71 additions and 1 deletions

View File

@ -5,4 +5,4 @@ header-subtitle = "Club Réseaux"
copyright = "© 2024 - E59"
[nav]
Page1 = "/page1"
Journal = "journal.php"

1
content/journal/0.md Normal file
View File

@ -0,0 +1 @@
# Aucun article choisi

69
html/journal.php Normal file
View File

@ -0,0 +1,69 @@
<?php
require "../include/variables.php";
require "../include/functions.php";
if (isset($_GET['article']) == false || filter_var($_GET['article'], FILTER_VALIDATE_INT) == false) {
$article = "0";
} else {
$article = $_GET['article'];
}
?>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./src/css/style.css">
<link rel="icon" href="src/img/favicon.ico">
<title><?=$title?></title>
</head>
<body>
<header>
<div class="pancontent">
<div class="athena-container">
<a href="/">
<img src="./src/img/athena-mono.png" class="athena">
</a>
</div>
<div class="content">
<div>
<div class="main-title">
<div class="title"><?=$header_title?></div>
<div class="subtitle"><?=$header_subtitle?></div>
</div>
</div>
</div>
</div>
</header>
<nav>
<div class="pancontent">
<?php nav($nav);?>
</div>
</nav>
<main>
<div class="content">
<div>
<div>
<?php
if (file_exists('../content/journal/' . $article . '.md')) {
$markdownContent = file_get_contents('../content/journal/' . $article . '.md');
require_once '../include/parsedown.php';
$parsedown = new Parsedown();
echo $parsedown->text($markdownContent);
} else {
echo "<h1>L'article spécifié n'existe pas</h1>";
}
?>
</div>
</div>
</div>
</main>
<footer>
<div class="content">
<div>
<div><?=$copyright?></div>
</div>
</div>
</footer>
</body>
</html>