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

CSS improvements

This commit is contained in:
Steffo 2018-09-07 18:58:19 +02:00
parent c42950f733
commit 04ea3ea86e
3 changed files with 72 additions and 55 deletions

View file

@ -11,6 +11,7 @@ body {
font-family: sans-serif; font-family: sans-serif;
color: @text-color; color: @text-color;
background-color: @background-color; background-color: @background-color;
box-sizing: border-box;
} }
h1, h2, h3, h4, h5, h6 { h1, h2, h3, h4, h5, h6 {
@ -772,6 +773,22 @@ nav {
} }
} }
.profile {
width: 380px;
margin-left: auto;
margin-right: auto;
@media (min-width: 792px)
{
width: 776px;
}
@media (min-width: 1180px)
{
width: 1164px;
}
}
#edit-css { #edit-css {
font-size: medium; font-size: medium;
} }

View file

@ -22,8 +22,9 @@
<h1> <h1>
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>
<div class="profile">
{% if css.bio %} {% if css.bio %}
<div class="box"> <div class="box bio">
<div class="upper-box"> <div class="upper-box">
Bio Bio
</div> </div>
@ -56,11 +57,6 @@
{% include "minis/dota.html" %} {% include "minis/dota.html" %}
{% endwith %} {% endwith %}
{% endif %} {% endif %}
{# if rl %}
{% with record = rl %}
{% include "minis/rl.html" %}
{% endwith %}
{% endif #}
{% if osu %} {% if osu %}
{% with record = osu %} {% with record = osu %}
{% include "minis/osu.html" %} {% include "minis/osu.html" %}
@ -77,4 +73,5 @@
{% endwith %} {% endwith %}
{% endif %} {% endif %}
</div> </div>
</div>
{% endblock %} {% endblock %}

View file

@ -87,8 +87,11 @@ def page_profile(name: str):
tg = db_session.query(db.Telegram).filter_by(royal=user).one_or_none() tg = db_session.query(db.Telegram).filter_by(royal=user).one_or_none()
discord = db_session.execute(query_discord_music.one_query, {"royal": user.id}).fetchone() discord = db_session.execute(query_discord_music.one_query, {"royal": user.id}).fetchone()
db_session.close() db_session.close()
if css is not None:
converted_bio = Markup(markdown2.markdown(css.bio.replace("<", "&lt;"), converted_bio = Markup(markdown2.markdown(css.bio.replace("<", "&lt;"),
extras=["spoiler", "tables", "smarty-pants", "fenced-code-blocks"])) extras=["spoiler", "tables", "smarty-pants", "fenced-code-blocks"]))
else:
converted_bio = ""
return render_template("profile.html", ryg=user, css=css, osu=osu, dota=dota, lol=lol, steam=steam, ow=ow, return render_template("profile.html", ryg=user, css=css, osu=osu, dota=dota, lol=lol, steam=steam, ow=ow,
tg=tg, discord=discord, config=config, bio=converted_bio) tg=tg, discord=discord, config=config, bio=converted_bio)