1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-30 15:04:18 +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) role = Column(String)
fiorygi = Column(Integer, default=0) fiorygi = Column(Integer, default=0)
member_since = Column(Date) member_since = Column(Date)
special_title = Column(String)
_mini_full_name = "Royalnet" _mini_full_name = "Royalnet"
_mini_name = "ryg" _mini_name = "ryg"

View file

@ -723,31 +723,78 @@ img {
.ryg { .ryg {
background-color: rgba(red(@text-color), green(@text-color), blue(@text-color), 0.1); background-color: rgba(red(@text-color), green(@text-color), blue(@text-color), 0.1);
padding: 18px; 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-row: 1;
grid-column-start: 1; grid-column: 1 / 3;
grid-column-end: 3; font-size: x-large;
font-weight: bold; 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-column: 1;
grid-row-start: 2; font-size: xx-small;
grid-row-end: 4; align-self: center;
font-size: x-large; justify-self: center;
margin-top: auto; }
margin-bottom: auto;
.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 { .fiorygi {
grid-column: 2; grid-row: 4;
text-align: center; grid-column: 3;
font-size: large;
align-self: center;
justify-self: center;
} }
.fiorygi.game-score { .unknown {
font-size: x-large; opacity: 0.3;
} }
} }

View file

@ -1,16 +1,64 @@
<div class="game-panel"> <div class="game-panel">
<div class="game-grid ryg"> <div class="game-grid ryg role-{{ record.role }}">
<div class="player"> <div class="username">
<span class="player-name"><a href="https://ryg.steffo.eu/profile/{{ record.username }}">{{ record.username }}</a></span> <a href="{{ url_for("page_profile", name=record.username) }}">{{ record.username }}</a>
</div> </div>
<div class="member-status"> {% if record.special_title %}
<span class="role">{{ record.role }}</span> dal <span class="member-since">{% if record.member_since %}{{ record.member_since }}{% else %}????-??-??{% endif %}</span> <div class="special-title">
{{ record.special_title }}
</div> </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 Fiorygi
</div> </div>
<div class="game-score fiorygi"> <div class="fiorygi">
{{ record.fiorygi }} {{ record.fiorygi }}
</div> </div>
{% else %}
<div class="fiorygi-title unknown">
Fiorygi
</div>
<div class="fiorygi unknown">
---
</div>
{% endif %}
</div> </div>
</div> </div>