-
- {% for page in wiki_pages %}
-
- {{ page.key }} +
-
+ {% for page in wiki_pages %}
+
- {{ page.key }} + {% endfor %} +
diff --git a/db.py b/db.py index 255e8ef3..15b226bc 100644 --- a/db.py +++ b/db.py @@ -871,6 +871,43 @@ class Event(Base): self.time = datetime.datetime.now() + value +class GameProgress(enum.Enum): + NOT_STARTED = 0 + IN_PROGRESS = 1 + BEATEN = 2 + COMPLETED = 3 + MASTERED = 4 + + +class GameOrigins(enum.Enum): + DIGITAL = 0 + PHYSICAL = 1 + SOLD = 2 + BORROWED = 3 + RENTED = 4 + MYSTERIOUS = 5 # yarr + + +class LibraryGame(Base): + __tablename__ = "librarygames" + + owner_id = Column(Integer, ForeignKey("royals_id"), nullable=False) + owner = relationship("Royal", lazy="joined") + name = Column(String) + platform = Column(String) + steam_game_id = Column(BigInteger) + progress = Column(Enum(GameProgress), default=GameProgress.NOT_STARTED) + progress_notes = Column(Text) + time_played = Column(Float) + rating = Column(Integer) + review = Column(Text) + origin = Column(Enum(GameOrigins)) + physical = Column(Boolean, default=False) + current_achievements = Column(Integer) + maximum_achievements = Column(Integer) + extra_notes = Column(Text) + + # If run as script, create all the tables in the db if __name__ == "__main__": print("Creating new tables...") diff --git a/static/nryg.less b/static/nryg.less index 8078184c..6c071a63 100644 --- a/static/nryg.less +++ b/static/nryg.less @@ -147,7 +147,7 @@ nav { margin-left: 4px; margin-right: 4px; - &.upper-box { + .upper-box { margin-top: 4px; border-radius: 4px 4px 0 0; background-color: rgba(red(@text-color), green(@text-color), blue(@text-color), 0.2); @@ -156,7 +156,7 @@ nav { font-weight: bold; } - &.lower-box { + .lower-box { margin-bottom: 4px; border-radius: 0 0 4px 4px; } diff --git a/templates/main.html b/templates/main.html index b4835195..34608311 100644 --- a/templates/main.html +++ b/templates/main.html @@ -10,31 +10,38 @@