Version 1

This commit is contained in:
clement callaert 2023-11-01 03:01:31 +01:00
parent 6bedf45937
commit fa4ebe9291
18 changed files with 641 additions and 0 deletions

14
views/401.ejs Normal file
View file

@ -0,0 +1,14 @@
<%- include('includes/head.ejs', {Title: 'error 500'}) %>
<link rel="stylesheet" type="text/css" href="css/401.css">
<head>
<body>
<%- include('includes/header.ejs') %>
<main>
<div id="first_div">
<h1>
Erreur 401 - Non autorisé : Accès refusé. Vous n'avez pas les permissions nécessaires pour accéder à cette ressource.
</h1>
</div>
</main>
</body>

14
views/403.ejs Normal file
View file

@ -0,0 +1,14 @@
<%- include('includes/head.ejs', {Title: 'error 500'}) %>
<link rel="stylesheet" type="text/css" href="css/401.css">
<head>
<body>
<%- include('includes/header.ejs') %>
<main>
<div id="first_div">
<h1>
Erreur 403 - Accès interdit : Vous n'êtes pas autorisé à accéder à cette ressource.
</h1>
</div>
</main>
</body>

14
views/404.ejs Normal file
View file

@ -0,0 +1,14 @@
<%- include('includes/head.ejs', {Title: 'error 500'}) %>
<link rel="stylesheet" type="text/css" href="css/401.css">
<head>
<body>
<%- include('includes/header.ejs') %>
<main>
<div id="first_div">
<h1>
Erreur 404 - Page non trouvée : La page que vous cherchez est introuvable.
</h1>
</div>
</main>
</body>

14
views/500.ejs Normal file
View file

@ -0,0 +1,14 @@
<%- include('includes/head.ejs', {Title: 'error 500'}) %>
<link rel="stylesheet" type="text/css" href="css/401.css">
<head>
<body>
<%- include('includes/header.ejs') %>
<main>
<div id="first_div">
<h1>
Erreur 500 - Erreur interne du serveur : Le serveur a rencontré une erreur interne ou une condition inattendue et n'a pas pu répondre à votre requête.
</h1>
</div>
</main>
</body>

38
views/a_propos.ejs Normal file
View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page d'Accueil</title>
<link rel="stylesheet" type="text/css" href="css/page%20d'accueil.css">
</head>
<body>
<header>
<h1><a href="/" class="no-underline">BDS CentraleSupélec Metz</a></h1>
<div class="search-bar">
<input type="text" placeholder="Rechercher...">
<button>Rechercher</button>
</div>
</header>
<nav>
<ul>
<li><a href="/" class="custom-cursor">Accueil</a></li>
<li><a href="/A propos" class="custom-cursor">À Propos</a></li>
<li><a href="/Services" class="custom-cursor">Services</a></li>
<li><a href="/Contact" class="custom-cursor">Contact</a></li>
</ul>
</nav>
<main>
<section>
<h2>Section 1</h2>
<p>paragraphe</p>
<p>paragraphe</p>
</section>
<section>
<h2>Section 2</h2>
<p>paragraphe</p>
<p>paragraphe</p>
</section>
</main>
</body>
</html>

67
views/adminPage.ejs Normal file
View file

@ -0,0 +1,67 @@
<%- include('includes/head', {Title : 'Admin page'}) %>
<link rel="stylesheet" type="text/css" href="css/adminPage.css">
</head>
<body>
<%- include('includes/header') %>
<main>
<video id="background-video" autoplay loop muted>
<source src="video/videoBackground.mp4" type="video/mp4">
</video>
<div id="first_div">
<h1>
This is the admin page
</h1>
<ul>
<li>
<h2>
Faire de quelqu'un un admin
</h2>
<form action="/mettreAdmin">
<label for="utilisateurs">Nom d'utilisateur : </label>
<select name="utilisateurs" id="utilisateurs">
<% users.forEach(user => { %>
<option value="<%= user.nom_dutilisateur %>"><%= user.nom_dutilisateur %></option>
<% }); %>
</select>
<button>
submit
</button>
</form>
</li>
<li>
<h2>
enlever un admin
</h2>
<form action="/supprAdmin">
<label for="utilisateurs">Nom d'utilisateur : </label>
<select name="utilisateurs" id="utilisateurs">
<% users.forEach(user => { %>
<option value="<%= user.nom_dutilisateur %>"><%= user.nom_dutilisateur %></option>
<% }); %>
</select>
<button>
submit
</button>
</form>
</li>
<li>
<h2>
Créer un poste pour la hotLine
</h2>
<form action="/creerPost">
<div>
<label for="title">Titre du poste: </label>
<input type="text" name="titre" id="titre">
</div>
<div id="divPostComment">
<label for="commentairePost">commentaire du Poste : </label>
<input type="text" id="commentairePost" name="commentairePost">
</div>
<button>Submit</button>
</form>
</li>
</ul>
</div>
</main>
<%- include('includes/footer') %>
</body>

