💄 Add navbar
This commit is contained in:
parent
60344b896a
commit
d691b3c849
|
@ -1,80 +1,8 @@
|
|||
body {
|
||||
display: flex;
|
||||
:root {
|
||||
--navbar-height: 32px;
|
||||
}
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
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;
|
||||
#navbar-logo {
|
||||
height: var(--navbar-height);
|
||||
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
|
||||
*/
|
||||
|
||||
$YEAR = $_ENV["TFJM_YEAR"];
|
||||
$URL_BASE = $_ENV["TFJM_URL_BASE"];
|
||||
$LOCAL_PATH = $_ENV["TFJM_LOCAL_PATH"];
|
||||
$MAIL_DOMAIN = $_ENV["TFJM_MAIL_DOMAIN"];
|
||||
$YEAR = getenv("TFJM_YEAR");
|
||||
$URL_BASE = getenv("TFJM_URL_BASE");
|
||||
$LOCAL_PATH = getenv("TFJM_LOCAL_PATH");
|
||||
$MAIL_DOMAIN = getenv("TFJM_MAIL_DOMAIN");
|
||||
// TODO Remove
|
||||
$MAIL_ADDRESS = "contact@" . $MAIL_DOMAIN;
|
||||
|
||||
|
@ -14,10 +14,10 @@ $MAIL_ADDRESS = "contact@" . $MAIL_DOMAIN;
|
|||
* DB infos
|
||||
*/
|
||||
|
||||
$DB_HOST = $_ENV["TFJM_DB_HOST"];
|
||||
$DB_NAME = $_ENV["TFJM_DB_NAME"];
|
||||
$DB_USER = $_ENV["TFJM_DB_USER"];
|
||||
$DB_PASSWORD = $_ENV["TFJM_DB_PASSWORD"];
|
||||
$DB_HOST = getenv("TFJM_DB_HOST");
|
||||
$DB_NAME = getenv("TFJM_DB_NAME");
|
||||
$DB_USER = getenv("TFJM_DB_USER");
|
||||
$DB_PASSWORD = getenv("TFJM_DB_PASSWORD");
|
||||
|
||||
try {
|
||||
$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>
|
||||
</body>
|
||||
</html>
|
||||
<?php exit() ?>
|
||||
|
|
|
@ -1,76 +1,108 @@
|
|||
<!DOCTYPE html>
|
||||
<!--suppress HtmlUnknownTarget -->
|
||||
<html lang="fr">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
|
||||
<meta name="viewport" content= "width=device-width, initial-scale=1.0" />
|
||||
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0"/>
|
||||
<title>Site d'inscription pour le TFJM² <?= $YEAR ?></title>
|
||||
<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 -->
|
||||
<link rel="stylesheet" type="text/css" href="https://s3-eu-west-1.amazonaws.com/tfjm2-inscriptions/static/inscription/vendor/bootstrap/css/bootstrap.min.css">
|
||||
|
||||
<!-- 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">
|
||||
<!-- Bootstrap -->
|
||||
<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">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<ul id="menu">
|
||||
<li id="menu-logo"><img src="/logo.svg" alt="Logo TFJM²"></li>
|
||||
<li><a href="/">Accueil</a></li>
|
||||
<li><a href="/tournois">Liste des tournois</a></li>
|
||||
<?php if (!isset($_SESSION["user_id"])) { ?>
|
||||
<li><a href="/connexion">Connexion</a></li>
|
||||
<li><a href="/inscription">Inscription</a></li>
|
||||
<?php } else { ?>
|
||||
<li><a href="/mon_compte">Mon compte</a></li>
|
||||
<div class="container.fluid bg-light">
|
||||
<nav class="navbar navbar-expand-lg navbar-light">
|
||||
<div class="container">
|
||||
<a class="navbar-brand" href="/">
|
||||
<img src="/logo.svg" alt="Logo TFJM²" id="navbar-logo">
|
||||
</a>
|
||||
<ul class="navbar-nav mr-auto">
|
||||
<li class="nav-item active">
|
||||
<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["team"] == NULL) { ?>
|
||||
<li><a href="/ajouter_equipe">Ajouter une équipe</a></li>
|
||||
<li><a href="/rejoindre_equipe">Rejoindre une équipe</a></li>
|
||||
<li class="nav-item active">
|
||||
<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 { ?>
|
||||
<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) { ?>
|
||||
<li><a href="https://paypal.me/galaxyoyo42">Paiement</a></li>
|
||||
<li><a href="/solutions">Solutions</a></li>
|
||||
<li><a href="/syntheses">Notes de synthèse</a></li>
|
||||
<li class="nav-item active">
|
||||
<a class="nav-link" href="https://paypal.me/galaxyoyo42">Paiement</a>
|
||||
</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 if ($_SESSION["role"] == Role::ADMIN) { ?>
|
||||
<li><a href="/ajouter_tournoi">Ajouter un tournoi</a></li>
|
||||
<li><a href="/ajouter_organisateur">Ajouter un organisateur</a></li>
|
||||
<li class="nav-item active">
|
||||
<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 if ($_SESSION["role"] == Role::ADMIN || $_SESSION["role"] == Role::ORGANIZER) { ?>
|
||||
<li><a href="/solutions_orga">Solutions</a></li>
|
||||
<li><a href="/syntheses_orga">Notes de synthèse</a></li>
|
||||
<li class="nav-item active">
|
||||
<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 } ?>
|
||||
<li><a href="/deconnexion">Déconnexion</a></li>
|
||||
<hr />
|
||||
<?php } ?>
|
||||
</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 href=\"?be-admin=1\">Devenir administrateur</a></li>\n";
|
||||
echo "<li><a class=\"nav-link\" 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";
|
||||
echo "<li><a class=\"nav-link\" 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";
|
||||
echo "<li><a class=\"nav-link\" 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";
|
||||
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>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="main-container">
|
||||
<div id="main-content">
|
||||
<div class="container-fluid">
|
||||
<div class="container">
|
Loading…
Reference in New Issue