Fixing some browser weirdness with widths and such

This commit is contained in:
2026-08-20 16:49:54 -04:00
parent fc62d77131
commit 13de434e6c
2 changed files with 9 additions and 4 deletions
+2 -1
View File
@@ -19,7 +19,8 @@
} }
.container { .container {
max-width: 1200px; max-width: 1600px;
width: 95%;
margin: 0 auto; margin: 0 auto;
padding: 20px; padding: 20px;
} }
+7 -3
View File
@@ -10,8 +10,9 @@
color: #e0e0e0; color: #e0e0e0;
} }
.container { .container {
max-width: 1000px; max-width: 1600px;
margin: 0 auto; width: 95%;
margin: 20px auto;
background: #2d2d2d; background: #2d2d2d;
padding: 20px; padding: 20px;
border-radius: 8px; border-radius: 8px;
@@ -80,6 +81,8 @@
padding: 20px; padding: 20px;
border-radius: 5px; border-radius: 5px;
margin: 20px 0; margin: 20px 0;
}
.text-content.plain-text {
max-height: 600px; max-height: 600px;
overflow-y: auto; overflow-y: auto;
white-space: pre-wrap; white-space: pre-wrap;
@@ -199,7 +202,7 @@
contentDiv.innerHTML = ` contentDiv.innerHTML = `
<iframe <iframe
src="/files/${encodeURIComponent(filePath)}" src="/files/${encodeURIComponent(filePath)}"
style="width: 100%; height: 800px; border: none; border-radius: 5px; background: #fff;" style="width: 100%; height: 85vh; border: none; border-radius: 5px; background: #fff;"
title="${filePath.split('/').pop()}" title="${filePath.split('/').pop()}"
></iframe> ></iframe>
`; `;
@@ -223,6 +226,7 @@
.then(content => { .then(content => {
console.log('Content loaded successfully, length:', content.length); console.log('Content loaded successfully, length:', content.length);
if (contentDiv) { if (contentDiv) {
contentDiv.classList.add('plain-text');
// Check if it's HTML content // Check if it's HTML content
if (content.trim().startsWith('<') && content.includes('</')) { if (content.trim().startsWith('<') && content.includes('</')) {
contentDiv.innerHTML = content; contentDiv.innerHTML = content;