only show js not installed message after 3s

This commit is contained in:
Send_Nukez 2021-11-29 04:37:46 +01:00
parent 27cd9a8a0e
commit 7f559d2a2c
2 changed files with 10 additions and 1 deletions

View file

@ -7,7 +7,7 @@ import moment from "moment";
// Break if Dribbblish has already been initialized
if ($("html").attr("dribbblish-js-installed") != undefined) throw new Error("Dribbblish has already been initialized");
// Remove not installed message
$("html").attr("dribbblish-js-installed", " ");
$("html").attr("dribbblish-js-installed", "");
import { waitForElement, copyToClipboard, capitalizeFirstLetter, getClosestToNum, randomFromArray, debounce } from "./Util";
import { default as _Dribbblish } from "./Dribbblish";

View file

@ -30,6 +30,12 @@
--is_dark: calc(1 - var(--is_light));
// Display warning for incorrectly installed js
@keyframes noJsShow {
to {
opacity: 1;
pointer-events: all;
}
}
&:not([dribbblish-js-installed])::after {
content: "dribbblish-dynamic.js not installed correctly";
position: fixed;
@ -38,6 +44,9 @@
background-color: black;
text-align: center;
line-height: 100vh;
opacity: 0;
pointer-events: none;
animation: noJsShow 0s ease-in 3s forwards;
@include spiceFont("glue", 32px, "Bold");
}
}