restart link

This commit is contained in:
Adrien MALINGREY 2023-06-06 00:56:44 +02:00
parent 602629129f
commit 74c466cf8d
3 changed files with 16 additions and 18 deletions

View File

@ -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>

View File

@ -424,8 +424,9 @@ function gameEnd() {
addEventListener("animationend", (event) => {
//clearInterval( updateSunIntervalId );
//document.exitPointerLock();
clearInterval( updateSunIntervalId );
document.exitPointerLock();
container.style.cursor = "default";
});

View File

@ -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;
}