39
views/connexion.ejs Normal file
View file

@ -0,0 +1,39 @@
<%- include('includes/head', {Title: 'connexion'})%>
<link rel="stylesheet" type="text/css" href="css/connexion.css">
</head>
<body>
<%- include('includes/header') %>
<main>
<video id="background-video" autoplay loop muted>
<source src="video/videoBackground.mp4" type="video/mp4">
</video>
<div id="first_div">
<h1>
Connexion
</h1>
<% if (inputData.hasError) {%>
<p id="input-error">
<%= inputData.message %>
</p>
<% } %>
<section id="input_connexion">
<form action="/connexion" method="POST">
<div>
<label for="text">Nom d'utilisateur : </label>
<input type="text" id="nom_dutilisateur" name="nom_dutilisateur" value="<%= inputData.nom_dutilisateur %>" required>
</div>
<div>
<label for="password">Mot de passe : </label>
<input type="password" id="password" name="password" value="<%= inputData.password %>" required>
</div>
<button>
Se connecter
</button>
</form>
</section>
<a href="/creer-compte" class="custom-cursor">Créer un compte</a>
</div>
</main>
<%- include('includes/footer') %>
</body>
</html>

38
views/contact.ejs Normal file
View file

@ -0,0 +1,38 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page d'Accueil</title>
<link rel="stylesheet" type="text/css" href="css/page-daccueil.css">
</head>
<body>
<header>
<h1><a href="index.ejs" class="no-underline">BDS CentraleSupélec Metz</a></h1>
<div class="search-bar">
<input type="text" placeholder="Rechercher...">
<button>Rechercher</button>
</div>
</header>
<nav>
<ul>
<li><a href="index.ejs" class="custom-cursor">Accueil</a></li>
<li><a href="A%20propos.html" class="custom-cursor">À Propos</a></li>
<li><a href="services.ejs" class="custom-cursor">Services</a></li>
<li><a href="Contact.html" class="custom-cursor">Contact</a></li>
</ul>
</nav>
<main>
<section>
<h2>Section 1</h2>
<p>paragraphe</p>
<p>paragraphe</p>
</section>
<section>
<h2>Section 2</h2>
<p>paragraphe</p>
<p>paragraphe</p>
</section>
</main>
</body>
</html>

58
views/creer_compte.ejs Normal file
View file

@ -0,0 +1,58 @@
<%- include('includes/head', {Title: 'creer-compte', fichier: 'creer-compte'})%>
<link rel="stylesheet" href="css/connexion.css" type="text/css">
</head>
<body>
<%- include('includes/header') %>
<main id="signup">
<video id="background-video" autoplay loop muted>
<source src="video/videoBackground.mp4" type="video/mp4">
</video>
<div id="first_div">
<h1>
Créer un compte
</h1>
<% if (inputData.hasError) {%>
<p id="input-error">
<%= inputData.message %>
</p>
<% } %>
<section id="input_connexion">
<form action="/creer-compte" method="POST">
<div class="form-control">
<label for="text">Nom : </label>
<input type="text" id="text" name="nom" value="<%= inputData.nom %>" required>
</div>
<div class="form-control">
<label for="text">Prénom : </label>
<input type="text" id="text" name="prenom" value="<%= inputData.prenom %>" required>
</div>
<div class="form-control">
<label for="text">Nom d'utilisateur : </label>
<input type="text" id="text" name="nom_dutilisateur" value="<%= inputData.nom_dutilisateur %>" required>
</div>
<div class="form-control">
<label for="email">Email : </label>
<input type="email" id="email" name="email" value="<%= inputData.email %>" required>
</div>
<div class="form-control">
<label for="confirm-email">Confirmation de l'email : </label>
<input type="email" id="confirm-email" name="confirm-email" value="<%= inputData.confirmEmail %>" required>
</div>
<div class="form-control">
<label for="password">Mot de passe</label>
<input type="password" id="password" name="password" value="<%= inputData.password %>" required>
</div>
<div class="form-control">
<label for="confirm-Password">confirmation du mot de passe</label>
<input type="password" id="confirm-password" name="confirm-password" value="<%= inputData.confirmPassword %>" required>
</div>
<button class="btn">
Créer l'utilisateur
</button>
</form>
</section>
</div>
</main>
<%- include('includes/footer') %>
</body>
</html>

