From 74c466cf8dadb7d375d94efa5d98ac4773a32c9b Mon Sep 17 00:00:00 2001 From: adrien <adrien@malingrey.fr> Date: Tue, 6 Jun 2023 00:56:44 +0200 Subject: [PATCH] restart link --- index.html | 2 +- main.js | 5 +++-- style.css | 27 ++++++++++++--------------- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/index.html b/index.html index 73f50c6..673b689 100644 --- a/index.html +++ b/index.html @@ -20,7 +20,7 @@ </head> <body> <div id="container"></div> - <span id="message">Libre !</span> + <span id="message"><a href="" title="Rejouer">Libre !</a></span> <script type="module" src="main.js"></script> diff --git a/main.js b/main.js index c8d8d16..92c04cf 100644 --- a/main.js +++ b/main.js @@ -424,8 +424,9 @@ function gameEnd() { addEventListener("animationend", (event) => { - //clearInterval( updateSunIntervalId ); - //document.exitPointerLock(); + clearInterval( updateSunIntervalId ); + document.exitPointerLock(); + container.style.cursor = "default"; }); diff --git a/style.css b/style.css index a54cca0..d801486 100644 --- a/style.css +++ b/style.css @@ -6,29 +6,22 @@ body { font-size: 13px; line-height: 24px; overscroll-behavior: none; - cursor: pointer; } #container { position: absolute; z-index: 0; + cursor: pointer; } @keyframes escaped{ 0% { opacity: 0%; - height: 10vh; - padding-top: 90vh; - } - 33%, 66% { - opacity: 100%; - height: 70vh; - padding-top: 30vh; + top: 90vh; } 100% { - opacity: 0%; - height: 70vh; - padding-top: 30vh; + opacity: 100%; + top: 30vh; } } @@ -37,17 +30,21 @@ body { position: absolute; left: 0; width: 100%; - height: 100vh; font-size: 10vh; font-family: Georgia, serif; - color: gray; background: transparent; justify-content: center; z-index: 1; } +#message a { + color: gray; + text-decoration: none; +} + #message.escaped { display: flex; - animation: escaped 15s; - opacity: 0%; + opacity: 100%; + top: 30vh; + animation: escaped 5s; }