Fixed splashscreen and changed the way results are handled by front and back
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
import leaderboard from '$lib/assets/leaderboard.svg';
|
||||
import dice from '$lib/assets/dice.svg';
|
||||
import about from '$lib/assets/about.svg';
|
||||
import logo from '$lib/assets/logo2.png'
|
||||
import logo from '$lib/assets/logo.svg'
|
||||
import arrow from '$lib/assets/arrow.svg'
|
||||
|
||||
import {onMount} from "svelte";
|
||||
@@ -57,15 +57,13 @@
|
||||
</div>
|
||||
|
||||
<div class="container">
|
||||
|
||||
<slot></slot>
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
|
||||
<img src="{logo}"
|
||||
height="175px"
|
||||
width="auto"
|
||||
alt="Logo">
|
||||
<img class="footer-logo" src="{logo}" alt="Logo">
|
||||
|
||||
<!--<a href="https://github.com/naaturel">
|
||||
<img
|
||||
|
||||
@@ -12,9 +12,7 @@
|
||||
async function roll() {
|
||||
|
||||
toggleLoading();
|
||||
|
||||
result = Math.floor(Math.random() * (range + 1));
|
||||
|
||||
result = getRandomNumber();
|
||||
await new Promise(r => setTimeout(r, 3000));
|
||||
|
||||
toggleLoading();
|
||||
@@ -23,6 +21,12 @@
|
||||
await scoreStore.add(playerName, result)
|
||||
}
|
||||
|
||||
function getRandomNumber(){
|
||||
let unit = Math.floor(Math.random() * (range + 1));
|
||||
let dec = Math.floor(Math.random() * (range));
|
||||
return unit + (dec/100);
|
||||
}
|
||||
|
||||
function toggleLoading(){
|
||||
window.$(".loader").toggleClass("disabled");
|
||||
window.$(".player").toggleClass("disabled");
|
||||
@@ -70,6 +74,7 @@
|
||||
|
||||
.name
|
||||
{
|
||||
min-width: 210px;
|
||||
width: 22vmax;
|
||||
height: 5vh;
|
||||
background-color: #fcdcab;
|
||||
@@ -99,6 +104,10 @@
|
||||
transform: scale(1.1);
|
||||
}
|
||||
|
||||
.name::placeholder
|
||||
{
|
||||
}
|
||||
|
||||
@keyframes rotate {
|
||||
to{transform: rotate(360deg)}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user