55
views/hotLine.ejs Normal file
View file

@ -0,0 +1,55 @@
<%- include('includes/head.ejs', {Title: 'Campagne BDE'}) %>
<link rel="stylesheet" type="text/css" href="css/hotLine.css">
<head>
<body>
<%- include('includes/header') %>
<main>
<video id="background-video" autoplay loop muted>
<source src="video/videoBackground.mp4" type="video/mp4">
</video>
<div id="first_div">
<div>
<h1>
Demandes
</h1>
<p>
Ici vous pouvez demandez à un espion aguerri de vous livrer des crêpes. Aussi, vous pouvez tentez de valider la chasse au trésor du jour ! Pour cela il suffit d'envoyer une photo du ticket avec l'endroit où vous l'avez trouvé.
</p>
</div>
<div id="secondDiv">
<h2>
Commandes
</h2>
<form action="/commandeCrepe" methode="POST">
<ul>
<li>
<label for="garniture">Sur votre crepe</label>
<input type="radio" name="garniture" value="nutella"> nutella
<input type="radio" name="garniture" value="confiture"> confiture
</li>
<li>
<label for="commentaire">Commentaire</label>
<input type="text" name="commentaire" id="commentaire">
</li>
</ul>
<button>
submit
</button>
</form>
</div>
<div id="thirdDiv">
<h2>
Chasse au trésor
</h2>
<p>
Retrouve ici toutes les énigmes. Celles en vert sont déjà resolues alors dépéchez vous de résoudre les autres !
</p>
<% postData.forEach(post => { %>
<% if (post.) %>
<% }); %>
</div>
</div>
</main>
</body>

10
views/includes/footer.ejs Normal file
View file

@ -0,0 +1,10 @@
<footer>
<div>
<h1>
</h1>
<p>
</p>
</div>
</footer>

9
views/includes/head.ejs Normal file
View file

@ -0,0 +1,9 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title><%= Title %></title>
<link rel="icon" type="image/x-icon" href="favicon_ico/favicon.ico">
<link rel="stylesheet" type="text/css" href="css/base.css">
<script src="js/Titre_Accueil.js" defer></script>

74
views/includes/header.ejs Normal file
View file

@ -0,0 +1,74 @@
<header id="redhead">
<a href="/" class="custom-cursor"><img id="logo_noir_blanc" src="img/IMG_6768.JPG" alt="logo BDS" >
</a>
<ul>
<% if (!locals.isAuth) { %>
<li>
<button class="button-85" role="button">
<a href="/connexion" class="custom-cursor">Se connecter</a>
</button>
</li>
<% } %>
<% if (locals.isAuth) { %>
<li>
<form action="/logout" method="POST">
<button class="button-85" role="button" name="logout">
Se déconnecter
</button>
</form>
</li>
<% } %>
<li>
<button class="button-85" role="button" id="menu_button">
Menu
</button>
</li>
</ul>
</header>
<nav id="nav_id">
<ul>
<li>
<button class="button-85" role="button">
<a href="/team" class="custom-cursor">Team</a>
</button>
</li>
<li>
<button class="button-85" role="button">
<a href="/contact" class="custom-cursor">Contact</a>
</button>
</li>
<li>
<button class="button-85" role="button">
<a href="/sports" class="custom-cursor">Les sports</a>
</button>
</li>
<li>
<button href="/hotLine" class="button-85" role="button">
<a href="/evenement" class="custom-cursor">Les événements</a>
</button>
</li>
<li>
<button class="button-85" role="button">
<a href="/A-propos" class="custom-cursor">À propos</a>
</button>
</li>
<% if (locals.isAuth) {%>
<li>
<form action="/profile" method="get">
<button class="button-85" role="button">
<a href="/profile" class="custom-cursor">profile</a>
</button>
</form>
</li>
<% } %>
<% if (locals.isAdmin) { %>
<li>
<button class="button-85" role="button">
<a href="/admin" class="custom-cursor">Admin</a>
</button>
</li>
<% } %>
</ul>
</nav>

