diff --git a/public/banner.js b/public/banner.js index 89d7c04..ffb99f2 100644 --- a/public/banner.js +++ b/public/banner.js @@ -207,8 +207,8 @@ "}" + ".kao-banner-close:hover{opacity:1;}"; - var cssKaoPulse = - ".kao-banner { animation:kao-pulse 2s infinite; }" + + var cssKaoPulse = + ".kao-banner:not(.no-animation) { animation:kao-pulse 2s infinite; }" + "@keyframes kao-pulse{" + "0%{box-shadow:0 0 0 0 rgba(211,47,47,0.7)}" + "70%{box-shadow:0 0 0 15px rgba(211,47,47,0)}" + @@ -217,8 +217,8 @@ var style = document.createElement("style"); style.textContent = (size === "mini" ? cssMini : size === "minimal" ? cssMinimal : cssNormal) - + (params.animation === "off" ? "" : cssKaoPulse) - + cssCommon; + + (params.animation === "off" ? "" : cssKaoPulse) + + cssCommon; document.head.appendChild(style); // ── Check if previously dismissed (reappears after dismissDays) ───── @@ -235,7 +235,7 @@ // ── Create banner DOM ───────────────────────────────────────────────── var banner = document.createElement("div"); - banner.className = "kao-banner"; + banner.className = params.animation === "off" ? "kao-banner no-animation" : "kao-banner"; var messageText = messages[locale] || messages.en; diff --git a/src/content/pages/banner.md b/src/content/pages/banner.md index 02b11f6..9b65967 100644 --- a/src/content/pages/banner.md +++ b/src/content/pages/banner.md @@ -40,6 +40,7 @@ French, mini size, inserted into a specific element:
+--- Link to a custom page, no close button: @@ -50,10 +51,12 @@ Link to a custom page, no close button: +--- + Minimal size without animations. ```html - +