summaryrefslogtreecommitdiff
path: root/includes/gui/header.app.php
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-05-22 18:16:34 +0200
committerMinteck <contact@minteck.org>2022-05-22 18:16:34 +0200
commitbc4d21ddbc50a4295ad1be0f4797b09895a65fea (patch)
treef915c08fba577daf766628657558ce480790b06f /includes/gui/header.app.php
downloadmultisocial-bc4d21ddbc50a4295ad1be0f4797b09895a65fea.tar.gz
multisocial-bc4d21ddbc50a4295ad1be0f4797b09895a65fea.tar.bz2
multisocial-bc4d21ddbc50a4295ad1be0f4797b09895a65fea.zip
Initial commitHEADmane
Diffstat (limited to 'includes/gui/header.app.php')
-rw-r--r--includes/gui/header.app.php49
1 files changed, 49 insertions, 0 deletions
diff --git a/includes/gui/header.app.php b/includes/gui/header.app.php
new file mode 100644
index 0000000..6ff97a1
--- /dev/null
+++ b/includes/gui/header.app.php
@@ -0,0 +1,49 @@
+<?php
+
+global $_AUTH;
+if (!isset($_AUTH)) {
+ require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/session.locked.php";
+}
+
+global $title;
+global $lang;
+
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/functions.php";
+require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/gui/language.php";
+
+?>
+<!DOCTYPE html>
+<html lang="en">
+<head data-multisocial-version="<?= version() ?>" data-multisocial-build="#<?= build() ?>">
+ <?php require_once $_SERVER['DOCUMENT_ROOT'] . "/includes/gui/head.php"; ?>
+</head>
+<body>
+ <nav class="navbar navbar-expand-sm bg-light navbar-light">
+ <div class="container-fluid">
+ <a class="navbar-brand" href="/home">Multisocial</a>
+ <button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#collapsibleNavbar">
+ <span class="navbar-toggler-icon"></span>
+ </button>
+ <div class="collapse navbar-collapse" id="collapsibleNavbar">
+ <ul class="navbar-nav">
+ <?php if (!isset($_AUTH) || $_AUTH): ?>
+ <?php foreach (json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . "/includes/gui/menu.json"), true) as $item): ?>
+ <li class="nav-item">
+ <a title="<?= $lang["menu"][$item["name"]] ?>" class="nav-link" href="<?= $item["link"] ?>">
+ <img class="nav-link-icon" src="/assets/icons/menu/<?= $item["name"] ?>.off.svg" alt="">
+ <span class="nav-link-text"><?= $lang["menu"][$item["name"]] ?></span>
+ </a>
+ </li>
+ <?php endforeach; ?>
+ <?php else: ?>
+ <li class="nav-item">
+ <a title="<?= $lang["menu"]["login"] ?>" class="nav-link" href="/session/login">
+ <img class="nav-link-icon" src="/assets/icons/menu/login.svg" alt="">
+ <span class="nav-link-text"><?= $lang["menu"]["login"] ?></span>
+ </a>
+ </li>
+ <?php endif; ?>
+ </ul>
+ </div>
+ </div>
+ </nav> \ No newline at end of file