From 3e73f962e954143fd70feea88666c2905d8c2011 Mon Sep 17 00:00:00 2001 From: Thomas de Brettes <thomas.de-brettes@etu.ec-lyon.fr> Date: Wed, 19 Mar 2025 11:08:19 +0100 Subject: [PATCH] acceuil --- htdocs/page_acceuil.html | 29 ++++++++++++++++ htdocs/style_page_acceuil.css | 64 +++++++++++++++++++++++++++++++++++ server.js | 2 +- 3 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 htdocs/page_acceuil.html create mode 100644 htdocs/style_page_acceuil.css diff --git a/htdocs/page_acceuil.html b/htdocs/page_acceuil.html new file mode 100644 index 0000000..970950a --- /dev/null +++ b/htdocs/page_acceuil.html @@ -0,0 +1,29 @@ +<!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 - Jeu d'Échecs</title> + <link rel="stylesheet" href="style_page_acceuil.css"> +</head> +<body> + <header> + <h1>Bienvenue sur le Jeu d'Échecs d'Adam et Thomas</h1> + </header> + + <section id="options"> + <h2>Choisissez une option :</h2> + <ul> + <li><a href="page_jeu.html">Jouer</a></li> + <li><a href="#rankings.html">Classement</a></li> + <li><a href="#contact.html">Contact</a></li> + </ul> + </section> + + <footer> + <p>© 2025 Jeu d'Échecs | Tous droits réservés.</p> + </footer> + + <script src="script.js"></script> +</body> +</html> diff --git a/htdocs/style_page_acceuil.css b/htdocs/style_page_acceuil.css new file mode 100644 index 0000000..f2dca3c --- /dev/null +++ b/htdocs/style_page_acceuil.css @@ -0,0 +1,64 @@ +/* Général */ +body { + font-family: Arial, sans-serif; + margin: 0; + padding: 0; + background-color: #a8d5ba; + color: black; +} + +h1, h2 { + color: #a8d5ba; +} + +/* Header */ +header { + background-color: black; + color: #a8d5ba; + padding: 20px; + text-align: center; +} + +header h1 { + margin: 0; +} + +nav ul { + list-style: none; + padding: 0; +} + +nav ul li { + display: inline; + margin: 0 10px; +} + +nav ul li a { + color: #a8d5ba; + text-decoration: none; +} + +nav ul li a:hover { + text-decoration: underline; +} + +/* Sections */ +section { + padding: 20px; + margin: 20px; +} + +#chessboard { + background-color: #a8d5ba; + border: 5px solid black; +} + +footer { + background-color: #a8d5ba; + color: black; + text-align: center; + padding: 10px; + position: fixed; + width: 100%; + bottom: 0; +} diff --git a/server.js b/server.js index 4bc41ff..5abdd48 100644 --- a/server.js +++ b/server.js @@ -3,7 +3,7 @@ var fs = require('fs'), path = require('path'); var server = http.createServer(function (request, response) { - var filePath = path.join(__dirname, 'htdocs', request.url === '/' ? 'page_jeu.html' : request.url); + var filePath = path.join(__dirname, 'htdocs', request.url === '/' ? 'page_acceuil.html' : request.url); fs.readFile(filePath, function (err, data) { if (err) { -- GitLab