diff --git a/index.php b/index.php index 257655f..1090e38 100644 --- a/index.php +++ b/index.php @@ -1,6 +1,21 @@ render('index.twig', [ - 'user' => null - ]); \ No newline at end of file + + switch ($_SERVER['REQUEST_URI']) { + case "/": + echo $twig->render('index.twig', [ + 'user' => null + ]); + break; + case "/nations": + echo $twig->render('nations.twig', [ + 'user' => null + ]); + break; + default: + http_response_code(404); + echo $twig->render('404.twig', [ + 'user' => null + ]); + break; + } \ No newline at end of file diff --git a/template/404.twig b/template/404.twig new file mode 100644 index 0000000..2b1853b --- /dev/null +++ b/template/404.twig @@ -0,0 +1,24 @@ +{% include 'includes/head.twig' with {'pageTitle': '404'} %} + +
+
+
+

Clyde's Real Survival SMP

+ +
+ Online: / +
+
+
+
+ +{% include 'includes/nav.twig' with {'page': '404',} %} + +
+
+

This page is non-existent!

+
+
+ +{% include 'includes/footer.twig' %} +{% include 'includes/foot.twig' %} \ No newline at end of file diff --git a/template/nations.twig b/template/nations.twig new file mode 100644 index 0000000..21255d1 --- /dev/null +++ b/template/nations.twig @@ -0,0 +1,24 @@ +{% include 'includes/head.twig' with {'pageTitle': 'Nations'} %} + +
+
+
+

Clyde's Real Survival SMP

+ +
+ Online: / +
+
+
+
+ +{% include 'includes/nav.twig' with {'page': 'nations',} %} + +
+
+ this is the home page +
+
+ +{% include 'includes/footer.twig' %} +{% include 'includes/foot.twig' %} \ No newline at end of file