Compare commits
6 Commits
feat/smsga
...
dependabot
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e96d65bedb | ||
| 1cf43a3768 | |||
| e1daf00609 | |||
| 3a6a9122e1 | |||
| 0d14305ded | |||
| 40b4a0657f |
@@ -11,7 +11,7 @@
|
||||
<label>Din vinlottis kode:</label>
|
||||
</div>
|
||||
|
||||
<div class="codeinput-container">
|
||||
<div id="code-container" class="codeinput-container">
|
||||
<input v-model="code" placeholder="KODE" @keyup.enter="submit" />
|
||||
<button class="vin-button" @click="submit">ENTER</button>
|
||||
</div>
|
||||
@@ -56,15 +56,24 @@ export default {
|
||||
const { video } = this.$refs;
|
||||
video.paused ? video.play() : video.pause();
|
||||
},
|
||||
smh() {
|
||||
let inputContainer = document.getElementById('code-container')
|
||||
inputContainer.classList.add('shake')
|
||||
if (this.timeout)
|
||||
clearTimeout(this.timeout)
|
||||
this.timeout = setTimeout(() => inputContainer.classList.remove('shake'), 600);
|
||||
},
|
||||
submit() {
|
||||
const site = __sites__.find(site => site.code == this.code);
|
||||
const site = __sites__.find(site => site.code?.toLowerCase() == this.code?.toLowerCase());
|
||||
|
||||
if (site) {
|
||||
createCookie("accesscode", site.code, 14);
|
||||
window.location.href = `${window.location.protocol}//${site.domain}`;
|
||||
const path = (location.pathname+location.search).substr(1)
|
||||
const redirectUrl = `${window.location.protocol}//${site.domain}/${path}`
|
||||
window.location.href = redirectUrl;
|
||||
} else {
|
||||
this.smh()
|
||||
}
|
||||
|
||||
return;
|
||||
},
|
||||
},
|
||||
};
|
||||
@@ -127,6 +136,11 @@ video {
|
||||
width: 80%;
|
||||
}
|
||||
|
||||
&.shake {
|
||||
animation: shake 0.6s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
input {
|
||||
max-width: 24rem;
|
||||
width: 100%;
|
||||
@@ -145,6 +159,7 @@ video {
|
||||
button {
|
||||
height: 100%;
|
||||
max-height: unset;
|
||||
font-weight: bold;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -180,6 +195,7 @@ video {
|
||||
|
||||
label {
|
||||
color: rgba(255, 255, 255, 0.82);
|
||||
text-shadow: 1px 1px black;
|
||||
font-size: 1.5rem;
|
||||
font-weight: 500;
|
||||
}
|
||||
@@ -205,4 +221,27 @@ video {
|
||||
.button-container {
|
||||
margin-top: 4rem;
|
||||
}
|
||||
|
||||
@keyframes shake {
|
||||
10%,
|
||||
90% {
|
||||
transform: translate3d(-1px, 0, 0);
|
||||
}
|
||||
|
||||
20%,
|
||||
80% {
|
||||
transform: translate3d(2px, 0, 0);
|
||||
}
|
||||
|
||||
30%,
|
||||
50%,
|
||||
70% {
|
||||
transform: translate3d(-4px, 0, 0);
|
||||
}
|
||||
|
||||
40%,
|
||||
60% {
|
||||
transform: translate3d(4px, 0, 0);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -4331,9 +4331,9 @@ minimatch@^3.0.4:
|
||||
brace-expansion "^1.1.7"
|
||||
|
||||
minimist@^1.2.0, minimist@^1.2.5:
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.5.tgz#67d66014b66a6a8aaa0c083c5fd58df4e4e97602"
|
||||
integrity sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==
|
||||
version "1.2.6"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.6.tgz#8637a5b759ea0d6e98702cfb3a9283323c93af44"
|
||||
integrity sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==
|
||||
|
||||
mixin-deep@^1.2.0:
|
||||
version "1.3.2"
|
||||
|
||||
Reference in New Issue
Block a user