Preview isn\'t available for this file type. ' +
+ '
Preview isn\'t available for this file type. ' +
'Use the "Open in new tab" link below to view or download it.
';
} else {
// For text files, fetch and display content
@@ -478,9 +480,9 @@
.catch(error => {
console.error('Error loading content:', error);
if (contentDiv) {
- contentDiv.innerHTML =
- '
Error loading content: ' + error.message + '
' +
- '
File path: ' + filePath + '
';
+ contentDiv.innerHTML =
+ '
Error loading content: ' + error.message + '
' +
+ '
File path: ' + filePath + '
';
}
});
}
@@ -762,7 +764,7 @@
const btn = document.querySelector('button[onclick="markCompleted()"]');
if (btn) {
btn.textContent = 'Completed ✓';
- btn.style.background = '#28a745';
+ btn.style.background = 'var(--success)';
btn.disabled = true;
}
isCompleted = true;
@@ -775,7 +777,7 @@
position: fixed;
top: 20px;
right: 20px;
- background: ${type === 'success' ? '#28a745' : '#007acc'};
+ background: ${type === 'success' ? 'var(--success)' : 'var(--accent)'};
color: white;
padding: 15px 20px;
border-radius: 5px;
diff --git a/templates/notes_hub.html b/templates/notes_hub.html
index e7e3121..e777712 100644
--- a/templates/notes_hub.html
+++ b/templates/notes_hub.html
@@ -22,6 +22,8 @@
--font-size-base: 16px;
--container-max-width: 1600px;
--radius: 8px;
+ --success: #28a745;
+ --error: #ff6b6b;
}
[data-theme="light"] {
--bg-primary: #f2f2f2;
@@ -171,13 +173,19 @@
line-height: 1.5;
}
.note-card-link {
- display: block;
+ display: inline-block;
margin-top: 12px;
font-size: 0.85em;
color: var(--accent);
text-decoration: none;
+ padding: 4px 10px;
+ border-radius: var(--radius);
+ transition: background 0.2s ease;
+ }
+ .note-card-link:hover {
+ background: var(--bg-tertiary);
+ text-decoration: underline;
}
- .note-card-link:hover { text-decoration: underline; }
diff --git a/templates/settings.html b/templates/settings.html
index d899959..2f49646 100644
--- a/templates/settings.html
+++ b/templates/settings.html
@@ -22,6 +22,8 @@
--font-size-base: 16px;
--container-max-width: 1600px;
--radius: 8px;
+ --success: #28a745;
+ --error: #ff6b6b;
}
[data-theme="light"] {
--bg-primary: #f2f2f2;
@@ -279,7 +281,7 @@
.curate-row-status {
flex-basis: 100%;
font-size: 0.8em;
- color: #ff6b6b;
+ color: var(--error);
}
.bulk-rename-row {
display: flex;
@@ -307,7 +309,7 @@
}
#save-status {
font-size: 0.9em;
- color: #28a745;
+ color: var(--success);
opacity: 0;
transition: opacity 0.3s;
}
@@ -658,7 +660,7 @@
renderCurateLevel(data, container);
})
.catch(() => {
- container.innerHTML = '
Could not reach the library scanner.
';
+ container.innerHTML = '
Could not reach the library scanner.
';
});
}
@@ -834,7 +836,7 @@
const preview = document.getElementById('bulk-rename-preview');
preview.innerHTML = '';
if (!pattern) {
- status.style.color = '#ff6b6b';
+ status.style.color = 'var(--error)';
status.textContent = 'Enter text to find first.';
return;
}
@@ -847,7 +849,7 @@
renderBulkRenamePreview();
})
.catch(() => {
- status.style.color = '#ff6b6b';
+ status.style.color = 'var(--error)';
status.textContent = 'Could not reach the server.';
});
}
@@ -898,7 +900,7 @@
const failed = results.filter(r => !r.success);
const activeCourseReset = results.some(r => r.active_course_reset);
- status.style.color = failed.length ? '#ff6b6b' : '#28a745';
+ status.style.color = failed.length ? 'var(--error)' : 'var(--success)';
let message = `${succeeded} renamed`;
if (failed.length) {
message += `, ${failed.length} failed: ` +
@@ -919,7 +921,7 @@
loadCurateLevel(null, document.getElementById('curate-tree'), true);
})
.catch(() => {
- status.style.color = '#ff6b6b';
+ status.style.color = 'var(--error)';
status.textContent = 'Could not reach the server.';
});
}
@@ -935,16 +937,16 @@
.then(r => r.json())
.then(data => {
if (data.success) {
- status.style.color = '#28a745';
+ status.style.color = 'var(--success)';
status.textContent = '✓ Saved — reload the main page to see it take effect';
showSaved();
} else {
- status.style.color = '#ff6b6b';
+ status.style.color = 'var(--error)';
status.textContent = data.error || 'Could not save';
}
})
.catch(err => {
- status.style.color = '#ff6b6b';
+ status.style.color = 'var(--error)';
status.textContent = 'Could not reach the server';
});
}
@@ -955,7 +957,7 @@
const coursePath = input.value.trim();
if (!coursePath) {
- status.style.color = '#ff6b6b';
+ status.style.color = 'var(--error)';
status.textContent = 'Please enter a course path.';
return;
}
@@ -971,16 +973,16 @@
.then(r => r.json())
.then(data => {
if (data.success) {
- status.style.color = '#28a745';
+ status.style.color = 'var(--success)';
status.textContent = `✓ Loaded "${data.course_name}" — redirecting...`;
setTimeout(() => { window.location.href = '/'; }, 1000);
} else {
- status.style.color = '#ff6b6b';
+ status.style.color = 'var(--error)';
status.textContent = data.error || 'Could not load course';
}
})
.catch(() => {
- status.style.color = '#ff6b6b';
+ status.style.color = 'var(--error)';
status.textContent = 'Could not reach the server';
});
}
@@ -1055,17 +1057,17 @@
.then(r => r.json())
.then(data => {
if (data.success) {
- status.style.color = '#28a745';
+ status.style.color = 'var(--success)';
status.textContent = 'Saved.';
document.getElementById('outline-token').value = '';
loadOutlineConfig();
} else {
- status.style.color = '#ff6b6b';
+ status.style.color = 'var(--error)';
status.textContent = data.error || 'Could not save.';
}
})
.catch(() => {
- status.style.color = '#ff6b6b';
+ status.style.color = 'var(--error)';
status.textContent = 'Could not reach the server.';
});
}
@@ -1077,11 +1079,11 @@
fetch('/api/outline/test')
.then(r => r.json())
.then(data => {
- status.style.color = data.success ? '#28a745' : '#ff6b6b';
+ status.style.color = data.success ? 'var(--success)' : 'var(--error)';
status.textContent = data.success ? 'Connected.' : (data.error || 'Connection failed.');
})
.catch(() => {
- status.style.color = '#ff6b6b';
+ status.style.color = 'var(--error)';
status.textContent = 'Could not reach the server.';
});
}