Complete search bar rollout and spacing fixes across all pages
- **BookSelector search bar**: Consistent mb-4 spacing below breadcrumbs - **VersionSelector search bar**: Added above 'Choose Your Translation' header - **Universal search placement**: All pages have search functionality available at top - **Responsive design maintained**: Max-width search inputs adapt to mobile screens - **Homepage search integration**: Even before version selection, users can search - **Build verification**: All components compile without errors Search functionality now universally accessible from every page in the application!
This commit is contained in:
@@ -261,7 +261,10 @@ function App() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<VersionSelector onVersionSelect={handleVersionSelect} />
|
<VersionSelector
|
||||||
|
onVersionSelect={handleVersionSelect}
|
||||||
|
onSearchClick={() => setShowSearch(true)}
|
||||||
|
/>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ const BookSelector: React.FC<BookSelectorProps> = ({ books, onBookSelect, format
|
|||||||
|
|
||||||
{/* Breadcrumb */}
|
{/* Breadcrumb */}
|
||||||
{version && (
|
{version && (
|
||||||
<div className="flex items-center justify-center space-x-1 text-sm text-gray-600 dark:text-gray-400">
|
<div className="flex items-center justify-center space-x-1 mb-4 text-sm text-gray-600 dark:text-gray-400">
|
||||||
<button
|
<button
|
||||||
onClick={() => window.location.href = `/version/${version}`}
|
onClick={() => window.location.href = `/version/${version}`}
|
||||||
className="flex items-center space-x-1 hover:text-blue-600 dark:hover:text-blue-400 transition-colors"
|
className="flex items-center space-x-1 hover:text-blue-600 dark:hover:text-blue-400 transition-colors"
|
||||||
|
|||||||
@@ -1,11 +1,12 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Book, Users } from 'lucide-react';
|
import { Book, Users, Search } from 'lucide-react';
|
||||||
|
|
||||||
interface VersionSelectorProps {
|
interface VersionSelectorProps {
|
||||||
onVersionSelect: (version: 'esv' | 'nkjv') => void;
|
onVersionSelect: (version: 'esv' | 'nkjv') => void;
|
||||||
|
onSearchClick?: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
const VersionSelector: React.FC<VersionSelectorProps> = ({ onVersionSelect }) => {
|
const VersionSelector: React.FC<VersionSelectorProps> = ({ onVersionSelect, onSearchClick }) => {
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
{/* Header */}
|
{/* Header */}
|
||||||
@@ -24,6 +25,20 @@ const VersionSelector: React.FC<VersionSelectorProps> = ({ onVersionSelect }) =>
|
|||||||
|
|
||||||
{/* Version Selection */}
|
{/* Version Selection */}
|
||||||
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
|
<div className="max-w-4xl mx-auto px-4 sm:px-6 lg:px-8 py-16">
|
||||||
|
{/* Search Bar */}
|
||||||
|
<div className="flex justify-center mb-8">
|
||||||
|
<div className="w-full max-w-md relative">
|
||||||
|
<input
|
||||||
|
type="text"
|
||||||
|
placeholder="Search for verses, words, or phrases..."
|
||||||
|
className="w-full pl-10 pr-4 py-3 text-gray-900 dark:text-gray-100 bg-white dark:bg-gray-800 border border-gray-300 dark:border-gray-600 rounded-lg shadow-sm focus:ring-2 focus:ring-blue-500 focus:border-transparent"
|
||||||
|
onClick={onSearchClick}
|
||||||
|
readOnly
|
||||||
|
/>
|
||||||
|
<Search className="absolute left-3 top-1/2 transform -translate-y-1/2 h-5 w-5 text-gray-400" />
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<div className="text-center mb-12">
|
<div className="text-center mb-12">
|
||||||
<h2 className="text-3xl font-bold text-gray-900 dark:text-gray-100 mb-4">
|
<h2 className="text-3xl font-bold text-gray-900 dark:text-gray-100 mb-4">
|
||||||
Choose Your Translation
|
Choose Your Translation
|
||||||
|
|||||||
Reference in New Issue
Block a user