mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
Add ryg mini
This commit is contained in:
parent
b2054817b7
commit
f3627552d3
4 changed files with 49 additions and 0 deletions
2
db.py
2
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):
|
||||
|
|
|
@ -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;
|
||||
}
|
16
templates/minis/ryg.html
Normal file
16
templates/minis/ryg.html
Normal file
|
@ -0,0 +1,16 @@
|
|||
<div class="game-panel">
|
||||
<div class="game-grid ryg">
|
||||
<div class="player">
|
||||
<span class="player-name">{{ royal.username }}</span>
|
||||
</div>
|
||||
<div class="member-status">
|
||||
<span class="role">{{ royal.role }}</span> dal <span class="member-since">{% if royal.member_since %}{{ royal.member_since }}{% else %}????-??-??{% endif %}</span>
|
||||
</div>
|
||||
<div class="game-title fiorygi">
|
||||
Fiorygi
|
||||
</div>
|
||||
<div class="game-score fiorygi">
|
||||
{{ royal.fiorygi }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
|
@ -18,6 +18,7 @@
|
|||
<h1>
|
||||
Profilo di {{ royal.username }} {% if session.get('user_id', '') == royal.id %}<a href="/setcss" id="edit-css">Modifica</a>{% endif %}
|
||||
</h1>
|
||||
{% include "minis/ryg.html" %}
|
||||
{% if steam %}
|
||||
{% include "minis/steam.html" %}
|
||||
{% endif %}
|
||||
|
|
Loading…
Reference in a new issue