commit 46686dcbea8bb3e8cbf62efce9acfd4d7067ce0b Author: frarol96 Date: Mon Oct 28 10:49:51 2024 +0000 Add general_banner.js diff --git a/general_banner.js b/general_banner.js new file mode 100644 index 0000000..d34f907 --- /dev/null +++ b/general_banner.js @@ -0,0 +1,18 @@ +// Create banner +const banner = document.createElement("div"); +banner.style.position = "fixed"; +banner.style.top = "0"; +banner.style.left = "0"; +banner.style.width = "100%"; +banner.style.backgroundColor = "#ffcc00"; // Change to your preferred color +banner.style.color = "#333"; +banner.style.textAlign = "center"; +banner.style.padding = "10px"; +banner.style.zIndex = "1000"; +banner.textContent = "Sticker Packs now available!"; + +// Insert banner at the top of the body +document.body.prepend(banner); + +// Add padding to the body to prevent content from hiding behind the banner +document.body.style.paddingTop = banner.offsetHeight + "px";