Enhance layout and styling for Anti-Fingerprinting Shield Plus page

- Updated the layout structure to utilize a new PageLayout component for better organization.
- Introduced new Hero, Content, and CallToAction components to improve the visual presentation and user engagement.
- Added glassmorphism styles for enhanced aesthetics and readability.
- Implemented accessibility features, including a "Skip to main content" link for improved navigation.
- Refactored the RocketChat livechat initialization to remove unnecessary console logs, enhancing performance and user experience.
This commit is contained in:
2025-10-19 23:38:01 +02:00
parent 2242a33754
commit 8773788335
6 changed files with 118 additions and 55 deletions

View File

@@ -66,6 +66,9 @@ const { language, textDirection } = I18N;
</head>
<body class="antialiased text-default bg-page tracking-tight">
<a href="#main-content" class="sr-only focus:not-sr-only focus:absolute focus:top-2 focus:left-2 focus:z-50 focus:bg-white focus:text-blue-600 focus:rounded focus:px-3 focus:py-2 dark:focus:bg-slate-800">
Skip to main content
</a>
<GlobalBackground />
<header role="banner">
<slot name="header" />
@@ -73,7 +76,7 @@ const { language, textDirection } = I18N;
<nav role="navigation" aria-label="Main navigation">
<slot name="navigation" />
</nav>
<main role="main">
<main role="main" id="main-content">
<slot name="structured-data" />
<slot />
</main>
@@ -87,62 +90,35 @@ const { language, textDirection } = I18N;
<script type="text/javascript">
// Initialize RocketChat livechat widget with proper error handling
// Initialize RocketChat livechat widget without client-facing logs
(function(w, d, s, u) {
console.log('RocketChat initialization started');
// Initialize RocketChat object if it doesn't exist
w.RocketChat = function(c) {
w.RocketChat = function(c) {
if (w.RocketChat._) {
w.RocketChat._.push(c);
} else {
w.RocketChat._ = [c];
}
};
};
if (!w.RocketChat._) {
w.RocketChat._ = [];
}
w.RocketChat.url = u;
console.log('RocketChat URL set to:', u);
// Wait for DOM to be ready before loading the script
function loadRocketChat() {
try {
console.log('Loading RocketChat script...');
const h = d.getElementsByTagName(s)[0];
if (!h) {
console.warn('No script tag found to insert before');
return;
}
const j = d.createElement(s);
j.async = true;
j.async = true;
j.src = 'https://chat.365devnet.eu/livechat/rocketchat-livechat.min.js?_=201903270000';
// Add error handling for script loading
j.onerror = function() {
console.warn('RocketChat livechat script failed to load');
};
j.onload = function() {
console.log('RocketChat script loaded successfully');
};
j.onerror = function() {};
h.parentNode.insertBefore(j, h);
console.log('RocketChat script tag inserted');
} catch (error) {
console.warn('Error loading RocketChat livechat:', error);
}
} catch (_) {}
}
// Load when DOM is ready
if (d.readyState === 'loading') {
console.log('DOM still loading, waiting for DOMContentLoaded');
d.addEventListener('DOMContentLoaded', loadRocketChat);
} else {
console.log('DOM already loaded, loading RocketChat immediately');
loadRocketChat();
}
})(window, document, 'script', 'https://chat.365devnet.eu/livechat');