Skip to content

Commit

Permalink
feat(core): Add Higher Math subject to unitgroup
Browse files Browse the repository at this point in the history
  • Loading branch information
vEnhance committed Apr 28, 2024
1 parent c67b2b8 commit e72d668
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 0 deletions.
30 changes: 30 additions & 0 deletions core/migrations/0060_alter_unitgroup_subject.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Generated by Django 4.2.11 on 2024-04-28 19:15

from django.db import migrations, models


class Migration(migrations.Migration):
dependencies = [
("core", "0059_remove_unitgroup_guest_and_more"),
]

operations = [
migrations.AlterField(
model_name="unitgroup",
name="subject",
field=models.CharField(
choices=[
("A", "Algebra (Hufflepuff)"),
("C", "Combinatorics (Gryffindor)"),
("G", "Geometry (Slytherin)"),
("N", "Number Theory (Ravenclaw)"),
("F", "Functional Equations"),
("M", "Miscellaneous"),
("K", "Secret"),
("H", "Higher Math"),
],
help_text="The subject for the unit",
max_length=2,
),
),
]
1 change: 1 addition & 0 deletions core/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ class UnitGroup(models.Model):
("F", "Functional Equations"),
("M", "Miscellaneous"),
("K", "Secret"),
("H", "Higher Math"),
)
subject = models.CharField(
max_length=2, choices=SUBJECT_CHOICES, help_text="The subject for the unit"
Expand Down
6 changes: 6 additions & 0 deletions otisweb/static/css/otis.css
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ table.table tr.subjectN:nth-child(odd) {
table.table tr.subjectM:nth-child(odd) {
background-color: #ffee77;
}
table.table tr.subjectH:nth-child(odd) {
background-color: #fcbffe;
}

table.table tr.subjectG:nth-child(even) {
background-color: #a5f5a5;
Expand All @@ -100,6 +103,9 @@ table.table tr.subjectN:nth-child(even) {
table.table tr.subjectM:nth-child(even) {
background-color: #f5e575;
}
table.table tr.subjectH:nth-child(even) {
background-color: #ecb3ef;
}

table.table tr.unit-locked {
filter: brightness(60%) saturate(60%);
Expand Down

0 comments on commit e72d668

Please sign in to comment.