diff options
Diffstat (limited to 'includes')
-rw-r--r-- | includes/core/Main.php | 16 | ||||
-rw-r--r-- | includes/core/Metadata.php | 13 | ||||
-rw-r--r-- | includes/footer.php | 2 | ||||
-rw-r--r-- | includes/functions.php | 11 | ||||
-rw-r--r-- | includes/gui/header.php | 15 | ||||
-rw-r--r-- | includes/header.php | 10 |
6 files changed, 23 insertions, 44 deletions
diff --git a/includes/core/Main.php b/includes/core/Main.php deleted file mode 100644 index 1bf1062..0000000 --- a/includes/core/Main.php +++ /dev/null @@ -1,16 +0,0 @@ -<?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 deleted file mode 100644 index ce2dc2d..0000000 --- a/includes/core/Metadata.php +++ /dev/null @@ -1,13 +0,0 @@ -<?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 diff --git a/includes/footer.php b/includes/footer.php new file mode 100644 index 0000000..691287b --- /dev/null +++ b/includes/footer.php @@ -0,0 +1,2 @@ +</body> +</html>
\ No newline at end of file diff --git a/includes/functions.php b/includes/functions.php new file mode 100644 index 0000000..470a740 --- /dev/null +++ b/includes/functions.php @@ -0,0 +1,11 @@ +<?php + +function version() { + if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/.version")) { + return substr(trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.version")), 0, 8); + } else if (file_exists($_SERVER['DOCUMENT_ROOT'] . "/.git/refs/heads/trunk")) { + return substr(trim(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/.git/refs/heads/trunk")), 0, 8); + } else { + return "trunk"; + } +}
\ No newline at end of file diff --git a/includes/gui/header.php b/includes/gui/header.php deleted file mode 100644 index 8814b5b..0000000 --- a/includes/gui/header.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php - -require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/core/Main.php"; -global $title; - -?> -<!DOCTYPE html> -<html lang="en"> -<head> - <meta charset="UTF-8"> - <meta name="viewport" content="width=device-width, initial-scale=1"> - <link rel="stylesheet" href="/assets/bootstrap.min.css"> - <title><?= WebCore\GUI\Metadata::title($title) ?></title> -</head> -<body>
\ No newline at end of file diff --git a/includes/header.php b/includes/header.php new file mode 100644 index 0000000..90c5c2b --- /dev/null +++ b/includes/header.php @@ -0,0 +1,10 @@ +<?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.php"; ?> +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="UTF-8"> + <title>Minteck</title> + <link rel="stylesheet" href="/assets/css/bootstrap.min.css"> + <script src="/assets/js/bootstrap.bundle.min.js"></script> +</head> +<body>
\ No newline at end of file |