diff --git a/links/templates/links/search_react.html b/links/templates/links/search_react.html index c99daa8..1daed4d 100644 --- a/links/templates/links/search_react.html +++ b/links/templates/links/search_react.html @@ -56,7 +56,7 @@ // Input Component const Input = ({ className = "", ...props }) => ( - @@ -64,7 +64,7 @@ // Select Component const Select = ({ children, className = "", ...props }) => ( - @@ -80,7 +80,7 @@ ghost: "hover:bg-gray-100" }; return ( - @@ -103,10 +103,10 @@ }; const formatDate = (dateString) => { - return new Date(dateString).toLocaleDateString('en-US', { - year: 'numeric', - month: 'short', - day: 'numeric' + return new Date(dateString).toLocaleDateString('en-US', { + year: 'numeric', + month: 'short', + day: 'numeric' }); }; @@ -122,11 +122,11 @@ - + - - + {result.type === 'link' && result.original_url && ( - )} - + {(result.description || result.summary) && ( {result.description || result.summary} )} - + @@ -168,7 +168,7 @@ )} - + {result.tags && result.tags.length > 0 && ( {result.tags.map(tag => ( @@ -180,9 +180,9 @@ )} - + - {/* Header */} - - - Advanced Search - + + + + Advanced Search + + Search through all Links, Pages, and Posts @@ -432,7 +434,7 @@ Previous - + {[...Array(Math.min(5, totalPages))].map((_, i) => { let pageNum; @@ -445,7 +447,7 @@ } else { pageNum = page - 2 + i; } - + return ( Start Searching - Enter a search query to find links, pages, and posts. + Enter a search query to find links, pages, and posts. You can search by title, content, URL, or tags. diff --git a/links/urls.py b/links/urls.py index 48d2604..ec33940 100644 --- a/links/urls.py +++ b/links/urls.py @@ -24,6 +24,7 @@ urlpatterns = [ # Pages path('ui/pages/', page_views.PageListView.as_view(), name='page-list'), + path('ui/new_search/', search_views.SearchReactView.as_view(), name='new_search'), path('ui/pages/new/', page_views.PageCreateView.as_view(), name='page-create'), path('ui/pages//', page_views.PageDetailView.as_view(), name='page-detail'), path('ui/pages//edit/', page_views.PageUpdateView.as_view(), name='page-update'), diff --git a/templates/base.html b/templates/base.html index b312bc4..33dfb89 100644 --- a/templates/base.html +++ b/templates/base.html @@ -91,6 +91,14 @@ {% trans "Menu" %} + + + + + + {% trans "New Search" %} + +
{result.description || result.summary}
Search through all Links, Pages, and Posts
- Enter a search query to find links, pages, and posts. + Enter a search query to find links, pages, and posts. You can search by title, content, URL, or tags.