summaryrefslogtreecommitdiff
path: root/includes/mobile/components
diff options
context:
space:
mode:
authorJonas Kohl <git@jonaskohl.de>2024-09-06 17:01:01 +0200
committerJonas Kohl <git@jonaskohl.de>2024-09-06 17:01:01 +0200
commit3d22cc3333e1265a222425a4ede9c464234e3632 (patch)
tree7acd1379c752913f12168cc75583e68b14278288 /includes/mobile/components
parent0540e04c77864186ce48193456634b897a11f5aa (diff)
Small fixes; Add component system
Diffstat (limited to 'includes/mobile/components')
-rw-r--r--includes/mobile/components/alert.php8
1 files changed, 8 insertions, 0 deletions
diff --git a/includes/mobile/components/alert.php b/includes/mobile/components/alert.php
new file mode 100644
index 0000000..fbc3482
--- /dev/null
+++ b/includes/mobile/components/alert.php
@@ -0,0 +1,8 @@
+<?php function c_alert(string $html_message, string $type, ?string $icon = null): void { ?>
+<div class="alert alert-<?= htmlentities($type) ?>">
+<?php if ($icon !== null): ?>
+<i class="glyphicon glyphicon-<?= htmlentities($icon) ?>"></i>
+<?php endif; ?>
+<?= $html_message ?>
+</div>
+<?php }