diff --git a/assets/scss/style.scss b/assets/scss/style.scss index a0ccbf6..5e07b9c 100644 --- a/assets/scss/style.scss +++ b/assets/scss/style.scss @@ -40,24 +40,4 @@ a { box-shadow: 0px -10px 0px rgba(var(--link-background-color), var(--link-background-opacity-hover)) inset; } } -} - -.alert { - position: fixed; - right: 20px; - bottom: 20px; - z-index: 5; - background: var(--card-background); - max-width: 400px; - padding: 15px 20px; - border-radius: var(--card-border-radius); - line-height: 1.75; - color: var(--card-text-color-secondary); - box-shadow: var(--shadow-l2); - - @media (max-width: $on-phone) { - max-width: 100vw; - width: calc(100% - 30px); - left: 15px; - } -} +} \ No newline at end of file diff --git a/assets/ts/main.ts b/assets/ts/main.ts index c7ddaab..b9164cc 100644 --- a/assets/ts/main.ts +++ b/assets/ts/main.ts @@ -65,29 +65,6 @@ let Stack = { observer.observe(articleTile) } - }, - alert: (content, time = 5000, animationSpeed = 500) => { - const alert = document.createElement('div'); - alert.innerHTML = content; - alert.className = 'alert'; - alert.style.visibility = 'hidden'; - document.body.appendChild(alert); - - alert.style.transform = `translateY(${alert.clientHeight + 50}px)`; - alert.style.transition = `transform ${animationSpeed / 1000}s ease`; - - setTimeout(() => { - alert.style.removeProperty('visibility'); - alert.style.transform = `translateY(0)`; - }, animationSpeed); - - setTimeout(() => { - alert.style.transform = `translateY(${alert.clientHeight + 50}px)`; - }, animationSpeed + time); - - setTimeout(() => { - alert.remove(); - }, 2 * animationSpeed + time); } }