From a4bd26d33ae69d5b5abcd88a329ec5e7fbc215ed Mon Sep 17 00:00:00 2001 From: shuki Date: Wed, 4 Mar 2026 03:19:47 +0200 Subject: [PATCH] Use position:sticky for alert so it stays visible while scrolling Co-Authored-By: Claude Opus 4.6 --- whm/gniza-whm/remotes.cgi | 2 +- whm/gniza-whm/setup.cgi | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/whm/gniza-whm/remotes.cgi b/whm/gniza-whm/remotes.cgi index ca7145c..f5861ac 100644 --- a/whm/gniza-whm/remotes.cgi +++ b/whm/gniza-whm/remotes.cgi @@ -720,7 +720,7 @@ function gnizaToast(type, msg) { var el = document.createElement('div'); el.id = 'gniza-alert'; el.className = 'alert alert-' + type; - el.style.cssText = 'position:absolute;top:0;right:0;z-index:9999;max-width:480px;padding:12px 20px;border-radius:8px;font-size:14px;box-shadow:0 4px 12px rgba(0,0,0,.15);transition:opacity .3s'; + el.style.cssText = 'position:sticky;top:12px;margin-left:auto;z-index:9999;max-width:480px;padding:12px 20px;border-radius:8px;font-size:14px;box-shadow:0 4px 12px rgba(0,0,0,.15);transition:opacity .3s'; el.textContent = msg; container.appendChild(el); setTimeout(function() { el.style.opacity = '0'; }, type === 'error' ? 6000 : 3000); diff --git a/whm/gniza-whm/setup.cgi b/whm/gniza-whm/setup.cgi index 33e3aa0..b2bc36b 100644 --- a/whm/gniza-whm/setup.cgi +++ b/whm/gniza-whm/setup.cgi @@ -322,7 +322,7 @@ function gnizaToast(type, msg) { var el = document.createElement('div'); el.id = 'gniza-alert'; el.className = 'alert alert-' + type; - el.style.cssText = 'position:absolute;top:0;right:0;z-index:9999;max-width:480px;padding:12px 20px;border-radius:8px;font-size:14px;box-shadow:0 4px 12px rgba(0,0,0,.15);transition:opacity .3s'; + el.style.cssText = 'position:sticky;top:12px;margin-left:auto;z-index:9999;max-width:480px;padding:12px 20px;border-radius:8px;font-size:14px;box-shadow:0 4px 12px rgba(0,0,0,.15);transition:opacity .3s'; el.textContent = msg; container.appendChild(el); setTimeout(function() { el.style.opacity = '0'; }, type === 'error' ? 6000 : 3000);