mirror of
https://github.com/RYGhub/royalnet.git
synced 2024-11-27 13:34:28 +00:00
idk some stuff
This commit is contained in:
parent
fa1c93b3f3
commit
6510b59ecd
5 changed files with 74 additions and 28 deletions
37
db.py
37
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...")
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -10,32 +10,39 @@
|
|||
</h1>
|
||||
<div class="main-page">
|
||||
<div class="left">
|
||||
<div class="box upper-box">
|
||||
<div class="box">
|
||||
<div class="upper-box">
|
||||
Prossimi eventi
|
||||
</div>
|
||||
<div class="box lower-box">
|
||||
<div class="lower-box">
|
||||
{% for event in next_events %}
|
||||
{% include "/components/event.html" %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="box upper-box">
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="upper-box">
|
||||
Pagine Wiki
|
||||
</div>
|
||||
<div class="box lower-box">
|
||||
<div class="lower-box">
|
||||
<ul>
|
||||
{% for page in wiki_pages %}
|
||||
<li><a href="/wiki/{{ page.key }}">{{ page.key }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
<div class="box upper-box">
|
||||
</div>
|
||||
<div class="box">
|
||||
<div class="upper-box">
|
||||
Citazione casuale dal diario
|
||||
</div>
|
||||
<div class="box lower-box">
|
||||
<div class="lower-box">
|
||||
{% include "components/diarioentry.html" %}
|
||||
<a href="/diario">Visualizza tutto</a>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="right">
|
||||
<div class="box upper-box">
|
||||
Membri
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<style>
|
||||
@font-face {
|
||||
font-family: "Radiance";
|
||||
src: url("http://cdn.dota2.com/apps/dota2/fonts/radiance.eot?#iefix") format("embedded-opentype"), url("http://cdn.dota2.com/apps/dota2/fonts/radiance.woff") format("woff"), url("http://cdn.dota2.com/apps/dota2/fonts/radiance.ttf") format("truetype"), url("http://cdn.dota2.com/apps/dota2/fonts/radiance.svg#ywftsvg") format("svg");
|
||||
src: url("https://cdn.dota2.com/apps/dota2/fonts/radiance.eot?#iefix") format("embedded-opentype"), url("https://cdn.dota2.com/apps/dota2/fonts/radiance.woff") format("woff"), url("https://cdn.dota2.com/apps/dota2/fonts/radiance.ttf") format("truetype"), url("https://cdn.dota2.com/apps/dota2/fonts/radiance.svg#ywftsvg") format("svg");
|
||||
font-style: normal;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
|
|
@ -23,12 +23,14 @@
|
|||
Profilo di {{ ryg.username }} {% if session.get('user_id', '') == ryg.id %}<a href="{{ url_for('page_editprofile') }}" id="edit-css">Modifica</a>{% endif %}
|
||||
</h1>
|
||||
{% if css.bio %}
|
||||
<div class="box upper-box">
|
||||
<div class="box">
|
||||
<div class="upper-box">
|
||||
Bio
|
||||
</div>
|
||||
<div class="box lower-box">
|
||||
<div class="lower-box">
|
||||
{{ css.bio }}
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="game-panels">
|
||||
{% with record = ryg %}
|
||||
|
|
Loading…
Reference in a new issue