diff --git a/htdocs/page_acceuil.html b/htdocs/page_acceuil.html new file mode 100644 index 0000000000000000000000000000000000000000..970950ab170ec7ebd26ee940a3c284921662a684 --- /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 0000000000000000000000000000000000000000..f2dca3c85c6021c6a16b8bc752d40e79117bb84d --- /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 4bc41ff852f0daef88d87f82bd91dba6ce92759c..5abdd48c65dc75d519dfffae4f89a841aac65279 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) {