-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
hero.php
31 lines (31 loc) · 1.18 KB
/
hero.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
<section class="container py-5 text-center">
<div class="py-lg-5 row">
<div class="col-lg-6 col-md-8 mx-auto">
<?php if ($title = $site->y->{'bootstrap.album'}->hero->title ?? ""): ?>
<h1 class="fw-light">
<?= $title; ?>
</h1>
<?php endif; ?>
<?php if ($description = $site->y->{'bootstrap.album'}->hero->description ?? ""): ?>
<p class="lead text-body-secondary">
<?= $description; ?>
</p>
<?php endif; ?>
<?php if ($tasks = (array) ($site->y->{'bootstrap.album'}->hero->tasks ?? [])): ?>
<p class="d-flex gap-2 justify-content-center">
<?php foreach ($tasks as $task): ?>
<?php if (empty($task->link)): ?>
<a aria-disabled="true" class="btn btn-<?= $task->type ?? 'secondary'; ?> disabled my-2">
<?= i($task->title); ?>
</a>
<?php else: ?>
<a href="<?= eat($task->link); ?>" class="btn btn-<?= $task->type ?? 'secondary'; ?> my-2">
<?= i($task->title); ?>
</a>
<?php endif; ?>
<?php endforeach; ?>
</p>
<?php endif; ?>
</div>
</div>
</section>