9fddafa423
This pull request implements **Mobile Responsiveness (v3) and a High-Fidelity Overhaul** for the dashboard view layer (`/dashboard`, `/catalog`, `/my-books`, `/profile`), matching the design aesthetics of the production mobile e-reader layout. ### Key Changes 1. **Re-engineered Floating Navigation Dock Capsule:** - Detached bottom capsule, floating 16px off the bottom with rounded `30px` borders. - Glassmorphic look in dark mode (`rgba(26, 26, 30, 0.75)`) and sepia theme in light mode (`rgba(244, 241, 234, 0.9)`). - Removed `translateY` offset on the central "AI" action button (robot icon inside a solid green circle). - Used `::deep` overrides to clean up text colors and icons, preventing browser visited link purple color defaults on `NavLink` items. - Restored compact standalone text labels under the navigation icons. 2. **Dashboard Layout Scale Compression & Fold Optimization:** - Compressed profile header avatar (`40px`), welcome title font size, and status pill spacing. - Compressed the `concepts-linear-stack` height to `120px` with scrolling. - Reduced book cover heights inside `MyBooks` to `200px` on mobile viewports. 3. **Current Reading Widget & Layout Margin Safety:** - Localized the widget button label to `"Kontynuuj czytanie"`. - Used safe area clearances (`calc(1.5rem + 72px + env(safe-area-inset-bottom))`) at the bottom of pages to prevent content from being covered by the capsule. 4. **Resolved Horizontal Layout Width Blowout (Grid Fix):** - Discovered that `.secondary-grid` was using flex layout inherited from desktop rather than grid layout on mobile. - Nowrap paragraphs in the concept list stretched the flex container to over 12,000 pixels wide, breaking the entire dashboard layout width. - Overrode `.secondary-grid` to `display: grid !important` on mobile, properly constraining layout width and allowing nowrap concept text truncation. ### Verification - All code changes compiled successfully under `dotnet build NexusReader.slnx --no-restore` (0 errors). - Validated correct layouts in list view, chart view, and light/dark theme toggles on a Samsung Galaxy S20 Ultra (412x915) viewport. --------- Co-authored-by: Marek Jasiński <jasins.marek@gmail.com> Reviewed-on: #80 Co-authored-by: Antigravity <antigravity@google.com> Co-committed-by: Antigravity <antigravity@google.com>
349 lines
6.9 KiB
CSS
349 lines
6.9 KiB
CSS
.current-reading-card {
|
|
width: 100%;
|
|
padding: 2rem;
|
|
overflow: hidden;
|
|
background: #1a1a1e;
|
|
border: 1px solid rgba(255, 255, 255, 0.05);
|
|
border-radius: 12px;
|
|
transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.current-reading-card:hover {
|
|
background: #1e1e24;
|
|
border-color: rgba(16, 185, 129, 0.2);
|
|
transform: translateY(-4px);
|
|
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
|
|
}
|
|
|
|
.card-layout {
|
|
display: flex;
|
|
gap: 2.5rem;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.book-cover {
|
|
width: 140px;
|
|
flex-shrink: 0;
|
|
position: relative;
|
|
}
|
|
|
|
.book-cover img {
|
|
width: 100%;
|
|
border-radius: 12px;
|
|
box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
|
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
transition: transform 0.3s ease;
|
|
}
|
|
|
|
.book-cover:hover img {
|
|
transform: translateY(-5px);
|
|
}
|
|
|
|
.book-details {
|
|
flex: 1;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1.25rem;
|
|
min-width: 0; /* Important for ellipsis */
|
|
}
|
|
|
|
.header-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.book-title {
|
|
font-family: var(--nexus-font-serif);
|
|
font-size: 1.75rem;
|
|
font-weight: 700;
|
|
color: #FFFFFF;
|
|
margin: 0;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.author-name {
|
|
font-size: 0.9rem;
|
|
color: #a1a1aa;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.chapter-progress {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.progress-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.chapter-name {
|
|
color: #FFFFFF;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.percentage {
|
|
color: #10b981;
|
|
}
|
|
|
|
.progress-bar-container {
|
|
height: 6px;
|
|
background: rgba(255, 255, 255, 0.05);
|
|
border-radius: 100px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.progress-bar-fill {
|
|
height: 100%;
|
|
background: #10b981;
|
|
box-shadow: 0 0 10px rgba(16, 185, 129, 0.4);
|
|
border-radius: 100px;
|
|
transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
|
|
}
|
|
|
|
.book-excerpt {
|
|
font-size: 0.95rem;
|
|
line-height: 1.6;
|
|
color: #a1a1aa;
|
|
margin: 0;
|
|
display: -webkit-box;
|
|
-webkit-line-clamp: 3;
|
|
-webkit-box-orient: vertical;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.book-excerpt.empty {
|
|
font-style: italic;
|
|
opacity: 0.7;
|
|
}
|
|
|
|
.actions {
|
|
margin-top: 0.5rem;
|
|
}
|
|
|
|
.btn-nexus {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 0.75rem;
|
|
padding: 0.8rem 1.5rem;
|
|
border-radius: 8px;
|
|
font-size: 0.9rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
|
|
border: none;
|
|
}
|
|
|
|
.btn-nexus.outline {
|
|
background: transparent;
|
|
color: #10b981;
|
|
border: 1px solid rgba(16, 185, 129, 0.3);
|
|
}
|
|
|
|
.btn-nexus.outline:hover {
|
|
background: rgba(16, 185, 129, 0.05);
|
|
border-color: #10b981;
|
|
transform: translateY(-2px);
|
|
box-shadow: 0 5px 15px rgba(16, 185, 129, 0.1);
|
|
}
|
|
|
|
.btn-nexus.primary {
|
|
background: #10b981;
|
|
color: #000;
|
|
}
|
|
|
|
.btn-nexus.primary:hover {
|
|
transform: translateY(-2px);
|
|
filter: brightness(1.1);
|
|
box-shadow: 0 5px 15px rgba(16, 185, 129, 0.2);
|
|
}
|
|
|
|
/* Empty State */
|
|
.empty-state {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 1.5rem;
|
|
padding: 2rem;
|
|
text-align: center;
|
|
}
|
|
|
|
.empty-icon {
|
|
color: #10b981;
|
|
opacity: 0.3;
|
|
filter: drop-shadow(0 0 10px rgba(16, 185, 129, 0.2));
|
|
}
|
|
|
|
.empty-text h3 {
|
|
color: #FFFFFF;
|
|
margin: 0 0 0.5rem 0;
|
|
}
|
|
|
|
.empty-text p {
|
|
color: #A0A0A0;
|
|
margin: 0;
|
|
}
|
|
|
|
@media (max-width: 767px) {
|
|
.current-reading-card {
|
|
background: #1e1e22; /* Lighter anthracite slate for depth */
|
|
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3); /* Ambient card shadow */
|
|
padding: 14px;
|
|
border-radius: 16px;
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.card-layout {
|
|
flex-direction: column;
|
|
align-items: stretch;
|
|
text-align: left;
|
|
gap: 0.75rem;
|
|
}
|
|
|
|
.book-cover {
|
|
align-self: center;
|
|
width: 90px;
|
|
}
|
|
|
|
.book-details {
|
|
width: 100%;
|
|
text-align: left;
|
|
}
|
|
|
|
.book-title {
|
|
font-size: 1.25rem;
|
|
text-align: left;
|
|
white-space: normal;
|
|
}
|
|
|
|
.author-name {
|
|
text-align: left;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.header-info, .chapter-progress {
|
|
align-items: stretch;
|
|
}
|
|
|
|
.chapter-name {
|
|
white-space: normal;
|
|
font-size: 0.8rem;
|
|
}
|
|
|
|
.chapter-progress {
|
|
margin: 0.5rem 0; /* Margin separator before tracking bar */
|
|
width: 100%;
|
|
}
|
|
|
|
.progress-bar-container {
|
|
width: 100%;
|
|
}
|
|
|
|
.book-excerpt {
|
|
display: -webkit-box; /* Normal display to wrap synopsis */
|
|
overflow: hidden;
|
|
-webkit-line-clamp: 2;
|
|
-webkit-box-orient: vertical;
|
|
margin-bottom: 0.75rem;
|
|
text-align: left;
|
|
font-size: 0.85rem;
|
|
}
|
|
|
|
.actions {
|
|
width: 100%;
|
|
margin-top: 0.25rem;
|
|
}
|
|
|
|
.actions .btn-nexus.outline {
|
|
width: 100%;
|
|
justify-content: center;
|
|
padding: 0.75rem 1.25rem; /* Larger touch target */
|
|
box-sizing: border-box;
|
|
background: transparent !important;
|
|
color: var(--accent) !important;
|
|
border: 1px solid var(--accent) !important;
|
|
display: inline-flex !important;
|
|
align-items: center !important;
|
|
font-weight: 600 !important;
|
|
}
|
|
|
|
.actions .btn-nexus.outline:hover {
|
|
background: var(--accent-glow) !important;
|
|
color: var(--accent) !important;
|
|
}
|
|
|
|
.theme-light .current-reading-card {
|
|
background: #ffffff; /* Pure white card surface for light theme */
|
|
box-shadow: 0 12px 24px rgba(139, 130, 115, 0.12);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
/* ============================================================
|
|
LIGHT THEME OVERRIDES — "Warm Paper / Soft Sepia"
|
|
============================================================ */
|
|
|
|
.theme-light .current-reading-card {
|
|
background: var(--bg-surface);
|
|
border: 1px solid var(--border);
|
|
}
|
|
|
|
.theme-light .current-reading-card:hover {
|
|
background: var(--bg-surface);
|
|
border-color: var(--accent);
|
|
box-shadow: 0 10px 30px rgba(139, 130, 115, 0.12);
|
|
}
|
|
|
|
.theme-light .book-cover img {
|
|
box-shadow: 0 15px 35px rgba(139, 130, 115, 0.18);
|
|
border: 1px solid rgba(0, 0, 0, 0.06);
|
|
}
|
|
|
|
.theme-light .book-title {
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.theme-light .author-name {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.theme-light .chapter-name {
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.theme-light .progress-bar-container {
|
|
background: #e4e1d9;
|
|
}
|
|
|
|
.theme-light .progress-bar-fill {
|
|
box-shadow: 0 0 6px rgba(16, 185, 129, 0.2);
|
|
}
|
|
|
|
.theme-light .book-excerpt {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.theme-light .empty-text h3 {
|
|
color: var(--text-main);
|
|
}
|
|
|
|
.theme-light .empty-text p {
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.theme-light .empty-icon {
|
|
color: var(--accent);
|
|
filter: none;
|
|
}
|