mirror of
https://github.com/NeonGamerBot-QK/saahild.com.git
synced 2025-05-14 01:13:05 +00:00
About Page done
This commit is contained in:
parent
19a02bdb7d
commit
5a39355ca1
12 changed files with 309 additions and 29 deletions
49
src/scripts/easteregg.css
Normal file
49
src/scripts/easteregg.css
Normal file
|
@ -0,0 +1,49 @@
|
|||
.easter-egg {
|
||||
color:red;
|
||||
pointer-events: none;
|
||||
position: fixed;
|
||||
/* top: 40vh; */
|
||||
/* left: 20vw; */
|
||||
object-fit: cover;
|
||||
background-size: cover!important;
|
||||
width: 10vw;
|
||||
height: 10vw;
|
||||
animation: Toast--spinner infinite linear 60s, Overlay--motion-slideInLeft infinite alternate 1.06s, Overlay--motion-slideUp infinite alternate 2.2s; background: url('https://github.com/NeonGamerBot-QK/NeonGamerBot-QK/blob/main/com--unscreen.gif?raw=true');
|
||||
z-index: 999;
|
||||
}
|
||||
/* https://github.com/primer/css/blob/main/src/toasts/toasts.scss#L119-#L127 */
|
||||
@keyframes Toast--spinner {
|
||||
from {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
to {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
/* https://github.com/primer/view_components/blob/main/app/components/primer/alpha/dialog.pcss */
|
||||
|
||||
@keyframes Overlay--motion-slideDown {
|
||||
from {
|
||||
transform: translateY(-100%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes Overlay--motion-slideUp {
|
||||
from {
|
||||
transform: translateY(100%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes Overlay--motion-slideInRight {
|
||||
from {
|
||||
transform: translateX(-100%);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes Overlay--motion-slideInLeft {
|
||||
from {
|
||||
transform: translateX(100%);
|
||||
}
|
||||
}
|
26
src/scripts/oneko_easteregg.ts
Normal file
26
src/scripts/oneko_easteregg.ts
Normal file
|
@ -0,0 +1,26 @@
|
|||
import "./easteregg.css"
|
||||
export function startEasterEgg() {
|
||||
const el = document.createElement('div')
|
||||
el.innerHTML = ""
|
||||
el.className = `easter-egg hidden`
|
||||
document.body.append(el)
|
||||
return {
|
||||
destroy: () => {
|
||||
el.remove()
|
||||
},
|
||||
toggle: () => el.classList.toggle('hidden')
|
||||
}
|
||||
}
|
||||
export function listenForEasterEgg() {
|
||||
const oneko2 = startEasterEgg()
|
||||
window.addEventListener('keydown', (k) => {
|
||||
if((k.ctrlKey || k.metaKey) && k.shiftKey && k.altKey) oneko2.toggle()
|
||||
})
|
||||
window.addEventListener('keyup', (k) => {
|
||||
if((k.ctrlKey || k.metaKey) && k.shiftKey && k.altKey) oneko2.toggle()
|
||||
})
|
||||
}
|
||||
// expose to window
|
||||
// LATER: there is a way to type this im just lazy atm
|
||||
//@ts-ignore
|
||||
window.easter_egg = startEasterEgg
|
Loading…
Add table
Add a link
Reference in a new issue