💄 Add navbar
This commit is contained in:
parent
60344b896a
commit
d691b3c849
|
@ -1,80 +1,8 @@
|
||||||
body {
|
:root {
|
||||||
display: flex;
|
--navbar-height: 32px;
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
#navbar-logo {
|
||||||
height: 100%;
|
height: var(--navbar-height);
|
||||||
width: 100%;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu {
|
|
||||||
list-style-type: none;
|
|
||||||
margin: 0;
|
|
||||||
padding: 0;
|
|
||||||
width: 220px;
|
|
||||||
background-color: #f1f1f1;
|
|
||||||
height: 100%;
|
|
||||||
overflow: auto;
|
|
||||||
flex-grow: 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu a {
|
|
||||||
display: block;
|
|
||||||
color: #000;
|
|
||||||
padding: 10px 20px;
|
|
||||||
text-decoration: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu a.active {
|
|
||||||
background-color: #4CAF50;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu a:hover:not(.active) {
|
|
||||||
background-color: #555;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
#menu-logo img {
|
|
||||||
width: calc(100% - 40px);
|
|
||||||
margin: 40px auto;
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
#main-container {
|
|
||||||
margin: 0;
|
|
||||||
flex-grow: 1;
|
|
||||||
height: 100%;
|
|
||||||
overflow-y: scroll;
|
|
||||||
}
|
|
||||||
|
|
||||||
#main-content {
|
|
||||||
padding-top: 100px;
|
|
||||||
padding-bottom: 100px;
|
|
||||||
margin: 0 auto;
|
|
||||||
max-width: 1000px;
|
|
||||||
text-align: justify;
|
|
||||||
}
|
|
||||||
|
|
||||||
@media only screen and (max-width: 700px) {
|
|
||||||
body {
|
|
||||||
flex-direction: column;
|
|
||||||
height: auto;
|
|
||||||
}
|
|
||||||
#menu {
|
|
||||||
height: auto;
|
|
||||||
width: 100%;
|
|
||||||
padding-bottom: 20px;
|
|
||||||
}
|
|
||||||
#menu-logo img {
|
|
||||||
height: 70px;
|
|
||||||
padding-left: 7px;
|
|
||||||
}
|
|
||||||
#menu a {
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
#main-content {
|
|
||||||
padding: 100px 16px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -3,10 +3,10 @@
|
||||||
* Config options
|
* Config options
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$YEAR = $_ENV["TFJM_YEAR"];
|
$YEAR = getenv("TFJM_YEAR");
|
||||||
$URL_BASE = $_ENV["TFJM_URL_BASE"];
|
$URL_BASE = getenv("TFJM_URL_BASE");
|
||||||
$LOCAL_PATH = $_ENV["TFJM_LOCAL_PATH"];
|
$LOCAL_PATH = getenv("TFJM_LOCAL_PATH");
|
||||||
$MAIL_DOMAIN = $_ENV["TFJM_MAIL_DOMAIN"];
|
$MAIL_DOMAIN = getenv("TFJM_MAIL_DOMAIN");
|
||||||
// TODO Remove
|
// TODO Remove
|
||||||
$MAIL_ADDRESS = "contact@" . $MAIL_DOMAIN;
|
$MAIL_ADDRESS = "contact@" . $MAIL_DOMAIN;
|
||||||
|
|
||||||
|
@ -14,10 +14,10 @@ $MAIL_ADDRESS = "contact@" . $MAIL_DOMAIN;
|
||||||
* DB infos
|
* DB infos
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$DB_HOST = $_ENV["TFJM_DB_HOST"];
|
$DB_HOST = getenv("TFJM_DB_HOST");
|
||||||
$DB_NAME = $_ENV["TFJM_DB_NAME"];
|
$DB_NAME = getenv("TFJM_DB_NAME");
|
||||||
$DB_USER = $_ENV["TFJM_DB_USER"];
|
$DB_USER = getenv("TFJM_DB_USER");
|
||||||
$DB_PASSWORD = $_ENV["TFJM_DB_PASSWORD"];
|
$DB_PASSWORD = getenv("TFJM_DB_PASSWORD");
|
||||||
|
|
||||||
try {
|
try {
|
||||||
$DB = new PDO("mysql:host=$DB_HOST;dbname=$DB_NAME;charset=utf8", "$DB_USER", "$DB_PASSWORD", array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
|
$DB = new PDO("mysql:host=$DB_HOST;dbname=$DB_NAME;charset=utf8", "$DB_USER", "$DB_PASSWORD", array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION));
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<?php exit() ?>
|
<?php exit() ?>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<!--suppress HtmlUnknownTarget -->
|
|
||||||
<html lang="fr">
|
<html lang="fr">
|
||||||
<head>
|
<head>
|
||||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
||||||
|
@ -8,69 +7,102 @@
|
||||||
<link rel="stylesheet" type="text/css" href="/style.css"/>
|
<link rel="stylesheet" type="text/css" href="/style.css"/>
|
||||||
<link REL="shortcut icon" href="/favicon.ico"/>
|
<link REL="shortcut icon" href="/favicon.ico"/>
|
||||||
|
|
||||||
<!-- Bootstrap core CSS -->
|
<!-- Bootstrap -->
|
||||||
<link rel="stylesheet" type="text/css" href="https://s3-eu-west-1.amazonaws.com/tfjm2-inscriptions/static/inscription/vendor/bootstrap/css/bootstrap.min.css">
|
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
|
||||||
|
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
||||||
<!-- Custom fonts for this template -->
|
|
||||||
<link rel="stylesheet" type="text/css" href="https://s3-eu-west-1.amazonaws.com/tfjm2-inscriptions/static/inscription/vendor/font-awesome/css/font-awesome.min.css">
|
|
||||||
|
|
||||||
<!-- Plugin CSS -->
|
|
||||||
<link rel="stylesheet" type="text/css" href="https://s3-eu-west-1.amazonaws.com/tfjm2-inscriptions/static/inscription/vendor/datatables/dataTables.bootstrap4.css">
|
|
||||||
|
|
||||||
<!-- Custom styles for this template -->
|
|
||||||
<link rel="stylesheet" type="text/css" href="https://s3-eu-west-1.amazonaws.com/tfjm2-inscriptions/static/inscription/css2/sb-admin.css">
|
|
||||||
</head>
|
</head>
|
||||||
|
|
||||||
<body>
|
<body>
|
||||||
<ul id="menu">
|
<div class="container.fluid bg-light">
|
||||||
<li id="menu-logo"><img src="/logo.svg" alt="Logo TFJM²"></li>
|
<nav class="navbar navbar-expand-lg navbar-light">
|
||||||
<li><a href="/">Accueil</a></li>
|
<div class="container">
|
||||||
<li><a href="/tournois">Liste des tournois</a></li>
|
<a class="navbar-brand" href="/">
|
||||||
<?php if (!isset($_SESSION["user_id"])) { ?>
|
<img src="/logo.svg" alt="Logo TFJM²" id="navbar-logo">
|
||||||
<li><a href="/connexion">Connexion</a></li>
|
</a>
|
||||||
<li><a href="/inscription">Inscription</a></li>
|
<ul class="navbar-nav mr-auto">
|
||||||
<?php } else { ?>
|
<li class="nav-item active">
|
||||||
<li><a href="/mon_compte">Mon compte</a></li>
|
<a href="/" class="nav-link">Accueil</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="/tournois">Liste des tournois</a>
|
||||||
|
</li>
|
||||||
|
<?php if (isset($_SESSION["user_id"])) { ?>
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="/mon_compte">Mon compte</a>
|
||||||
|
</li>
|
||||||
<?php if ($_SESSION["role"] == Role::ENCADRANT || $_SESSION["role"] == Role::PARTICIPANT) { ?>
|
<?php if ($_SESSION["role"] == Role::ENCADRANT || $_SESSION["role"] == Role::PARTICIPANT) { ?>
|
||||||
<?php if ($_SESSION["team"] == NULL) { ?>
|
<?php if ($_SESSION["team"] == NULL) { ?>
|
||||||
<li><a href="/ajouter_equipe">Ajouter une équipe</a></li>
|
<li class="nav-item active">
|
||||||
<li><a href="/rejoindre_equipe">Rejoindre une équipe</a></li>
|
<a class="nav-link" href="/ajouter_equipe">Ajouter une équipe</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="/rejoindre_equipe">Rejoindre une équipe</a>
|
||||||
|
</li>
|
||||||
<?php } else { ?>
|
<?php } else { ?>
|
||||||
<li><a href="/mon_equipe">Mon équipe</a></li>
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="/mon_equipe">Mon équipe</a>
|
||||||
|
</li>
|
||||||
<?php if ($_SESSION["team"]->getValidationStatus() == ValidationStatus::VALIDATED || true) { ?>
|
<?php if ($_SESSION["team"]->getValidationStatus() == ValidationStatus::VALIDATED || true) { ?>
|
||||||
<li><a href="https://paypal.me/galaxyoyo42">Paiement</a></li>
|
<li class="nav-item active">
|
||||||
<li><a href="/solutions">Solutions</a></li>
|
<a class="nav-link" href="https://paypal.me/galaxyoyo42">Paiement</a>
|
||||||
<li><a href="/syntheses">Notes de synthèse</a></li>
|
</li>
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="/solutions">Solutions</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="/syntheses">Notes de synthèse</a>
|
||||||
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($_SESSION["role"] == Role::ADMIN) { ?>
|
<?php if ($_SESSION["role"] == Role::ADMIN) { ?>
|
||||||
<li><a href="/ajouter_tournoi">Ajouter un tournoi</a></li>
|
<li class="nav-item active">
|
||||||
<li><a href="/ajouter_organisateur">Ajouter un organisateur</a></li>
|
<a class="nav-link" href="/ajouter_tournoi">Ajouter un tournoi</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="/ajouter_organisateur">Ajouter un organisateur</a>
|
||||||
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<?php if ($_SESSION["role"] == Role::ADMIN || $_SESSION["role"] == Role::ORGANIZER) { ?>
|
<?php if ($_SESSION["role"] == Role::ADMIN || $_SESSION["role"] == Role::ORGANIZER) { ?>
|
||||||
<li><a href="/solutions_orga">Solutions</a></li>
|
<li class="nav-item active">
|
||||||
<li><a href="/syntheses_orga">Notes de synthèse</a></li>
|
<a class="nav-link" href="/solutions_orga">Solutions</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="/syntheses_orga">Notes de synthèse</a>
|
||||||
|
</li>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
<li><a href="/deconnexion">Déconnexion</a></li>
|
|
||||||
<hr />
|
|
||||||
<?php
|
|
||||||
if ($_SESSION["role"] != Role::ADMIN) {
|
|
||||||
echo "<li><a href=\"?be-admin=1\">Devenir administrateur</a></li>\n";
|
|
||||||
}
|
|
||||||
if ($_SESSION["role"] != Role::ORGANIZER) {
|
|
||||||
echo "<li><a href=\"?be-organizer=1\">Devenir organisateur</a></li>\n";
|
|
||||||
}
|
|
||||||
if ($_SESSION["role"] != Role::PARTICIPANT) {
|
|
||||||
echo "<li><a href=\"?be-participant=1\">Devenir participant</a></li>\n";
|
|
||||||
}
|
|
||||||
if ($_SESSION["role"] != Role::ENCADRANT) {
|
|
||||||
echo "<li><a href=\"?be-encadrant=1\">Devenir encadrant</a></li>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
</ul>
|
</ul>
|
||||||
|
<ul class="navbar-nav">
|
||||||
|
<?php if (!isset($_SESSION["user_id"])) { ?>
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="/connexion">Connexion</a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="/inscription">Inscription</a>
|
||||||
|
</li>
|
||||||
|
<?php } else { ?>
|
||||||
|
<?php
|
||||||
|
if ($_SESSION["role"] != Role::ADMIN) {
|
||||||
|
echo "<li><a class=\"nav-link\" href=\"?be-admin=1\">Devenir administrateur</a></li>\n";
|
||||||
|
}
|
||||||
|
if ($_SESSION["role"] != Role::ORGANIZER) {
|
||||||
|
echo "<li><a class=\"nav-link\" href=\"?be-organizer=1\">Devenir organisateur</a></li>\n";
|
||||||
|
}
|
||||||
|
if ($_SESSION["role"] != Role::PARTICIPANT) {
|
||||||
|
echo "<li><a class=\"nav-link\" href=\"?be-participant=1\">Devenir participant</a></li>\n";
|
||||||
|
}
|
||||||
|
if ($_SESSION["role"] != Role::ENCADRANT) {
|
||||||
|
echo "<li><a class=\"nav-link\" href=\"?be-encadrant=1\">Devenir encadrant</a></li>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="/deconnexion">Déconnexion</a>
|
||||||
|
</li>
|
||||||
|
<?php } ?>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div id="main-container">
|
<div class="container">
|
||||||
<div id="main-content">
|
|
||||||
<div class="container-fluid">
|
|
Loading…
Reference in New Issue