diff --git a/img/social_image.png b/img/social_image.png new file mode 100644 index 0000000..b23400e Binary files /dev/null and b/img/social_image.png differ diff --git a/index.php b/index.php index 3d439d5..d027640 100644 --- a/index.php +++ b/index.php @@ -22,30 +22,40 @@ $router->get('/', function() { global $twig; + + $twig->addGlobal('pageUri', '/'); echo $twig->render('index.twig'); }); $router->get('/nations', function() { global $twig; + + $twig->addGlobal('pageUri', '/nations'); echo $twig->render('nations.twig'); }); $router->get('/rules', function() { global $twig; + + $twig->addGlobal('pageUri', '/rules'); echo $twig->render('rules.twig'); }); $router->get('/map', function() { global $twig; + + $twig->addGlobal('pageUri', '/map'); echo $twig->render('map.twig'); }); $router->get('/profile', function() { global $twig, $mysql; + + $twig->addGlobal('pageUri', '/profile'); $user = $mysql->getUserRecordFromId($_SESSION['user']['id']); @@ -60,6 +70,8 @@ $router->get('/u/([a-z0-9_\.]+)', function($name) { global $twig, $mysql, $discord; + + $twig->addGlobal('pageUri', '/u/' . $name); $user = $mysql->getUserRecordFromUsername($name); @@ -74,6 +86,8 @@ $router->set404(function() { global $twig; + + $twig->addGlobal('pageUri', '404'); http_response_code(404); diff --git a/template/includes/head.twig b/template/includes/head.twig index 40a3bbd..a04fe81 100644 --- a/template/includes/head.twig +++ b/template/includes/head.twig @@ -6,7 +6,28 @@ Clyde's Real Survival SMP • {{ pageTitle }} - + + + + + + + + + + + + + + + + + + + + + + {% if pageTitle == 'Map' %} diff --git a/template/map.twig b/template/map.twig index d44c624..dc9a105 100644 --- a/template/map.twig +++ b/template/map.twig @@ -4,21 +4,38 @@ Go Home {% include 'includes/foot.twig' %} \ No newline at end of file