Skip to content

~95% on SimpleQA (e.g. Qwen3.6-27B on a 3090). Supports all local and cloud LLMs (llama.cpp, Ollama, Google, ...). 10+ search engines - arXiv, PubMed, your private documents. Everything Local & Encrypted.

fix: add ldr- prefix to pdf.js inline CSS and fix alert-error bug (#3123)

LearningCircuit83db9b890457
diff --git a/src/local_deep_research/web/static/js/services/pdf.js b/src/local_deep_research/web/static/js/services/pdf.js
index 64e96d4604..a1cab602b5 100644
--- a/src/local_deep_research/web/static/js/services/pdf.js
+++ b/src/local_deep_research/web/static/js/services/pdf.js
@@ -38,41 +38,41 @@ async function generatePdf(title, content, metadata = {}) {
// Add PDF-specific styles
tempContainer.innerHTML = `
<style>
- .pdf-content {
+ .ldr-pdf-content {
font-family: Arial, sans-serif;
color: #333;
line-height: 1.5;
padding: 20px;
background-color: #ffffff;
}
- .pdf-content h1 {
+ .ldr-pdf-content h1 {
font-size: 24px;
color: #000;
margin-bottom: 12px;
}
- .pdf-content h2 {
+ .ldr-pdf-content h2 {
font-size: 20px;
color: #000;
margin-top: 20px;
margin-bottom: 10px;
}
- .pdf-content h3 {
+ .ldr-pdf-content h3 {
font-size: 16px;
color: #000;
margin-top: 16px;
margin-bottom: 8px;
}
- .pdf-content p {
+ .ldr-pdf-content p {
margin-bottom: 10px;
}
- .pdf-content ul, .pdf-content ol {
+ .ldr-pdf-content ul, .ldr-pdf-content ol {
margin-left: 20px;
margin-bottom: 10px;
}
- .pdf-content li {
+ .ldr-pdf-content li {
margin-bottom: 5px;
}
- .pdf-content pre {
+ .ldr-pdf-content pre {
background-color: #f5f5f5;
padding: 10px;
border-radius: 4px;
@@ -81,55 +81,55 @@ async function generatePdf(title, content, metadata = {}) {
font-size: 12px;
margin-bottom: 10px;
}
- .pdf-content code {
+ .ldr-pdf-content code {
font-family: monospace;
background-color: #f5f5f5;
padding: 2px 4px;
border-radius: 2px;
font-size: 12px;
}
- .pdf-content blockquote {
+ .ldr-pdf-content blockquote {
border-left: 4px solid #ddd;
padding-left: 15px;
margin-left: 0;
color: #666;
}
- .pdf-content table {
+ .ldr-pdf-content table {
border-collapse: collapse;
width: 100%;
margin-bottom: 15px;
}
- .pdf-content table, .pdf-content th, .pdf-content td {
+ .ldr-pdf-content table, .ldr-pdf-content th, .ldr-pdf-content td {
border: 1px solid #ddd;
}
- .pdf-content th, .pdf-content td {
+ .ldr-pdf-content th, .ldr-pdf-content td {
padding: 8px;
text-align: left;
}
- .pdf-content th {
+ .ldr-pdf-content th {
background-color: #f5f5f5;
}
- .pdf-metadata {
+ .ldr-pdf-metadata {
color: #666;
font-size: 12px;
margin-bottom: 20px;
border-bottom: 1px solid #ddd;
padding-bottom: 10px;
}
- .pdf-header {
+ .ldr-pdf-header {
text-align: center;
border-bottom: 2px solid #333;
padding-bottom: 10px;
margin-bottom: 20px;
}
- .pdf-footer {
+ .ldr-pdf-footer {
border-top: 1px solid #ddd;
padding-top: 10px;
margin-top: 20px;
font-size: 12px;
color: #666;
}
- .pdf-content a {
+ .ldr-pdf-content a {
color: #0066cc;
text-decoration: underline;
}
@@ -910,7 +910,7 @@ async function downloadPdf(titleOrData, content, metadata = {}) {
// Show loading indicator
const loadingIndicator = document.createElement('div');
loadingIndicator.className = 'ldr-loading-indicator';
- loadingIndicator.innerHTML = '<div class="spinner"></div><div>Generating PDF...</div>';
+ loadingIndicator.innerHTML = '<div class="ldr-spinner"></div><div>Generating PDF...</div>';
loadingIndicator.style.position = 'fixed';
loadingIndicator.style.top = '50%';
loadingIndicator.style.left = '50%';
diff --git a/src/local_deep_research/web/templates/pages/benchmark_results.html b/src/local_deep_research/web/templates/pages/benchmark_results.html
index e3cd5bfc14..ed8a137157 100644
--- a/src/local_deep_research/web/templates/pages/benchmark_results.html
+++ b/src/local_deep_research/web/templates/pages/benchmark_results.html
@@ -1307,7 +1307,8 @@ async function deleteBenchmarkRun(runId) {
function showAlert(message, type) {
// Create alert element
const alertDiv = document.createElement('div');
- alertDiv.className = `alert alert-${type}`;
+ const alertType = type === 'error' ? 'danger' : type;
+ alertDiv.className = `alert alert-${alertType}`;
alertDiv.style.cssText = `
position: fixed;
top: 20px;