more bites

This commit is contained in:
Chris Wanstrath 2025-12-12 08:40:12 -08:00
parent 3e3ffe345e
commit 350ef97df4
3 changed files with 3 additions and 1 deletions

View File

Before

Width:  |  Height:  |  Size: 1.0 MiB

After

Width:  |  Height:  |  Size: 1.0 MiB

BIN
example/pub/img/bite2.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@ -2,6 +2,8 @@ export function initBurger() {
document.addEventListener('click', ev => { document.addEventListener('click', ev => {
const el = (ev?.target as HTMLElement).closest('.burger') as HTMLImageElement const el = (ev?.target as HTMLElement).closest('.burger') as HTMLImageElement
if (el) el.src = '/img/bite.png' if (!el) return
el.src = el.src.endsWith('/img/burger.png') ? '/img/bite1.png' : '/img/bite2.png'
}) })
} }