summaryrefslogtreecommitdiff
path: root/includes/template_head_start.php
diff options
context:
space:
mode:
authorJonas Kohl2024-09-06 17:01:01 +0200
committerJonas Kohl2024-09-06 17:01:01 +0200
commit3d22cc3333e1265a222425a4ede9c464234e3632 (patch)
tree7acd1379c752913f12168cc75583e68b14278288 /includes/template_head_start.php
parent0540e04c77864186ce48193456634b897a11f5aa (diff)
Small fixes; Add component system
Diffstat (limited to 'includes/template_head_start.php')
-rw-r--r--includes/template_head_start.php11
1 files changed, 10 insertions, 1 deletions
diff --git a/includes/template_head_start.php b/includes/template_head_start.php
index 31a5fb4..271cb60 100644
--- a/includes/template_head_start.php
+++ b/includes/template_head_start.php
@@ -1,5 +1,14 @@
<?php
$__mobile = include __DIR__ . "/mobile-detect.php";
+$__inc_dir = __DIR__ . "/" . ($__mobile ? "mobile" : "desktop");
-include __DIR__ . "/" . ($__mobile ? "mobile" : "desktop") . "/template_head_start.php";
+foreach (scandir($__inc_dir . "/components") as $ent) {
+ if ($ent[0] === "." || !is_file($__inc_dir . "/components/" . $ent) || strcasecmp(pathinfo($ent, PATHINFO_EXTENSION), "php") !== 0)
+ continue;
+ include $__inc_dir . "/components/" . $ent;
+}
+
+include $__inc_dir . "/template_head_start.php";
+
+unset($__inc_dir);