1
Fork 0
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:
Steffo 2018-08-08 18:32:41 +02:00
parent fa1c93b3f3
commit 6510b59ecd
5 changed files with 74 additions and 28 deletions

37
db.py
View file

@ -871,6 +871,43 @@ class Event(Base):
self.time = datetime.datetime.now() + value 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 run as script, create all the tables in the db
if __name__ == "__main__": if __name__ == "__main__":
print("Creating new tables...") print("Creating new tables...")

View file

@ -147,7 +147,7 @@ nav {
margin-left: 4px; margin-left: 4px;
margin-right: 4px; margin-right: 4px;
&.upper-box { .upper-box {
margin-top: 4px; margin-top: 4px;
border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;
background-color: rgba(red(@text-color), green(@text-color), blue(@text-color), 0.2); background-color: rgba(red(@text-color), green(@text-color), blue(@text-color), 0.2);
@ -156,7 +156,7 @@ nav {
font-weight: bold; font-weight: bold;
} }
&.lower-box { .lower-box {
margin-bottom: 4px; margin-bottom: 4px;
border-radius: 0 0 4px 4px; border-radius: 0 0 4px 4px;
} }

View file

@ -10,31 +10,38 @@
</h1> </h1>
<div class="main-page"> <div class="main-page">
<div class="left"> <div class="left">
<div class="box upper-box"> <div class="box">
<div class="upper-box">
Prossimi eventi Prossimi eventi
</div> </div>
<div class="box lower-box"> <div class="lower-box">
{% for event in next_events %} {% for event in next_events %}
{% include "/components/event.html" %} {% include "/components/event.html" %}
{% endfor %}
</div>
<div class="box upper-box">
Pagine Wiki
</div>
<div class="box lower-box">
<ul>
{% for page in wiki_pages %}
<li><a href="/wiki/{{ page.key }}">{{ page.key }}</a></li>
{% endfor %} {% endfor %}
</ul> </div>
</div> </div>
<div class="box upper-box"> <div class="box">
Citazione casuale dal diario <div class="upper-box">
Pagine Wiki
</div>
<div class="lower-box">
<ul>
{% for page in wiki_pages %}
<li><a href="/wiki/{{ page.key }}">{{ page.key }}</a></li>
{% endfor %}
</ul>
</div>
</div> </div>
<div class="box lower-box"> <div class="box">
{% include "components/diarioentry.html" %} <div class="upper-box">
<a href="/diario">Visualizza tutto</a> Citazione casuale dal diario
</div>
<div class="lower-box">
{% include "components/diarioentry.html" %}
<a href="/diario">Visualizza tutto</a>
</div>
</div> </div>
</div> </div>
<div class="right"> <div class="right">
<div class="box upper-box"> <div class="box upper-box">

View file

@ -1,7 +1,7 @@
<style> <style>
@font-face { @font-face {
font-family: "Radiance"; 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-style: normal;
font-weight: normal; font-weight: normal;
} }

View file

@ -23,11 +23,13 @@
Profilo di {{ ryg.username }} {% if session.get('user_id', '') == ryg.id %}<a href="{{ url_for('page_editprofile') }}" id="edit-css">Modifica</a>{% endif %} Profilo di {{ ryg.username }} {% if session.get('user_id', '') == ryg.id %}<a href="{{ url_for('page_editprofile') }}" id="edit-css">Modifica</a>{% endif %}
</h1> </h1>
{% if css.bio %} {% if css.bio %}
<div class="box upper-box"> <div class="box">
Bio <div class="upper-box">
</div> Bio
<div class="box lower-box"> </div>
{{ css.bio }} <div class="lower-box">
{{ css.bio }}
</div>
</div> </div>
{% endif %} {% endif %}
<div class="game-panels"> <div class="game-panels">