-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
page.php
58 lines (58 loc) · 1.95 KB
/
page.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
52
53
54
55
56
57
58
<?= self::enter(); ?>
<div class="<?= $site->is('home') ? 'bg-body-tertiary ' : ""; ?>py-5">
<div class="container">
<?php if ($page->exist): ?>
<div class="g-5 row">
<div class="col-lg-6">
<?php if ($image = $page->image): ?>
<div class="row">
<div class="col-12">
<img alt="" class="img-fluid w-100 rounded" src="<?= eat($image); ?>">
</div>
</div>
<?php endif; ?>
<?php if ($images = $page->images): ?>
<div class="g-4 mt-0 row">
<?php foreach ((array) $images as $image): ?>
<div class="col-4">
<img alt="" class="img-fluid w-100 rounded" src="<?= eat($image); ?>">
</div>
<?php endforeach; ?>
</div>
<?php endif; ?>
<?php if (!$image && !$images): ?>
<div class="align-items-center bg-body-secondary d-flex h-100 justify-content-center p-4 rounded text-body-tertiary">
<svg aria-hidden="true" class="bi bi-camera" height="160" width="160">
<use href="#bi-camera"></use>
</svg>
</div>
<?php endif; ?>
</div>
<div class="col-lg-6">
<?php if ($title = $page->title): ?>
<h1 class="display-1 mb-4">
<?= $title; ?>
</h1>
<?php endif; ?>
<?php if ($description = $page->description): ?>
<p class="lead mb-4">
<?= $description; ?>
</p>
<?php endif; ?>
<?php if ($content = $page->content): ?>
<div>
<?= $content; ?>
</div>
<?php endif; ?>
</div>
</div>
<?php else: ?>
<div class="alert alert-danger" role="alert">
<p class="mb-0">
<?= i('%s does not exist.', 'Page'); ?>
</p>
</div>
<?php endif; ?>
</div>
</div>
<?= self::exit(); ?>