23
views/index.ejs Normal file
View file

@ -0,0 +1,23 @@
<%- include('includes/head.ejs', {Title: 'welcome'}) %>
<link rel="stylesheet" type="text/css" href="css/page-daccueil.css">
</head>
<body>
<%- include('includes/header.ejs') %>
<main>
<video id="background-video" autoplay loop muted>
<source src="video/videoMilkyWay.mp4" type="video/mp4">
</video>
<div class="divLogoPerm">
<img src="img/logoMetzPloreur.JPG" alt="logo Metzploreur" id="logoMetzPloreur">
</div >
<div id="secondDiv">
<button href="/hotLine" class="button-64" role="button"><a href="/hotLine" class="custom-cursor">Campagne BDE</a></button>
</div>
<div class="divLogoPerm">
<img src="img/logoPermantEpaule.JPG" alt="logo BDE permanent" id="logoPermBDE">
<img id="logoliste" src="img/IMG_6768.JPG" alt="logo BDS" >
</div>
</main>
<%- include('includes/footer') %>
</body>
</html>

41
views/profile.ejs Normal file
View file

@ -0,0 +1,41 @@
<%- include('includes/head', {Title : 'My profile'}) %>
<link rel="stylesheet" type="text/css" href="css/profile.css">
</head>
<body>
<%- include('includes/header') %>
<main>
<div id="first_div">
<h1>
This is your profile
</h1>
<ul>
<li>
<p>
Nom : <%= locals.user.nom %>
</p>
</li>
<li>
<p>
Prénom : <%= locals.user.prenom %>
</p>
</li>
<li>
<p>
Nom d'utilisateur : <%= locals.user.nom_dutilisateur %>
</p>
</li>
<li>
<p>
Adresse email : <%= locals.user.email %>
</p>
</li>
<form action="/supprimer-compte" method="post">
<button>
Supprimer son compte
</button>
</form>
</ul>
</div>
</main>
<%- include('includes/footer')%>
</body>

10
views/services.ejs Normal file
View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>

113
views/sports.ejs Normal file
View file

@ -0,0 +1,113 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Page d'Accueil</title>
<link rel="icon" type="image/x-icon" href="../public/favicon_io/favicon.ico">
<link rel="stylesheet" type="text/css" href="css/Sports.css">
</head>
<body>
<header id="redhead">
<a href="/" class="custom-cursor"><img id="logo_noir_blanc" src="img/noir_et_blanc-1.png" alt="logo BDS" >
</a>
<ul>
<li>
<a href="/Team" class="custom-cursor">Team</a>
</li>
<li>
<a href="/Contact" class="custom-cursor">Contact</a>
</li>
</ul>
</header>
<main>
<ul>
<li>
<h1>
Foot
</h1>
<p>
</p>
</li>
<li>
<h1>
Volley
</h1>
<p>
</p>
</li>
<li>
<h1>
Rugby
</h1>
<p>
</p>
</li>
<li>
<h1>
Badminton
</h1>
<p>
</p>
</li>
<li>
<h1>
Boxe
</h1>
<p>
</p>
</li>
<li>
<h1>
Boxe
</h1>
<p>
</p>
</li>
<li>
<h1>
Musculation
</h1>
<p>
</p>
</li>
<li>
<h1>
Escalade
</h1>
<p>
</p>
</li>
</ul>
</main>
<footer>
<a href="https://www.instagram.com/bds.cs.metz/" class="custom-cursor">
<img src="img/new-Instagram-logo-white-glyph.png" alt="logo insta">
</a>
<div>
<h1>
À propos
</h1>
<p>
L'association BDS CentraleSupélec Metz est super!!!!
</p>
</div>
</footer>
</body>
</html>
</body>
</html>

10
views/team.ejs Normal file
View file

@ -0,0 +1,10 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
</body>
</html>