diff --git a/index.html b/index.html index d692994..e7cbe8f 100644 --- a/index.html +++ b/index.html @@ -677,6 +677,70 @@ } } + /* ---- Billing Toggle ---- */ + .billing-toggle-wrap { + display: flex; + align-items: center; + justify-content: center; + gap: 0.75rem; + margin-bottom: 1.5rem; + } + .toggle-label { + font-size: 0.82rem; + font-weight: 500; + color: rgba(33,37,41,0.6); + cursor: pointer; + transition: color 0.2s; + user-select: none; + } + .toggle-label.active { + color: var(--dark); + font-weight: 600; + } + .toggle-label small { + display: block; + font-size: 0.62rem; + font-weight: 400; + color: #28a745; + margin-top: 0.1rem; + } + .toggle-switch { + width: 48px; + height: 26px; + background: var(--border); + border-radius: 13px; + cursor: pointer; + position: relative; + transition: background 0.25s; + flex-shrink: 0; + } + .toggle-switch.yearly { + background: var(--primary); + } + .toggle-switch .thumb { + position: absolute; + top: 3px; + left: 3px; + width: 20px; + height: 20px; + background: #fff; + border-radius: 50%; + transition: left 0.25s; + box-shadow: 0 1px 3px rgba(0,0,0,0.15); + } + .toggle-switch.yearly .thumb { + left: 25px; + } + .price-save { + font-size: 0.6rem; + font-weight: 700; + color: #28a745; + margin-top: 0.15rem; + } + .price-period { + color: rgba(33,37,41,0.55); + font-size: 0.68rem; + } /* ---- Blog Section ---- */ .blog-section { padding: 3rem 0; @@ -1238,14 +1302,22 @@

Your Plan, Your Timing: Upgrade Anytime

+
+ Monthly +
+
+
+ Yearly 1 month free +

Side Hustle

- $ 214.00 - / year -
+ $ 19.62 + / month + +

“ODOO Standard .. that is all my business needs” @@ -1294,9 +1366,10 @@

On the Rise

- $ 395.00 - / year -
+ $ 36.21 + / month + +

“I need some modules and professional reports” @@ -1345,9 +1418,10 @@

Powerhouse

- $ 595.00 - / year -
+ $ 54.54 + / month + +

“ODOO Enterprise is a must have!”

@@ -1389,9 +1463,10 @@

Empire

- >$ 950.00 - / year -
+ >$ 86.67 + / month + +

“My house! My Horse! My Server!”

@@ -1685,6 +1760,55 @@ }); }); + /* ---- Billing Toggle ---- */ + var yearlyMode = false; + var biSwitch = document.getElementById("billingSwitch"); + var labels = document.querySelectorAll(".toggle-label"); + var monthlyLabel = document.querySelector(".toggle-label-monthly"); + var yearlyLabel = document.querySelector(".toggle-label-yearly"); + + function updatePrices(yearly) { + var amounts = document.querySelectorAll(".price-amount"); + for (var k = 0; k < amounts.length; k++) { + var el = amounts[k]; + var val = yearly ? el.getAttribute("data-yearly") : el.getAttribute("data-monthly"); + var prefix = el.textContent.trim().charAt(0) === ">" ? ">" : ""; + el.textContent = prefix + "$ " + parseFloat(val).toFixed(2); + } + var periods = document.querySelectorAll(".price-period"); + for (var k = 0; k < periods.length; k++) { + periods[k].textContent = yearly ? "/ year" : "/ month"; + } + var saves = document.querySelectorAll(".price-save"); + for (var k = 0; k < saves.length; k++) { + saves[k].style.display = yearly ? "block" : "none"; + } + } + + function setBilling(yearly) { + yearlyMode = yearly; + if (yearly) { + biSwitch.classList.add("yearly"); + monthlyLabel.classList.remove("active"); + yearlyLabel.classList.add("active"); + } else { + biSwitch.classList.remove("yearly"); + monthlyLabel.classList.add("active"); + yearlyLabel.classList.remove("active"); + } + updatePrices(yearly); + } + + biSwitch.addEventListener("click", function () { + setBilling(!yearlyMode); + }); + monthlyLabel.addEventListener("click", function () { + setBilling(false); + }); + yearlyLabel.addEventListener("click", function () { + setBilling(true); + }); + /* ---- Blog Module ---- */ var blogState = { allPosts: [],