aboutsummaryrefslogtreecommitdiff
path: root/includes/header.php
blob: ff5653524e92638ff0163542b9c8eb0e22e75f3d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
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>