note title equip: DON/DOFF buttons outside top-left corner; User.active_title FK; don/doff views; greeting updated via JS — TDD

- lyric/models.py: active_title = ForeignKey('drama.Note', null=True, SET_NULL)
- lyric migration 0020_add_active_title
- billboard/views.py: don_title + doff_title views; is_equipped per note_item context
- billboard/urls.py: note/<slug>/don + note/<slug>/doff routes
- _navbar.html: id_greeting_name span; shows active_title.slug|capfirst when set
- my_notes.html: .note-don-doff buttons (DON/DOFF, × when disabled); data-don-url/doff-url/title attrs
- note-page.js: _bindDonDoff() — DON POST sets greeting + swaps btn state; DOFF restores Earthman
- _note.scss: .note-don-doff position:absolute left:-1rem top:0; flex-direction:column gap:1.25rem
- ITs: NoteEquipTitleViewTest (5 tests); UserModelTest.test_active_title_* (3 tests)
- FT: NoteEquipTitleTest.test_don_equips_title_greeting_and_doff_restores

Code architected by Disco DeDisco <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Disco DeDisco
2026-04-23 01:44:58 -04:00
parent 7d4389a74a
commit 214120ef2d
12 changed files with 289 additions and 2 deletions

View File

@@ -60,6 +60,20 @@
@media (min-width: 1200px) { grid-template-columns: repeat(4, 1fr); }
}
// DON/DOFF equip buttons — positioned outside the top-left corner,
// matching the .tt-equip-btns pattern from the game kit tooltip.
.note-don-doff {
position: absolute;
left: -1rem;
top: 0;
display: flex;
flex-direction: column;
gap: 1.25rem;
z-index: 1;
.btn { margin: 0; }
}
.note-item {
position: relative;
display: flex;