fix: preserve wood paneling on dashboard refresh and improve colors
- Fix View All link flashing by preserving data-wood attribute when dashboard re-renders - Update wood-dark text color to match wood-mahogany (#f5f5f5) for better consistency - Add smart link colors for wood paneling (#0066cc for light wood, #66ccff for dark woods) - Fix carousel arrow gradients to be less harsh on wood backgrounds (0.6 for light, 0.3 for dark) - Remove accent color preservation rule that was conflicting with wood-specific link colors
This commit is contained in:
@@ -128,6 +128,9 @@ async function switchLibrary(libraryId: string): Promise<void> {
|
||||
function renderCollections(sections: SectionData[]): void {
|
||||
const container = document.getElementById('collections-container') as HTMLElement;
|
||||
if (!container) return;
|
||||
|
||||
// Preserve wood paneling attribute
|
||||
const currentWood = container.getAttribute('data-wood');
|
||||
|
||||
container.innerHTML = sections.map(section => `
|
||||
<div class="dashboard-collection mb-8" data-collection-id="${section.id}">
|
||||
@@ -178,6 +181,10 @@ function renderCollections(sections: SectionData[]): void {
|
||||
</div>
|
||||
</div>
|
||||
`).join('');
|
||||
|
||||
if(currentWood) {
|
||||
container.setAttribute('data-wood', currentWood)
|
||||
}
|
||||
}
|
||||
|
||||
function renderBookCard(book: BookInfo): string {
|
||||
|
||||
Reference in New Issue
Block a user