diff --git a/public/css/style.css b/public/css/style.css index 5f2b2d8..98d8860 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -571,6 +571,8 @@ code { .card-badges { display: flex; + align-items: center; + flex-wrap: wrap; gap: 4px; } @@ -623,20 +625,40 @@ code { border: 1px solid #cbd5e1; } +.btn-exclude, .btn-disinclude { - background: transparent; - border: 1px solid #cbd5e1; - color: var(--text-muted); - font-size: 0.7rem; + font-family: inherit; + font-size: 0.725rem; + font-weight: 600; + line-height: inherit; + display: inline-flex; + align-items: center; padding: 1px 6px; border-radius: 4px; + background: #f1f5f9; + color: #64748b; + border: 1px solid #e2e8f0; cursor: pointer; + transition: all 0.15s ease; + user-select: none; } +.btn-exclude:hover, .btn-disinclude:hover { - background: #f1f5f9; - color: var(--text-main); - border-color: #94a3b8; + background: #e2e8f0; + color: #334155; + border-color: #cbd5e1; +} + +.btn-exclude:active, +.btn-disinclude:active { + background: #cbd5e1; +} + +.btn-exclude:focus-visible, +.btn-disinclude:focus-visible { + outline: 2px solid var(--primary); + outline-offset: 1px; } .assignment-card.is-excluded { diff --git a/public/js/app.js b/public/js/app.js index a2897f9..0599eb9 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -23,8 +23,8 @@ document.addEventListener('DOMContentLoaded', () => { assignmentList.addEventListener('click', async (e) => { const target = e.target; - // Disinclude / Restore button - if (target.classList.contains('btn-disinclude')) { + // Exclude / Restore button + if (target.classList.contains('btn-exclude') || target.classList.contains('btn-disinclude')) { const assignmentId = target.dataset.id; const card = target.closest('.assignment-card'); if (!card) return; @@ -43,8 +43,8 @@ document.addEventListener('DOMContentLoaded', () => { if (data.success && data.stats) { card.dataset.excluded = newExcluded ? 'true' : 'false'; card.classList.toggle('is-excluded', newExcluded); - target.textContent = newExcluded ? 'Restore' : 'Disinclude'; - target.title = newExcluded ? 'Restore this homework to your active list' : 'Disinclude this homework (e.g. from another class)'; + target.textContent = newExcluded ? 'Restore' : 'Exclude'; + target.title = newExcluded ? 'Restore this homework to your active list' : 'Exclude this homework (e.g. from another class)'; const checkbox = card.querySelector('.assignment-toggle'); if (checkbox) checkbox.disabled = newExcluded; @@ -55,7 +55,7 @@ document.addEventListener('DOMContentLoaded', () => { if (badgesContainer) { const b = document.createElement('span'); b.className = 'badge badge-excluded'; - b.textContent = 'Disincluded'; + b.textContent = 'Excluded'; badgesContainer.insertBefore(b, target); } } else if (!newExcluded && badgeExcluded) { @@ -66,7 +66,7 @@ document.addEventListener('DOMContentLoaded', () => { applyFilters(); } } catch (err) { - console.error('Failed to toggle disinclude:', err); + console.error('Failed to toggle exclude:', err); } finally { target.disabled = false; } diff --git a/views/dashboard.ejs b/views/dashboard.ejs index ef1ba59..c0e9019 100644 --- a/views/dashboard.ejs +++ b/views/dashboard.ejs @@ -192,7 +192,7 @@ <% } %> <% if (item.excluded) { %> - Disincluded + Excluded <% } else if (item.completed) { %> Done <% } else if (item.status === 'next-week') { %> @@ -207,11 +207,11 @@