Complete UI improvements: breadcrumbs moved to content, chapter favorites segregated
- **Removed header breadcrumbs** that caused horizontal scrolling on mobile - **Added content-aware breadcrumbs** to each page for better UX: - BookSelector: 'Books' (clickable back to version home) - ChapterSelector: 'Books > [Book Name]' (Books clickable, book name current) - **Chapter favorites version-segregated** - fixed cross-version contamination - **Homepage text updated** 'Both translations' → 'All translations' - **Improved navigation flow** with clean breadcrumb system - **Better mobile experience** no more scrolling required for nav
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import React, { useState, useEffect } from 'react';
|
||||
import { ArrowLeft, FileText, Star } from 'lucide-react';
|
||||
import { ArrowLeft, FileText, Star, ChevronRight } from 'lucide-react';
|
||||
import { getBook } from '../services/api';
|
||||
|
||||
interface ChapterSelectorProps {
|
||||
@@ -144,15 +144,19 @@ const ChapterSelector: React.FC<ChapterSelectorProps> = ({ book, onChapterSelect
|
||||
|
||||
return (
|
||||
<div>
|
||||
{/* Header */}
|
||||
<div className="flex items-center mb-8">
|
||||
{/* Breadcrumb Navigation */}
|
||||
<div className="flex items-center justify-center space-x-1 mb-8">
|
||||
<button
|
||||
onClick={onBack}
|
||||
className="flex items-center space-x-2 text-blue-600 dark:text-blue-400 hover:text-blue-700 dark:hover:text-blue-300 transition-colors"
|
||||
onClick={() => window.location.href = '/'}
|
||||
className="flex items-center space-x-1 text-sm text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors"
|
||||
>
|
||||
<ArrowLeft className="h-5 w-5" />
|
||||
<span>Back to Books</span>
|
||||
<ArrowLeft className="h-4 w-4" />
|
||||
<span>Books</span>
|
||||
</button>
|
||||
<ChevronRight className="h-3 w-3 text-gray-400 dark:text-gray-500" />
|
||||
<span className="text-sm font-medium text-gray-900 dark:text-gray-100">
|
||||
{formatBookName(book)}
|
||||
</span>
|
||||
</div>
|
||||
|
||||
{/* Book Title */}
|
||||
|
||||
Reference in New Issue
Block a user