Top Tweets for #6c63ff
Placez le ici et vous pouvez simplement changer la couleur pour s'adapter ร votre offre sur la ligne:
const ACCENT = "#6c63ff";
Installez MoonBundles: https://t.co/ptuuHYaXcY
Le code ๐
(function () {
const UNIT_LABEL = "/ Produit";
const CURRENCY = "โฌ";
const DECIMALS = 2;
const ACCENT = "#6c63ff";
const OFFER_SELECTOR = ".moonbundle-option";
const ACTIVE_CLASS = "moonbundle-option-active";
const BOX_SELECTOR = "moonbundle-box, .moonbundle-box, moonbundle-component";
const STYLE_ID = "mb-price-summary-v3-style";
const getRoot = () => document.querySelector("moonbundle-component") ?? document;
const getOffers = () => Array.from(getRoot().querySelectorAll(OFFER_SELECTOR));
const getActive = () =>
getOffers().find(o => o.classList.contains(ACTIVE_CLASS) || o.getAttribute("aria-checked") === "true")
?? getOffers()[0];
const fmt = (n) => `${n.toFixed(DECIMALS).replace(".", ",")} ${CURRENCY}`;
function injectStyleOnce() {
if (document.getElementById(STYLE_ID)) return;
const style = document.createElement("style");
https://t.co/b6s8y0ufQI = STYLE_ID;
style.textContent = `
@keyframes mbDotPing{0%{transform:scale(1);opacity:.6;}70%{transform:scale(2.4);opacity:0;}100%{transform:scale(1);opacity:0;}}
.mb-price-summary{display:flex;align-items:center;justify-content:space-between;margin:14px 0 4px;padding:11px 16px;border-radius:999px;background:#1a1a2e;box-shadow:0 8px 28px rgba(0,0,0,0.20);will-change:transform,opacity;}
.mb-ps-left{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;color:rgba(255,255,255,0.70);}
.mb-ps-dot-wrap{position:relative;width:8px;height:8px;flex:0 0 auto;}
.mb-ps-dot{position:absolute;inset:0;border-radius:999px;background:${ACCENT};box-shadow:0 0 0 3px rgba(108,99,255,0.25);}
.mb-ps-dot-ping{position:absolute;inset:0;border-radius:999px;background:${ACCENT};opacity:0;animation:mbDotPing 2s ease-out infinite;}
.mb-ps-unit{color:#fff;}
.mb-ps-right{display:flex;align-items:center;gap:8px;}
.mb-ps-old{font-size:11px;font-weight:500;color:rgba(255,255,255,0.30);text-decoration:line-through;}
.mb-ps-total{font-size:14px;font-weight:800;color:#fff;display:inline-block;}
.mb-ps-badge{font-size:11px;font-weight:800;padding:3px 10px;border-radius:999px;background:${ACCENT};color:#fff;letter-spacing:.3px;display:inline-flex;}
`;
document.head.appendChild(style);
}
function parsePrice(txt) {
if (!txt) return null;
let s = String(txt).replace(/\s/g, "").replace(/[^\d,.\-]/g, "");
const hasComma = s.includes(","), hasDot = s.includes(".");
if (hasComma && hasDot) {
const decIsComma = s.lastIndexOf(",") > s.lastIndexOf(".");
s = decIsComma ? s.replace(/\./g, "").replace(",", ".") : s.replace(/,/g, "");
} else if (hasComma) {
s = s.replace(",", ".");
}
const n = Number(s);
return Number.isFinite(n) ? n : null;
}
function ensureSummaryEl() {
const box = document.querySelector(BOX_SELECTOR);
if (!box) return null;
let el = box.querySelector(".mb-price-summary");
if (el) return el;
el = document.createElement("div");
el.className = "mb-price-summary";
el.innerHTML = `
<div class="mb-ps-left">
<span class="mb-ps-dot-wrap"><span class="mb-ps-dot"></span><span class="mb-ps-dot-ping"></span></span>
<span class="mb-ps-unit"></span>
</div>
<div class="mb-ps-right">
<span class="mb-ps-old"></span>
<span class="mb-ps-total"></span>
<span class="mb-ps-badge"></span>
</div>
`;
box.appendChild(el);
requestAnimationFrame(() =>
el.animate(
[{ opacity: 0, transform: "translateY(10px) scale(.97)" },
{ opacity: 1, transform: "translateY(0) scale(1)" }],
{ duration: 380, easing: "cubic-bezier(.2,.9,.2,1)", fill: "forwards" }
)
);
return el;
}
function swapValue(el, newValue) {
el.animate(
[{ opacity: 1, transform: "translateY(0)" },
{ opacity: 0, transform: "translateY(-6px)" }],
{ duration: 160, easing: "ease-in", fill: "forwards" }
).onfinish = () => {
el.textContent = newValue;
el.animate(
[{ opacity: 0, transform: "translateY(6px)" },
{ opacity: 1, transform: "translateY(0)" }],
{ duration: 200, easing: "cubic-bezier(.2,.9,.2,1)", fill: "forwards" }
);
};
}
const popEl = (el) => el.animate(
[{ transform: "scale(1)" }, { transform: "scale(1.12)" }, { transform: "scale(1)" }],
{ duration: 300, easing: "cubic-bezier(.2,.9,.2,1)" }
);
let lastCurrent = null;
let animating = false;
function render() {
const active = getActive();
if (!active) return false;
const current = parsePrice(active.querySelector(".moonbundle-option-single-price")?.textContent);
const old = parsePrice(active.querySelector(".moonbundle-option-old-price")?.textContent);
const qty = Number((active.querySelector(".moonbundle-option-quantity")?.textContent ?? "").match(/(\d+)/)?.[1]) || 1;
if (!current) return false;
const el = ensureSummaryEl();
if (!el) return false;
const discount = old && old > current ? Math.round((1 - current / old) * 100) : null;
const unitText = `${fmt(current / qty)} ${UNIT_LABEL}`;
const totalText = fmt(current);
const oldText = old ? fmt(old) : "";
const badgeText = discount ? `-${discount}%` : "";
const unitEl = el.querySelector(".mb-ps-unit");
const totalEl = el.querySelector(".mb-ps-total");
const oldEl = el.querySelector(".mb-ps-old");
const badgeEl = el.querySelector(".mb-ps-badge");
if (lastCurrent === null) {
unitEl.textContent = unitText;
totalEl.textContent = totalText;
oldEl.textContent = oldText;
badgeEl.textContent = badgeText;
https://t.co/SMBHX2hAuJ.display = discount ? "inline-flex" : "none";
lastCurrent = current;
return true;
}
if (current === lastCurrent || animating) return true;
animating = true;
lastCurrent = current;
swapValue(unitEl, unitText);
swapValue(totalEl, totalText);
swapValue(oldEl, oldText);
if (discount) {
https://t.co/SMBHX2hAuJ.display = "inline-flex";
badgeEl.textContent !== badgeText ? swapValue(badgeEl, badgeText) : popEl(badgeEl);
} else {
badgeEl.animate(
[{ opacity: 1 }, { opacity: 0 }],
{ duration: 160, easing: "ease-in", fill: "forwards" }
).onfinish = () => { https://t.co/SMBHX2hAuJ.display = "none"; };
}
setTimeout(() => { animating = false; }, 400);
return true;
}
// Init polling
let tries = 0;
const timer = setInterval(() => {
if (render()) { clearInterval(timer); injectStyleOnce(); }
else if (++tries > 60) clearInterval(timer);
}, 250);
// Throttled observer
let debounce = null;
new MutationObserver(() => {
if (debounce) return;
debounce = setTimeout(() => { debounce = null; render(); }, 150);
}).observe(getRoot() === document ? document.documentElement : getRoot(),
{ childList: true, subtree: true, attributes: true, attributeFilter: ["class"] });
// Click sync
document.addEventListener("click", (e) => {
if (https://t.co/a74NouMe7A.closest?.(OFFER_SELECTOR)) setTimeout(render, 80);
});
})();
![bambino_moon's tweet photo. Placez le ici et vous pouvez simplement changer la couleur pour s'adapter ร votre offre sur la ligne:
const ACCENT = "#6c63ff";
Installez MoonBundles: https://t.co/ptuuHYaXcY
Le code ๐
(function () {
const UNIT_LABEL = "/ Produit";
const CURRENCY = "โฌ";
const DECIMALS = 2;
const ACCENT = "#6c63ff";
const OFFER_SELECTOR = ".moonbundle-option";
const ACTIVE_CLASS = "moonbundle-option-active";
const BOX_SELECTOR = "moonbundle-box, .moonbundle-box, moonbundle-component";
const STYLE_ID = "mb-price-summary-v3-style";
const getRoot = () => document.querySelector("moonbundle-component") ?? document;
const getOffers = () => Array.from(getRoot().querySelectorAll(OFFER_SELECTOR));
const getActive = () =>
getOffers().find(o => o.classList.contains(ACTIVE_CLASS) || o.getAttribute("aria-checked") === "true")
?? getOffers()[0];
const fmt = (n) => `${n.toFixed(DECIMALS).replace(".", ",")} ${CURRENCY}`;
function injectStyleOnce() {
if (document.getElementById(STYLE_ID)) return;
const style = document.createElement("style");
https://t.co/b6s8y0ufQI = STYLE_ID;
style.textContent = `
@keyframes mbDotPing{0%{transform:scale(1);opacity:.6;}70%{transform:scale(2.4);opacity:0;}100%{transform:scale(1);opacity:0;}}
.mb-price-summary{display:flex;align-items:center;justify-content:space-between;margin:14px 0 4px;padding:11px 16px;border-radius:999px;background:#1a1a2e;box-shadow:0 8px 28px rgba(0,0,0,0.20);will-change:transform,opacity;}
.mb-ps-left{display:flex;align-items:center;gap:8px;font-size:12px;font-weight:700;color:rgba(255,255,255,0.70);}
.mb-ps-dot-wrap{position:relative;width:8px;height:8px;flex:0 0 auto;}
.mb-ps-dot{position:absolute;inset:0;border-radius:999px;background:${ACCENT};box-shadow:0 0 0 3px rgba(108,99,255,0.25);}
.mb-ps-dot-ping{position:absolute;inset:0;border-radius:999px;background:${ACCENT};opacity:0;animation:mbDotPing 2s ease-out infinite;}
.mb-ps-unit{color:#fff;}
.mb-ps-right{display:flex;align-items:center;gap:8px;}
.mb-ps-old{font-size:11px;font-weight:500;color:rgba(255,255,255,0.30);text-decoration:line-through;}
.mb-ps-total{font-size:14px;font-weight:800;color:#fff;display:inline-block;}
.mb-ps-badge{font-size:11px;font-weight:800;padding:3px 10px;border-radius:999px;background:${ACCENT};color:#fff;letter-spacing:.3px;display:inline-flex;}
`;
document.head.appendChild(style);
}
function parsePrice(txt) {
if (!txt) return null;
let s = String(txt).replace(/\s/g, "").replace(/[^\d,.\-]/g, "");
const hasComma = s.includes(","), hasDot = s.includes(".");
if (hasComma && hasDot) {
const decIsComma = s.lastIndexOf(",") > s.lastIndexOf(".");
s = decIsComma ? s.replace(/\./g, "").replace(",", ".") : s.replace(/,/g, "");
} else if (hasComma) {
s = s.replace(",", ".");
}
const n = Number(s);
return Number.isFinite(n) ? n : null;
}
function ensureSummaryEl() {
const box = document.querySelector(BOX_SELECTOR);
if (!box) return null;
let el = box.querySelector(".mb-price-summary");
if (el) return el;
el = document.createElement("div");
el.className = "mb-price-summary";
el.innerHTML = `
<div class="mb-ps-left">
<span class="mb-ps-dot-wrap"><span class="mb-ps-dot"></span><span class="mb-ps-dot-ping"></span></span>
<span class="mb-ps-unit"></span>
</div>
<div class="mb-ps-right">
<span class="mb-ps-old"></span>
<span class="mb-ps-total"></span>
<span class="mb-ps-badge"></span>
</div>
`;
box.appendChild(el);
requestAnimationFrame(() =>
el.animate(
[{ opacity: 0, transform: "translateY(10px) scale(.97)" },
{ opacity: 1, transform: "translateY(0) scale(1)" }],
{ duration: 380, easing: "cubic-bezier(.2,.9,.2,1)", fill: "forwards" }
)
);
return el;
}
function swapValue(el, newValue) {
el.animate(
[{ opacity: 1, transform: "translateY(0)" },
{ opacity: 0, transform: "translateY(-6px)" }],
{ duration: 160, easing: "ease-in", fill: "forwards" }
).onfinish = () => {
el.textContent = newValue;
el.animate(
[{ opacity: 0, transform: "translateY(6px)" },
{ opacity: 1, transform: "translateY(0)" }],
{ duration: 200, easing: "cubic-bezier(.2,.9,.2,1)", fill: "forwards" }
);
};
}
const popEl = (el) => el.animate(
[{ transform: "scale(1)" }, { transform: "scale(1.12)" }, { transform: "scale(1)" }],
{ duration: 300, easing: "cubic-bezier(.2,.9,.2,1)" }
);
let lastCurrent = null;
let animating = false;
function render() {
const active = getActive();
if (!active) return false;
const current = parsePrice(active.querySelector(".moonbundle-option-single-price")?.textContent);
const old = parsePrice(active.querySelector(".moonbundle-option-old-price")?.textContent);
const qty = Number((active.querySelector(".moonbundle-option-quantity")?.textContent ?? "").match(/(\d+)/)?.[1]) || 1;
if (!current) return false;
const el = ensureSummaryEl();
if (!el) return false;
const discount = old && old > current ? Math.round((1 - current / old) * 100) : null;
const unitText = `${fmt(current / qty)} ${UNIT_LABEL}`;
const totalText = fmt(current);
const oldText = old ? fmt(old) : "";
const badgeText = discount ? `-${discount}%` : "";
const unitEl = el.querySelector(".mb-ps-unit");
const totalEl = el.querySelector(".mb-ps-total");
const oldEl = el.querySelector(".mb-ps-old");
const badgeEl = el.querySelector(".mb-ps-badge");
if (lastCurrent === null) {
unitEl.textContent = unitText;
totalEl.textContent = totalText;
oldEl.textContent = oldText;
badgeEl.textContent = badgeText;
https://t.co/SMBHX2hAuJ.display = discount ? "inline-flex" : "none";
lastCurrent = current;
return true;
}
if (current === lastCurrent || animating) return true;
animating = true;
lastCurrent = current;
swapValue(unitEl, unitText);
swapValue(totalEl, totalText);
swapValue(oldEl, oldText);
if (discount) {
https://t.co/SMBHX2hAuJ.display = "inline-flex";
badgeEl.textContent !== badgeText ? swapValue(badgeEl, badgeText) : popEl(badgeEl);
} else {
badgeEl.animate(
[{ opacity: 1 }, { opacity: 0 }],
{ duration: 160, easing: "ease-in", fill: "forwards" }
).onfinish = () => { https://t.co/SMBHX2hAuJ.display = "none"; };
}
setTimeout(() => { animating = false; }, 400);
return true;
}
// Init polling
let tries = 0;
const timer = setInterval(() => {
if (render()) { clearInterval(timer); injectStyleOnce(); }
else if (++tries > 60) clearInterval(timer);
}, 250);
// Throttled observer
let debounce = null;
new MutationObserver(() => {
if (debounce) return;
debounce = setTimeout(() => { debounce = null; render(); }, 150);
}).observe(getRoot() === document ? document.documentElement : getRoot(),
{ childList: true, subtree: true, attributes: true, attributeFilter: ["class"] });
// Click sync
document.addEventListener("click", (e) => {
if (https://t.co/a74NouMe7A.closest?.(OFFER_SELECTOR)) setTimeout(render, 80);
});
})();](https://pbs.twimg.com/media/HCbDCt5W0AA8n6G.jpg)
ุฃูู ู
ููุน ููุจ ูู ุจุนุฏ ุชุนูู
tailwind
ุงุณุชุฎุฏู
ุช ููู ุงูุชูููุงุช ุงูุขุชูุฉ:
- HTML,CSS.
-Tailwind.
-Heroicons .
-Images: from (https://t.co/VNacg4Phuu)
-Google Fonts: Pacifico, Inter.
-Colors: #6C63FF, #ff6584, #474297
ููู
ุนุงููุฉ:
https://t.co/9WqusJzgYF
ุงูููุฏ:
https://t.co/pNbTuMnUjF

This however won't survive page refreshes or visiting other routes (/thankful, etc.) The primary color the illustrations were originally designed by @ninalimpi, as well the primary color of the unDraw UI is #6C63FF, so it will revert to that.
Most Popular Users

Elon Musk 
@elonmusk
241.5M followers

Barack Obama 
@barackobama
118.8M followers

Cristiano Ronaldo 
@cristiano
114.5M followers

Donald J. Trump 
@realdonaldtrump
111.8M followers

Narendra Modi 
@narendramodi
107.1M followers

Rihanna 
@rihanna
98.7M followers

NASA 
@nasa
92.3M followers

Justin Bieber 
@justinbieber
91.8M followers

KATY PERRY 
@katyperry
90M followers

Taylor Swift 
@taylorswift13
84M followers

Lady Gaga 
@ladygaga
75.5M followers

Virat Kohli 
@imvkohli
73.5M followers

Kim Kardashian 
@kimkardashian
70.9M followers

YouTube 
@youtube
68.8M followers

Neymar Jr 
@neymarjr
66.5M followers

Bill Gates 
@billgates
65.3M followers

Selena Gomez 
@selenagomez
63.1M followers

The Ellen Show
@theellenshow
62.2M followers

CNN 
@cnn
61.7M followers

X 
@x
60.7M followers


