SEO + UX: schema.org JSON-LD, sitemap fix, persistent topbar, POST-only rate limit

- Add schema.org JSON-LD to page, service, and location templates (LocalBusiness / Service / FAQPage)
- Inject schema_json via _header.php <script type="application/ld+json"> block
- Fix sitemap.xml: replace 10 stale .html refs with trailing-slash URLs, add /blog/, update lastmod
- nginx: rate-limit /contact/ POST-only via map $request_method (GET no longer hits 429)
- Topbar: remove dismiss button, always visible for session; popup close no longer hides topbar

Verified: all 17 routes 200, JSON-LD present on home/service/location/contact, sitemap 17 URLs no .html

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Concept Agent
2026-05-31 14:09:19 +02:00
parent 81feccdc1a
commit fb32f28bd4
7 changed files with 108 additions and 56 deletions
+8 -28
View File
@@ -1,8 +1,7 @@
(function () {
var POPUP_KEY = 'flooritPromo2026';
var TOPBAR_KEY = 'flooritTopbar2026';
var DELAY_MS = 5000;
var EXPIRY_MS = 7 * 24 * 60 * 60 * 1000;
var POPUP_KEY = 'flooritPromo2026';
var DELAY_MS = 5000;
var EXPIRY_MS = 7 * 24 * 60 * 60 * 1000;
function isStored(key) {
try {
@@ -15,32 +14,14 @@
try { localStorage.setItem(key, String(Date.now() + EXPIRY_MS)); } catch (e) {}
}
/* --- Topbar -------------------------------------------- */
function showTopbar() {
var bar = document.getElementById('promo-topbar');
/* --- Topbar (always visible, no dismiss) --------------- */
function initTopbar() {
var bar = document.getElementById('promo-topbar');
var offerBtn = document.getElementById('promo-topbar-btn');
if (!bar) return;
bar.classList.add('visible');
document.body.classList.add('has-topbar');
}
function hideTopbar() {
var bar = document.getElementById('promo-topbar');
if (!bar) return;
bar.classList.remove('visible');
document.body.classList.remove('has-topbar');
store(TOPBAR_KEY);
}
function initTopbar() {
if (isStored(TOPBAR_KEY) || isStored(POPUP_KEY)) return;
showTopbar();
var closeBtn = document.getElementById('promo-topbar-close');
var offerBtn = document.getElementById('promo-topbar-btn');
if (closeBtn) closeBtn.addEventListener('click', hideTopbar);
if (offerBtn) offerBtn.addEventListener('click', function () {
hideTopbar();
openPopup();
});
if (offerBtn) offerBtn.addEventListener('click', openPopup);
}
/* --- Popup --------------------------------------------- */
@@ -60,7 +41,6 @@
setTimeout(function () { overlay.style.display = 'none'; }, 350);
}
store(POPUP_KEY);
hideTopbar();
}
function initPopup() {