Browse code

Initial commit

Benjamin Roth authored on16/03/2023 20:22:35
Showing1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,76 @@
1
+<div class="event layout_teaser<?= $this->classList ?>">
2
+
3
+    <?php if ($this->hasDetails): ?>
4
+        <h3 title="<?= $this->title ?> (<?php if ($this->day): ?><?= $this->day ?>, <?php endif; ?><?= $this->date ?><?php if ($this->time): ?> <?= $this->time ?><?php endif; ?>)"
5
+            data-bs-toggle="modal" data-bs-target="#eventModal_<?= $this->id; ?>">
6
+            <?= $this->title ?>
7
+        </h3>
8
+    <?php else: ?>
9
+        <h3><?= $this->title ?></h3>
10
+    <?php endif; ?>
11
+
12
+    <span class="time">
13
+        <time datetime="<?= $this->datetime ?>"><?= $this->date ?><?php if ($this->time): ?> <?= $this->time ?><?php endif; ?></time>
14
+    </span>
15
+
16
+    <?php if ($this->location): ?>
17
+        |
18
+        <span class="location"><?= $this->location ?><?php if ($this->address): ?> (<?= $this->address ?>)<?php endif; ?></span>
19
+    <?php endif; ?>
20
+
21
+</div>
22
+
23
+<?php if ($this->details): ?>
24
+    <!-- Modal -->
25
+    <div style="display: none;" class="modal fade details-modal modal-dialog-centered modal-xl"
26
+         id="eventModal_<?= $this->id; ?>" tabindex="-1"
27
+         aria-hidden="true">
28
+        <div class="modal-dialog">
29
+
30
+            <div class="modal-content">
31
+
32
+                <div class="modal-body">
33
+                    <div class="container container">
34
+                        <button type="button" class="btn--close" data-bs-dismiss="modal" aria-label="Schließen">
35
+                            <i class="fal fa-times"></i>
36
+                        </button>
37
+
38
+                        <div class="row gx-3">
39
+
40
+                            <?php if ($this->addImage): ?>
41
+                                <div class="col-md-6">
42
+                                    <div class="event--modal-image-wrapper lazy" data-bg="<?= $this->singleSRC; ?>"
43
+                                         style="background: url() center center no-repeat; background-size: cover;">
44
+
45
+                                    </div>
46
+                                </div>
47
+                            <?php endif; ?>
48
+                            <div class="col-12 <?php if ($this->addImage): ?>col-md-6<?php endif; ?>">
49
+                                <span class="h2"><?= $this->title ?></span>
50
+
51
+                                <?php if ($this->time): ?>
52
+                                    <strong class="time">
53
+                                        <time datetime="<?= $this->datetime ?>"><?= $this->time ?></time>
54
+                                        | </strong>
55
+                                <?php endif; ?>
56
+                                <?php if ($this->location): ?>
57
+                                    <strong class="location"> <?= $this->location ?><?php if ($this->address): ?> (<?= $this->address ?>)<?php endif; ?></strong>
58
+                                <?php endif; ?>
59
+
60
+                                <?= $this->details; ?>
61
+                            </div>
62
+                        </div>
63
+                    </div>
64
+
65
+                </div>
66
+            </div>
67
+        </div>
68
+    </div>
69
+<?php endif; ?>
70
+<?php
71
+
72
+// This template is used as an event list template by default, so we only add
73
+// JSON-LD data in case this is an event without a reader
74
+if (!$this->hasReader) {
75
+    $this->addSchemaOrg($this->getSchemaOrgData());
76
+}