1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

Crea nuova mini per ryg

This commit is contained in:
Steffo 2019-02-14 21:23:14 +01:00
parent b8511344af
commit 208e4ac21f
3 changed files with 123 additions and 27 deletions

1
db.py
View file

@ -121,6 +121,7 @@ class Royal(Base, Mini):
role = Column(String)
fiorygi = Column(Integer, default=0)
member_since = Column(Date)
special_title = Column(String)
_mini_full_name = "Royalnet"
_mini_name = "ryg"

View file

@ -723,31 +723,78 @@ img {
.ryg {
background-color: rgba(red(@text-color), green(@text-color), blue(@text-color), 0.1);
padding: 18px;
grid-template-columns: 80% 20%;
grid-template-rows: 32px 16px 16px 36px;
grid-template-columns: 33.3% 33.3% 33.3%;
.player {
.username {
grid-row: 1;
grid-column-start: 1;
grid-column-end: 3;
font-weight: bold;
grid-column: 1 / 3;
font-size: x-large;
align-self: center;
justify-self: flex-start;
}
.member-status {
.special-title {
grid-row: 1;
grid-column: 3;
font-size: small;
align-self: center;
justify-self: flex-end;
font-style: italic;
color: @accent-color;
}
.join-date-title {
grid-row: 3;
grid-column: 1;
grid-row-start: 2;
grid-row-end: 4;
font-size: x-large;
margin-top: auto;
margin-bottom: auto;
font-size: xx-small;
align-self: center;
justify-self: center;
}
.join-date {
grid-row: 4;
grid-column: 1;
font-size: large;
align-self: center;
justify-self: center;
}
.wiki-edits-title {
grid-row: 3;
grid-column: 2;
font-size: xx-small;
align-self: center;
justify-self: center;
}
.wiki-edits {
grid-row: 4;
grid-column: 2;
font-size: large;
align-self: center;
justify-self: center;
}
.fiorygi-title {
grid-row: 3;
grid-column: 3;
font-size: xx-small;
align-self: center;
justify-self: center;
}
.fiorygi {
grid-column: 2;
text-align: center;
grid-row: 4;
grid-column: 3;
font-size: large;
align-self: center;
justify-self: center;
}
.fiorygi.game-score {
font-size: x-large;
.unknown {
opacity: 0.3;
}
}

View file

@ -1,16 +1,64 @@
<div class="game-panel">
<div class="game-grid ryg">
<div class="player">
<span class="player-name"><a href="https://ryg.steffo.eu/profile/{{ record.username }}">{{ record.username }}</a></span>
<div class="game-grid ryg role-{{ record.role }}">
<div class="username">
<a href="{{ url_for("page_profile", name=record.username) }}">{{ record.username }}</a>
</div>
<div class="member-status">
<span class="role">{{ record.role }}</span> dal <span class="member-since">{% if record.member_since %}{{ record.member_since }}{% else %}????-??-??{% endif %}</span>
{% if record.special_title %}
<div class="special-title">
{{ record.special_title }}
</div>
<div class="game-title fiorygi">
{% endif %}
{% if record.username == "Steffo" %}
<div class="join-date-title steffo">
Admin dall'
</div>
<div class="join-date steffo">
inizio!
</div>
{% elif record.member_since %}
<div class="join-date-title member">
{{ record.role }} dal
</div>
<div class="join-date member">
{{ record.member_since.isoformat() }}
</div>
{% else %}
<div class="join-date-title unknown">
{{ record.role }} dal
</div>
<div class="join-date unknown" title="Data di unione sconosciuta.">
---
</div>
{% endif %}
{% if record.wiki_edits|length > 0 %}
<div class="wiki-edits-title">
Contributi wiki
</div>
<div class="wiki-edits">
{{ record.wiki_edits|length }}
</div>
{% else %}
<div class="wiki-edits-title unknown">
Contributi wiki
</div>
<div class="wiki-edits unknown">
---
</div>
{% endif %}
{% if record.fiorygi > 0 %}
<div class="fiorygi-title">
Fiorygi
</div>
<div class="game-score fiorygi">
<div class="fiorygi">
{{ record.fiorygi }}
</div>
{% else %}
<div class="fiorygi-title unknown">
Fiorygi
</div>
<div class="fiorygi unknown">
---
</div>
{% endif %}
</div>
</div>