|
@@ -1,6 +1,5 @@
|
|
|
<?php include ("header.php"); ?>
|
|
<?php include ("header.php"); ?>
|
|
|
<title>Bonjour Flammenkuchen !</title></head><body>
|
|
<title>Bonjour Flammenkuchen !</title></head><body>
|
|
|
-<?php var_dump($data); ?>
|
|
|
|
|
<?php
|
|
<?php
|
|
|
$yymmddays = CacheController::getCacheIndex()->getData();
|
|
$yymmddays = CacheController::getCacheIndex()->getData();
|
|
|
$currentYymmdd = $router->getRequestYymmdd();
|
|
$currentYymmdd = $router->getRequestYymmdd();
|
|
@@ -9,9 +8,37 @@ $prevYymmdd = $currentYymmddIndex == 0 ? null : $yymmddays[$currentYymmddIndex -
|
|
|
$nextYymmdd = $currentYymmddIndex == count($yymmddays) -1 ? null : $yymmddays[$currentYymmddIndex +1];
|
|
$nextYymmdd = $currentYymmddIndex == count($yymmddays) -1 ? null : $yymmddays[$currentYymmddIndex +1];
|
|
|
if ($nextYymmdd > (int) ((new DateTime())->format("ymd")))
|
|
if ($nextYymmdd > (int) ((new DateTime())->format("ymd")))
|
|
|
$nextYymmdd = null;
|
|
$nextYymmdd = null;
|
|
|
-
|
|
|
|
|
-var_dump(array($prevYymmdd, $currentYymmdd, $nextYymmdd));
|
|
|
|
|
|
|
+$yymmddDT = DateTime::createFromFormat("ymd", $currentYymmdd);
|
|
|
|
|
+$months = array("janvier", "fevrier", "mars", "avril", "mai", "juin", "juillet", "aout", "septembre", "octobre", "novembre", "decembre");
|
|
|
|
|
+$yymmddStr = $yymmddDT->format("d ")
|
|
|
|
|
+ . $months[$yymmddDT->format('m') -1] .' '
|
|
|
|
|
+ . $yymmddDT->format('Y');
|
|
|
?>
|
|
?>
|
|
|
-
|
|
|
|
|
-<img src="<?php echo $router->getImageForRequest(); ?>" alt="<?php echo $data->getTitle(); ?>" />
|
|
|
|
|
|
|
+<header>
|
|
|
|
|
+ <h1>Bonjour Flammenkuchen !</h1>
|
|
|
|
|
+ <p>Tous les jours, un peu plus de lardons !!</p>
|
|
|
|
|
+</header>
|
|
|
|
|
+<div class="section left"><div class="section-content">
|
|
|
|
|
+ <img src="<?php echo $router->getImageForRequest(); ?>" alt="<?php echo $data->getTitle(); ?>" class="img-content" />
|
|
|
|
|
+</div></div>
|
|
|
|
|
+<div class="section right"><div class="section-content">
|
|
|
|
|
+ <header>
|
|
|
|
|
+ <h2><?php echo $data->getTitle();?>
|
|
|
|
|
+ <h3>La flammenkuchen du <?php echo $yymmddStr; ?></h3>
|
|
|
|
|
+ </header>
|
|
|
|
|
+ <p><?php echo $data->getDescription(); ?></p>
|
|
|
|
|
+ <footer class="article-footer">
|
|
|
|
|
+ <div class="button-container">
|
|
|
|
|
+<?php if ($prevYymmdd === null) { ?>
|
|
|
|
|
+ <a class="dailyBt bt-prev disabled" href="#">Lardon précédent</a>
|
|
|
|
|
+<?php } else { ?>
|
|
|
|
|
+ <a class="dailyBt bt-prev" href="<?php echo $prevYymmdd; ?>">Lardon précédent</a>
|
|
|
|
|
+<?php } if ($nextYymmdd === null) { ?>
|
|
|
|
|
+ <a class="dailyBt bt-next disabled" href="#">Lardon suivant</a>
|
|
|
|
|
+<?php } else { ?>
|
|
|
|
|
+ <a class="dailyBt bt-next" href="<?php echo $nextYymmdd; ?>">Lardon suivant</a>
|
|
|
|
|
+<?php } ?>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </footer>
|
|
|
|
|
+</div></div>
|
|
|
</body></html>
|
|
</body></html>
|