-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathview.php
executable file
·51 lines (49 loc) · 1.72 KB
/
view.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<!doctype html>
<html>
<head>
<meta charset="utf-8" />
<title><?php echo $name ; ?> — Calendrier républicain</title>
<!--<link rel="stylesheet" href="<?php echo ASSETS_URL; ?>/normalize.css" />-->
<link rel="stylesheet" href="<?php echo ASSETS_URL; ?>/style.css" />
</head>
<body class="<?php echo $view->body_css() ; ?>">
<div class="global">
<header>
<div>Calendrier républicain</div>
<?php if(empty($error) || !$error->is_critical) : ?>
<p>
<?php echo $formatter->format($date) ;?>
—
<?php
// Syntaxe format alterbnatif : 'format des dates normales|format des sans culottides'
echo $republicanCalendar->format($date, 'l jS F Y|F, X, Y');
?>
</p>
<h1><?php echo $name ; ?></h1>
<?php else : ?>
<p class="h1-like">Erreur critique</p>
<?php endif ;?>
</header>
<main class="site-main">
<?php if(!empty($error)) : ?>
<div class="error error--<?php echo strtolower($error->error_code) ; ?>">
<p><?php echo $error->display_errors(); ?></p>
</div>
<?php else : ?>
<div class="image">
<img class="main-image" src="<?php echo $image_href ; ?>" alt="<?php echo $name ; ?>" />
</div>
<?php endif ;?>
</main>
<?php if(empty($error) || !empty($name)) : ?>
<aside>
Page Wikipédia : <a href="http://fr.wikipedia.org/wiki/<?php echo $name ; ?>"><?php echo $name ; ?></a>
</aside>
<?php endif ;?>
<footer class="main-footer">
<p>Créé par <a href="http://lamecarlate.net">Chaopale Lamecarlate</a></p>
<p><a href="https://github.com/Lamecarlate/republican-calendar">Forkez-moi sur Github</a>
</footer>
</div>
</body>
</html>