diff --git a/db.py b/db.py index 581fd30b..a1e0e72d 100644 --- a/db.py +++ b/db.py @@ -26,7 +26,9 @@ class Royal(Base): id = Column(Integer, primary_key=True) username = Column(String, unique=True, nullable=False) password = Column(LargeBinary) + role = Column(String) fiorygi = Column(Integer, default=0) + member_since = Column(DateTime) @staticmethod def create(session: Session, username: str): diff --git a/static/nryg.less b/static/nryg.less index aa769f86..aea5408e 100644 --- a/static/nryg.less +++ b/static/nryg.less @@ -412,6 +412,36 @@ input[type="text"], input[type="password"] { } } +.ryg { + background-color: rgba(red(@accent-color), green(@accent-color), blue(@accent-color), 0.1); + padding: 18px; + grid-template-columns: 80% 20%; + + .player { + grid-row: 1; + grid-column-start: 1; + grid-column-end: 3; + font-weight: bold; + } + + .member-status { + grid-column: 1; + grid-row-start: 2; + grid-row-end: 4; + font-size: x-large; + margin-top: auto; + margin-bottom: auto; + } + + .fiorygi { + grid-column: 2; + } + + .fiorygi.game-score { + font-size: x-large; + } +} + #edit-css { font-size: medium; } \ No newline at end of file diff --git a/templates/minis/ryg.html b/templates/minis/ryg.html new file mode 100644 index 00000000..baa781bf --- /dev/null +++ b/templates/minis/ryg.html @@ -0,0 +1,16 @@ +
+
+
+ {{ royal.username }} +
+
+ {{ royal.role }} dal {% if royal.member_since %}{{ royal.member_since }}{% else %}????-??-??{% endif %} +
+
+ Fiorygi +
+
+ {{ royal.fiorygi }} +
+
+
\ No newline at end of file diff --git a/templates/profile.html b/templates/profile.html index d3a612c3..8c528f2d 100644 --- a/templates/profile.html +++ b/templates/profile.html @@ -18,6 +18,7 @@

Profilo di {{ royal.username }} {% if session.get('user_id', '') == royal.id %}Modifica{% endif %}

+ {% include "minis/ryg.html" %} {% if steam %} {% include "minis/steam.html" %} {% endif %}