-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
79 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
#status-msg { | ||
display: none; | ||
max-width: 50px; | ||
height: 40px; | ||
margin: auto; | ||
padding-top: 20px; | ||
background-color: #7c0000; | ||
color: #fff; | ||
font-size: 17px; | ||
text-align: center; | ||
border-radius: 2px; | ||
position: fixed; | ||
z-index: 22; | ||
left: 0; | ||
right:0; | ||
top: 150px; | ||
animation: fadein 0.5s, expand 0.5s 0.5s, stay 3s 1s; | ||
} | ||
|
||
@keyframes fadein { | ||
from {font-size: 0px; opacity: 0;} | ||
to {font-size: 0px; opacity: 1;} | ||
} | ||
|
||
@keyframes expand { | ||
from {font-size: 0px; min-width: 50px} | ||
to {min-width: 350px} | ||
} | ||
|
||
@keyframes stay { | ||
from {min-width: 350px} | ||
to {min-width: 350px} | ||
} | ||
|
||
/* @Keyframes inspired by https://codepen.io/kipp0/pen/pPNrrj */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,17 @@ | ||
/* eslint-disable no-unused-vars */ | ||
/* eslint-disable no-return-assign */ | ||
const checkLoginstatus = () => { | ||
if (!localStorage.accesstoken) { | ||
window.location.replace('../index.html'); | ||
} | ||
}; | ||
|
||
const snackbar = (text) => { | ||
document.body.innerHTML += '<div id="status-msg"></div>'; | ||
const statusMessageDiv = document.getElementById('status-msg'); | ||
statusMessageDiv.innerHTML = text; | ||
statusMessageDiv.style.display = 'block'; | ||
setTimeout(() => statusMessageDiv.style.display = 'none', 4000); | ||
}; | ||
|
||
window.onload = checkLoginstatus(); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters