Skip to content

Commit 70f31ed

Browse files
fix(ui): fix invisible text on book back and modal in dark mode
1 parent 8e9d4b1 commit 70f31ed

2 files changed

Lines changed: 34 additions & 4 deletions

File tree

‎frontend/css/style.css‎

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1170,6 +1170,36 @@ main {
11701170
color: var(--text-main);
11711171
}
11721172

1173+
/* Theme-safe modal sub-elements */
1174+
.modal-section-title,
1175+
.purchase-header,
1176+
.purchase-links-box,
1177+
.emotion-tagging-section {
1178+
color: var(--text-main);
1179+
}
1180+
1181+
.emotion-tag {
1182+
display: inline-flex;
1183+
align-items: center;
1184+
gap: 5px;
1185+
padding: 5px 12px;
1186+
border-radius: 20px;
1187+
font-size: 0.82rem;
1188+
cursor: pointer;
1189+
border: 1px solid var(--control-border);
1190+
background: var(--surface-soft);
1191+
color: var(--text-main);
1192+
transition: all 0.2s ease;
1193+
margin: 3px 2px;
1194+
}
1195+
1196+
.emotion-tag:hover,
1197+
.emotion-tag.active {
1198+
background: var(--accent-gold);
1199+
color: #2c2420;
1200+
border-color: var(--accent-gold);
1201+
}
1202+
11731203
.modal-actions {
11741204
margin-top: auto;
11751205
display: flex;

‎frontend/js/app.js‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,8 @@ class BookRenderer {
683683
<div class="book__face book__face--bottom"></div>
684684
<div class="book__face book__face--back">
685685
<div style="overflow-y: auto; height: 100%; padding-right: 5px; scrollbar-width: thin;">
686-
<div style="font-weight: bold; font-size: 0.9rem; margin-bottom: 0.5rem; color: var(--text-main);">${safeTitle}</div>
687-
<div class="handwritten-note" style="margin-bottom: 0.8rem; font-style: italic; color: var(--wood-dark);">${safeVibe}</div>
686+
<div style="font-weight: bold; font-size: 0.9rem; margin-bottom: 0.5rem; color: #2c2420;">${safeTitle}</div>
687+
<div class="handwritten-note" style="margin-bottom: 0.8rem; font-style: italic; color: #5d4037;">${safeVibe}</div>
688688
${bookData.moods && bookData.moods.length > 0 ? `
689689
<div class="book-mood-tags" style="margin-bottom: 0.8rem; display: flex; flex-wrap: wrap; gap: 4px;">
690690
${bookData.moods.map(m => `<span style="font-size: 0.6rem; background: rgba(0,0,0,0.1); padding: 2px 6px; border-radius: 10px;"><i class="fa-solid ${this.getMoodIcon(m)}"></i> ${m}</span>`).join('')}
@@ -1029,11 +1029,11 @@ class BookRenderer {
10291029
const emotionContainer = document.createElement('div');
10301030
emotionContainer.className = 'emotion-tagging-section';
10311031
emotionContainer.innerHTML = `
1032-
<h3 class="modal-section-title">How does this book make you feel?</h3>
1032+
<h3 class="modal-section-title" style="color: var(--text-main); font-family: 'Playfair Display', serif; font-size: 1rem; margin-bottom: 10px;">How does this book make you feel?</h3>
10331033
<div class="emotion-tags-container">
10341034
${['Melancholic', 'Cozy', 'Tense', 'Inspiring', 'Whimsical', 'Dark', 'Adventurous'].map(mood => {
10351035
const isActive = book.moods && book.moods.includes(mood);
1036-
return `<span class="emotion-tag ${isActive ? 'active' : ''}" data-mood="${mood}">
1036+
return `<span class="emotion-tag ${isActive ? 'active' : ''}" data-mood="${mood}" style="color: var(--text-main); border-color: var(--control-border);">
10371037
<i class="fa-solid ${this.getMoodIcon(mood)}"></i> ${mood}
10381038
</span>`;
10391039
}).join('')}

0 commit comments

Comments
 (0)