Feedback tweaks

This commit is contained in:
Reece 2025-07-03 16:16:53 +01:00
parent c0af630b91
commit 95d4d21737
2 changed files with 24 additions and 4 deletions

View File

@ -39,10 +39,21 @@
const navbar = document.querySelector('.navbar');
if (navbar) {
navbar.style.transform = `translateX(-50%) scale(${navScale})`;
// RTL support - check document direction
const isRTL = document.documentElement.dir === 'rtl' || document.documentElement.getAttribute('dir') === 'rtl';
const translateX = isRTL ? '50%' : '-50%';
navbar.style.transform = `translateX(${translateX}) scale(${navScale})`;
navbar.style.transformOrigin = 'top center';
navbar.style.width = `${100 / navScale}%`;
navbar.style.left = '50%';
if (isRTL) {
navbar.style.right = '50%';
navbar.style.left = 'auto';
} else {
navbar.style.left = '50%';
navbar.style.right = 'auto';
}
// Adjust bottom margin based on scale to prevent overlap/gaps
const baseHeight = 60; // Assume base navbar height

View File

@ -246,10 +246,19 @@
// Dynamically adjust features container width based on scale
const featuresContainer = document.querySelector('.features-container');
if (featuresContainer) {
const isRTL = document.documentElement.dir === 'rtl' || document.documentElement.getAttribute('dir') === 'rtl';
const dynamicWidth = Math.min(140, 100 / finalS);
const leftOffset = (dynamicWidth - 100) / 2;
const offset = (dynamicWidth - 100) / 2;
featuresContainer.style.width = `${dynamicWidth}%`;
featuresContainer.style.left = `-${leftOffset}%`;
if (isRTL) {
featuresContainer.style.right = `-${offset}%`;
featuresContainer.style.left = 'auto';
} else {
featuresContainer.style.left = `-${offset}%`;
featuresContainer.style.right = 'auto';
}
}
}