aboutsummaryrefslogtreecommitdiff
path: root/includes/core
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-04-14 16:05:48 +0200
committerMinteck <contact@minteck.org>2022-04-14 16:05:48 +0200
commit30f3e751c58578443604713670a90f6a30d2340f (patch)
tree6902077cee1be881157b5827f19c6b2ad6e36efd /includes/core
downloadember-30f3e751c58578443604713670a90f6a30d2340f.tar.gz
ember-30f3e751c58578443604713670a90f6a30d2340f.tar.bz2
ember-30f3e751c58578443604713670a90f6a30d2340f.zip
Initial commit
Diffstat (limited to 'includes/core')
-rw-r--r--includes/core/Main.php16
-rw-r--r--includes/core/Metadata.php13
2 files changed, 29 insertions, 0 deletions
diff --git a/includes/core/Main.php b/includes/core/Main.php
new file mode 100644
index 0000000..1bf1062
--- /dev/null
+++ b/includes/core/Main.php
@@ -0,0 +1,16 @@
+<?php
+
+namespace WebCore;
+
+include "Metadata.php";
+
+class Main {
+ public static function version(): string {
+ if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/.git/refs/heads/trunk")) {
+ return substr(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.git/refs/heads/trunk"), 0, 8);
+ } else if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/.version")) {
+ return substr(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.version"), 0, 8);
+ }
+ return "live";
+ }
+} \ No newline at end of file
diff --git a/includes/core/Metadata.php b/includes/core/Metadata.php
new file mode 100644
index 0000000..ce2dc2d
--- /dev/null
+++ b/includes/core/Metadata.php
@@ -0,0 +1,13 @@
+<?php
+
+namespace WebCore\GUI;
+
+class Metadata {
+ public static function title($title = null): string {
+ if (isset($title)) {
+ return "$title | Minteck's Website";
+ } else {
+ return "Minteck's Website";
+ }
+ }
+} \ No newline at end of file