From 60621d0e0995284c65bcf4ba05b59b1dbe784a4f Mon Sep 17 00:00:00 2001 From: mms Date: Tue, 7 May 2024 14:58:56 +0200 Subject: feat: gungame --- assets/content_images/me-pain.png | Bin 0 -> 4341 bytes layouts/partials/homepage/nav.html | 47 ++++++++++++++++++--- ...f4324fec113_4341_150x0_resize_q75_h2_box_3.webp | Bin 0 -> 2094 bytes ...f4324fec113_4341_300x0_resize_q75_h2_box_3.webp | Bin 0 -> 3742 bytes 4 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 assets/content_images/me-pain.png create mode 100644 resources/_gen/images/content_images/me-pain_hu0353ce27a4a45c9bd13a2f4324fec113_4341_150x0_resize_q75_h2_box_3.webp create mode 100644 resources/_gen/images/content_images/me-pain_hu0353ce27a4a45c9bd13a2f4324fec113_4341_300x0_resize_q75_h2_box_3.webp diff --git a/assets/content_images/me-pain.png b/assets/content_images/me-pain.png new file mode 100644 index 0000000..bd195ce Binary files /dev/null and b/assets/content_images/me-pain.png differ diff --git a/layouts/partials/homepage/nav.html b/layouts/partials/homepage/nav.html index 829323e..b0e500f 100644 --- a/layouts/partials/homepage/nav.html +++ b/layouts/partials/homepage/nav.html @@ -18,7 +18,9 @@ Michal + +{{- $file := "me-pain.png" }} +{{- $path := printf "content_images/%s" $file}} +{{- $img := resources.Get $path }} +{{- $img1x := $img.Resize "150x webp" }} +{{- $img2x := $img.Resize "300x webp" }} + {{ partial "menu.html" (dict "menuID" "main-nav" "page" .) }} @@ -53,15 +73,30 @@ var kofiLink = document.getElementById('ko-fi'); var meNormal = document.getElementById('me-normal'); var meGrim = document.getElementById('me-grim'); + var mePain = document.getElementById('me-pain'); + + var out = false; + + meNormal.addEventListener( 'click', function() { + meNormal.style.display="none"; + mePain.style.display="inline"; + + setTimeout(() => { + meNormal.style.display="inline"; + mePain.style.display="none"; + }, 300) + }) - kofiLink.addEventListener( 'mouseover', function() { - meNormal.style.display="none" + kofiLink.addEventListener( 'mouseenter', function() { + meNormal.style.display="none"; meGrim.style.display="inline" }); - kofiLink.addEventListener( 'mouseout', function() { - meNormal.style.display="inline" - meGrim.style.display="none" + kofiLink.addEventListener( 'mouseleave', function() { + setTimeout(() => { + meNormal.style.display="inline"; + meGrim.style.display="none"; + }, 700) }); diff --git a/resources/_gen/images/content_images/me-pain_hu0353ce27a4a45c9bd13a2f4324fec113_4341_150x0_resize_q75_h2_box_3.webp b/resources/_gen/images/content_images/me-pain_hu0353ce27a4a45c9bd13a2f4324fec113_4341_150x0_resize_q75_h2_box_3.webp new file mode 100644 index 0000000..7d4e8fd Binary files /dev/null and b/resources/_gen/images/content_images/me-pain_hu0353ce27a4a45c9bd13a2f4324fec113_4341_150x0_resize_q75_h2_box_3.webp differ diff --git a/resources/_gen/images/content_images/me-pain_hu0353ce27a4a45c9bd13a2f4324fec113_4341_300x0_resize_q75_h2_box_3.webp b/resources/_gen/images/content_images/me-pain_hu0353ce27a4a45c9bd13a2f4324fec113_4341_300x0_resize_q75_h2_box_3.webp new file mode 100644 index 0000000..15ac219 Binary files /dev/null and b/resources/_gen/images/content_images/me-pain_hu0353ce27a4a45c9bd13a2f4324fec113_4341_300x0_resize_q75_h2_box_3.webp differ -- cgit v1.2.3