From cc9eaddc1d99f97a2012287effdd267aa7f66d45 Mon Sep 17 00:00:00 2001 From: Jens Luedicke Date: Sun, 6 Jul 2025 21:25:06 +0200 Subject: [PATCH] Improve notes search bar. --- templates/notes_list.html | 158 ++++++++++++++++++++++++-------------- 1 file changed, 100 insertions(+), 58 deletions(-) diff --git a/templates/notes_list.html b/templates/notes_list.html index bebba42..0110e2e 100644 --- a/templates/notes_list.html +++ b/templates/notes_list.html @@ -120,34 +120,38 @@
-
- - +
+
- - {% if folder_filter or tag_filter or visibility_filter %} -
- Active filters: - {% if folder_filter %} - - 📁 {{ folder_filter }} × - - {% endif %} - {% if tag_filter %} - - 🏷️ {{ tag_filter }} × - - {% endif %} - {% if visibility_filter %} - - {% if visibility_filter == 'private' %}🔒{% elif visibility_filter == 'team' %}👥{% else %}🏢{% endif %} - {{ visibility_filter|title }} × - - {% endif %} - -
- {% endif %}
@@ -627,58 +631,87 @@ flex-wrap: wrap; } -.search-group { +.search-container { flex: 1; + min-width: 400px; +} + +.search-bar { + position: relative; display: flex; - gap: 0.5rem; - min-width: 300px; -} - -.search-input { - flex: 1; - padding: 0.5rem 1rem; + align-items: center; + background: white; border: 2px solid #e9ecef; - border-radius: 6px; - font-size: 0.95rem; + border-radius: 8px; + padding: 0.25rem; + transition: border-color 0.2s; } -.search-input:focus { - outline: none; +.search-bar:focus-within { border-color: var(--primary-color); } -.active-filters { +.active-filters-inline { display: flex; - align-items: center; gap: 0.5rem; - flex-wrap: wrap; + padding-left: 0.5rem; + flex-shrink: 0; } -.filter-label { - font-size: 0.85rem; - color: #666; -} - -.filter-badge { +.filter-chip { background: #e3f2fd; color: #333; - padding: 0.25rem 0.75rem; - border-radius: 20px; - font-size: 0.85rem; + padding: 0.2rem 0.6rem; + border-radius: 16px; + font-size: 0.8rem; cursor: pointer; transition: background 0.2s; display: inline-flex; align-items: center; - gap: 0.5rem; + gap: 0.4rem; + white-space: nowrap; } -.filter-badge:hover { +.filter-chip:hover { background: #bbdefb; } -.filter-badge .remove { +.filter-chip .remove { font-weight: bold; color: #666; + font-size: 0.9rem; +} + +.search-input { + flex: 1; + padding: 0.4rem 0.75rem; + border: none; + background: transparent; + font-size: 0.95rem; + outline: none; +} + +.btn-search { + padding: 0.4rem; + background: transparent; + color: #666; + border: none; + border-radius: 4px; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + transition: all 0.2s; + flex-shrink: 0; +} + +.btn-search:hover { + background: #e9ecef; + color: var(--primary-color, #007bff); +} + +.btn-search svg { + display: block; } .btn-xs { @@ -1016,13 +1049,18 @@ flex-direction: column; } - .filter-group { + .search-container { min-width: 100%; } - .search-group { - flex-direction: column; - align-items: stretch; + .search-bar { + flex-wrap: wrap; + padding: 0.5rem; + } + + .active-filters-inline { + width: 100%; + padding: 0 0 0.5rem 0; } .notes-grid { @@ -1037,6 +1075,10 @@ .notes-table { font-size: 0.85rem; } + + .folder-sidebar { + width: 200px; + } } /* Modal styles */