Add general_banner.js
This commit is contained in:
commit
46686dcbea
18
general_banner.js
Normal file
18
general_banner.js
Normal file
@ -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";
|
Loading…
Reference in New Issue
Block a user