super-schizo + super-nomad Notes: auto-grant to superusers; sig unlock; navbar titles — TDD

- drama/models.py: _NOTE_DISPLAY dict; Note.display_title / .display_greeting
  properties; super-schizo → "21st Century" + "Schizoid Man";
  super-nomad → "Howdy," + "Stranger"
- billboard/views.py: _NOTE_META super-schizo/nomad entries with mark_safe
  HTML descriptions ("card-ref"-styled card names), swatch_label "I"/"0",
  no palette_options; swatch_label added to note_items context
- lyric/models.py post_save: new superusers get super-schizo + super-nomad
  Notes automatically; setup_sig_session grants them explicitly too
- epic/models.py _filter_major_unlocks: accepts super-nomad / super-schizo
  as valid unlocks alongside their plain counterparts
- _navbar.html: display_greeting|safe + display_title replace slug|capfirst
- my_notes.html: note-item__image-box--label branch for swatch_label
- _note.scss: .note-item__image-box--label modifier (bold italic, solid border)
- _base.scss: .ord global ordinal superscript class (21st etc.)
- ITs: SuperuserNoteGrantTest (3); SigSelectRenderingTest +2 (super- variants)

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-28 01:30:02 -04:00
parent 1c2b8f96ab
commit 6ad736413b
11 changed files with 98 additions and 4 deletions

View File

@@ -170,6 +170,15 @@ def record(room, verb, actor=None, **data):
return GameEvent.objects.create(room=room, actor=actor, verb=verb, data=data)
_NOTE_DISPLAY = {
"stargazer": {"greeting": "Welcome,", "title": "Stargazer"},
"schizo": {"greeting": "Welcome,", "title": "Schizo"},
"nomad": {"greeting": "Welcome,", "title": "Nomad"},
"super-schizo": {"greeting": "21<span class='ord'>st</span> Century", "title": "Schizoid Man"},
"super-nomad": {"greeting": "Howdy,", "title": "Stranger"},
}
class Note(models.Model):
user = models.ForeignKey(
settings.AUTH_USER_MODEL, on_delete=models.CASCADE,
@@ -186,6 +195,14 @@ class Note(models.Model):
def __str__(self):
return f"{self.user.email}{self.slug}"
@property
def display_title(self):
return _NOTE_DISPLAY.get(self.slug, {}).get("title", self.slug.replace("-", " ").title())
@property
def display_greeting(self):
return _NOTE_DISPLAY.get(self.slug, {}).get("greeting", "Welcome,")
@classmethod
def grant_if_new(cls, user, slug):
from django.utils import timezone