aboutsummaryrefslogtreecommitdiff
path: root/includes/header.php
diff options
context:
space:
mode:
authorMinteck <46352972+Minteck@users.noreply.github.com>2021-07-20 01:15:15 +0200
committerMinteck <46352972+Minteck@users.noreply.github.com>2021-07-20 01:15:15 +0200
commitaf9e5ef458b93ef2003905e1ccc5665e7266c242 (patch)
tree989ac25a8b75578788cd7157308f37b9b83cf8f5 /includes/header.php
downloadmain-af9e5ef458b93ef2003905e1ccc5665e7266c242.tar.gz
main-af9e5ef458b93ef2003905e1ccc5665e7266c242.tar.bz2
main-af9e5ef458b93ef2003905e1ccc5665e7266c242.zip
Commit
Diffstat (limited to 'includes/header.php')
-rw-r--r--includes/header.php70
1 files changed, 70 insertions, 0 deletions
diff --git a/includes/header.php b/includes/header.php
new file mode 100644
index 0000000..ff56535
--- /dev/null
+++ b/includes/header.php
@@ -0,0 +1,70 @@
+<?php
+
+if ($_SERVER['REMOTE_ADDR'] !== "86.196.89.109") {
+ header("Location: https://minteck-projects.alwaysdata.net");
+ die();
+}
+
+$lang = substr($_SERVER['HTTP_ACCEPT_LANGUAGE'], 0, 2);
+
+function l($en, $fr) {
+ global $lang;
+
+ if (($lang === "fr" && isset($fr)) || isset($_GET['fr'])) {
+ return $fr;
+ } else {
+ return $en;
+ }
+}
+
+?>
+<!DOCTYPE html>
+<html lang="<?= $lang === "fr" ? "fr" : "en" ?>">
+<head>
+ <meta charset="UTF-8">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <link rel="icon" href="/logo.svg">
+ <link href="/static/css/darktheme.css" rel="stylesheet">
+ <link href="/static/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-EVSTQN3/azprG1Anm3QDgpJLIm9Nao0Yz1ztcQTwFspd3yD65VohhpuuCOmLASjC" crossorigin="anonymous">
+ <title><?php
+
+ if (isset($_TITLE)) {
+ echo($_TITLE . " — ");
+ }
+
+ ?><?= l("Minteck's space", "L'espace de Minteck") ?></title>
+</head>
+<body style="background-size: cover;background-position: center;background-repeat: no-repeat;background-attachment: fixed;">
+ <nav class="navbar fixed-top navbar-expand-lg navbar-light bg-light">
+ <div class="container-fluid">
+ <a class="navbar-brand" href="/"><img src="/logo.svg" alt="" width="36px"> <span style="vertical-align: middle;"><?= l("Minteck's space", "L'espace de Minteck") ?></span></a>
+ <button class="navbar-toggler" style="filter:invert(1);" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
+ <span class="navbar-toggler-icon"></span>
+ </button>
+ <div class="collapse navbar-collapse" id="navbarSupportedContent">
+ <ul class="navbar-nav me-auto mb-2 mb-lg-0">
+ <li class="nav-item"><a class="nav-link" href="/"><?= l("Home", "Accueil") ?></a></li>
+ <li class="nav-item"><a class="nav-link" href="/blog">Blog</a></li>
+ <li class="nav-item dropdown">
+ <a class="nav-link dropdown-toggle" href="#" id="navbarDropdown" role="button" data-bs-toggle="dropdown" aria-expanded="false">
+ <?= l("Creations", "Mes créations") ?>
+ </a>
+ <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
+ <li><a class="dropdown-item" href="/furry"><?= l("Furry fandom", "Fandom furry") ?></a></li>
+ <li><hr class="dropdown-divider"></li>
+ <li><a class="dropdown-item" href="/creations/dev"><?= l("Development", "Programmation") ?></a></li>
+ <li><a class="dropdown-item" href="/creations/video"><?= l("Multimedia", "Audiovisuel") ?></a></li>
+ <li><hr class="dropdown-divider"></li>
+ <li><a class="dropdown-item" href="/archive"><?= l("Software Archive", "Archive des logiciels") ?></a></li>
+ </ul>
+ </li>
+ <li class="nav-item"><a class="nav-link" href="/about"><?= l("About me", "À propos de moi") ?></a></li>
+ <li class="nav-item"><a class="nav-link" href="/social"><?= l("Contact and friends", "Contact et amis") ?></a></li>
+ </ul>
+ <!-- <form class="d-flex">
+ <input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
+ <button class="btn btn-outline-success" type="submit">Search</button>
+ </form> -->
+ </div>
+ </div>
+ </nav>