Add file editing capability with CodeMirror 6 integration, loading indicator for searches, and clickable home logo

This commit is contained in:
2026-03-21 12:04:10 -04:00
parent 1213eb4781
commit ae46e62902
4 changed files with 428 additions and 7 deletions
+172 -5
View File
@@ -118,6 +118,13 @@ a:hover {
display: flex;
align-items: center;
gap: 8px;
cursor: pointer;
transition: opacity 200ms ease;
text-decoration: none;
}
.header-logo:hover {
opacity: 0.8;
text-decoration: none;
}
.search-wrapper {
@@ -741,6 +748,150 @@ a:hover {
padding: 1px 6px;
}
/* --- Loading indicator --- */
.loading-indicator {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 40px 20px;
color: var(--text-muted);
gap: 12px;
}
.loading-spinner {
width: 32px;
height: 32px;
border: 3px solid var(--border);
border-top-color: var(--accent);
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to { transform: rotate(360deg); }
}
/* --- Editor Modal --- */
.editor-modal {
display: none;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 1000;
background: var(--overlay-bg);
align-items: center;
justify-content: center;
padding: 20px;
}
.editor-modal.active {
display: flex;
}
.editor-container {
background: var(--bg-secondary);
border: 1px solid var(--border);
border-radius: 12px;
width: 100%;
max-width: 1200px;
max-height: 90vh;
display: flex;
flex-direction: column;
overflow: hidden;
box-shadow: 0 8px 32px rgba(0,0,0,0.4);
}
.editor-header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
border-bottom: 1px solid var(--border);
background: var(--bg-primary);
flex-shrink: 0;
}
.editor-title {
font-family: 'JetBrains Mono', monospace;
font-size: 0.9rem;
color: var(--text-primary);
font-weight: 600;
}
.editor-actions {
display: flex;
gap: 8px;
}
.editor-btn {
font-family: 'JetBrains Mono', monospace;
font-size: 0.8rem;
padding: 6px 12px;
border: 1px solid var(--border);
border-radius: 6px;
background: transparent;
color: var(--text-secondary);
cursor: pointer;
transition: all 150ms ease;
display: inline-flex;
align-items: center;
gap: 4px;
}
.editor-btn:hover {
color: var(--accent);
border-color: var(--accent);
}
.editor-btn.primary {
background: var(--accent);
color: #ffffff;
border-color: var(--accent);
}
.editor-btn.primary:hover {
opacity: 0.9;
}
.editor-body {
flex: 1;
overflow: hidden;
position: relative;
}
.cm-editor {
height: 100%;
font-size: 0.9rem;
}
.cm-scroller {
font-family: 'JetBrains Mono', monospace;
}
/* Mobile editor */
@media (max-width: 768px) {
.editor-modal {
padding: 0;
}
.editor-container {
max-width: 100%;
max-height: 100vh;
border-radius: 0;
height: 100vh;
}
.editor-header {
padding: 10px 12px;
}
.editor-title {
font-size: 0.85rem;
}
.editor-btn {
font-size: 0.75rem;
padding: 5px 10px;
}
}
/* --- No-select during resize --- */
body.resizing {
user-select: none;
@@ -768,12 +919,13 @@ body.resizing-v {
}
.header {
gap: 8px;
padding: 8px 12px;
gap: 6px;
padding: 8px 10px;
}
.header-logo {
font-size: 1rem;
font-size: 0.95rem;
gap: 6px;
}
.search-wrapper {
@@ -781,9 +933,14 @@ body.resizing-v {
flex: 1;
}
.search-wrapper input {
padding: 6px 10px 6px 32px;
font-size: 0.8rem;
}
.search-vault-filter {
font-size: 0.72rem;
padding: 5px 6px;
font-size: 0.7rem;
padding: 4px 6px;
}
.sidebar {
@@ -808,6 +965,16 @@ body.resizing-v {
display: none;
}
.tag-resize-handle {
display: none;
}
.tag-cloud-section {
height: auto;
max-height: 200px;
min-height: 80px;
}
.content-area {
padding: 16px 12px 60px;
}