fix: address points 5,7,8,9,11,12,13,14,15 - add Offer schema, remove duplicate partners, trial error feedback, rel=noopener noreferrer, remove inline onclick, semantic pagination, footer email

This commit is contained in:
ODOO4projects Web Developer committed 2026-10-04 23:14:31 +00:00
1 parent af866d87e8
commit 4134ff5260
3 files changed
+83 -61

No files matched your search

+40 -33
View File
@@ -307,38 +307,24 @@ var si = 0,
var pag = document.getElementById("blogPagination");
var pagHtml = "";
if (totalPages > 1) {
pagHtml +=
'<button class="blog-page-btn" onclick="blogGo(1)"' +
(blogState.currentPage <= 1 ? ' disabled"' : '"') +
">&laquo;</button>";
pagHtml +=
'<button class="blog-page-btn" onclick="blogGo(' +
(blogState.currentPage - 1) +
')"' +
(blogState.currentPage <= 1 ? ' disabled"' : '"') +
">&lsaquo; Prev</button>";
pagHtml +=
'<span class="blog-page-info">Page ' +
blogState.currentPage +
" of " +
totalPages +
"</span>";
pagHtml +=
'<button class="blog-page-btn" onclick="blogGo(' +
(blogState.currentPage + 1) +
')"' +
(blogState.currentPage >= totalPages
? ' disabled"'
: '"') +
">Next &rsaquo;</button>";
pagHtml +=
'<button class="blog-page-btn" onclick="blogGo(' +
totalPages +
')"' +
(blogState.currentPage >= totalPages
? ' disabled"'
: '"') +
">&raquo;</button>";
var prevPage = blogState.currentPage > 1 ? blogState.currentPage - 1 : null;
var nextPage = blogState.currentPage < totalPages ? blogState.currentPage + 1 : null;
var isFirst = blogState.currentPage <= 1;
var isLast = blogState.currentPage >= totalPages;
pagHtml += '<a class="blog-page-btn' + (isFirst ? ' blog-page-btn-disabled' : '') + '" href="?page=1"' + (isFirst ? ' aria-disabled="true"' : ' aria-label="Go to first page"') + '>&laquo;</a>';
if (prevPage) {
pagHtml += '<a class="blog-page-btn" href="?page=' + prevPage + '" rel="prev" aria-label="Go to previous page">&lsaquo; Prev</a>';
} else {
pagHtml += '<span class="blog-page-btn-disabled">&lsaquo; Prev</span>';
}
pagHtml += '<span class="blog-page-info" aria-live="polite">Page ' + blogState.currentPage + " of " + totalPages + "</span>";
if (nextPage) {
pagHtml += '<a class="blog-page-btn" href="?page=' + nextPage + '" rel="next" aria-label="Go to next page">Next &rsaquo;</a>';
} else {
pagHtml += '<span class="blog-page-btn-disabled">Next &rsaquo;</span>';
}
pagHtml += '<a class="blog-page-btn' + (isLast ? ' blog-page-btn-disabled' : '') + '" href="?page=' + totalPages + '"' + (isLast ? ' aria-disabled="true"' : ' aria-label="Go to last page"') + '>&raquo;</a>';
}
pag.innerHTML = pagHtml;
}
@@ -526,7 +512,11 @@ var si = 0,
}).catch(function() {
btn.textContent = 'Send';
btn.disabled = false;
alert('Something went wrong. Please try again.');
var errorMsg = document.createElement('div');
errorMsg.className = 'trial-error visible';
errorMsg.textContent = 'Something went wrong. Please try again.';
trialForm.appendChild(errorMsg);
setTimeout(function() { errorMsg.classList.remove('visible'); }, 3000);
});
});
}
@@ -728,4 +718,21 @@ var si = 0,
render(this.value);
});
}
/* Buy Now buttons (no inline onclick) */
document.querySelectorAll('.btn-buy').forEach(function(btn) {
btn.addEventListener('click', function() {
var id = this.getAttribute('data-id');
if (id) buyNow(parseInt(id));
});
});
document.querySelectorAll('.btn-empire').forEach(function(btn) {
btn.addEventListener('click', function() {
var plan = this.getAttribute('data-plan');
var price = parseFloat(this.getAttribute('data-price'));
var isEmpire = this.getAttribute('data-is-empire') === 'true';
if (plan) openOrderWidget(plan, price, isEmpire);
});
});
})();