Fix profile picture bugs

This commit is contained in:
rubenwardy 2018-12-25 23:02:49 +00:00
parent d44178cb0c
commit 66ee706a6c
4 changed files with 18 additions and 17 deletions

View File

@ -1,6 +1,7 @@
.img-thumbnail-1 { .img-thumbnail-1 {
padding: 0px; padding: 0px;
// width: 100%; // width: 100%;
background: white;
} }
.comments { .comments {

View File

@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}title{% endblock %} - {{ config.USER_APP_NAME }}</title> <title>{% block title %}title{% endblock %} - {{ config.USER_APP_NAME }}</title>
<link rel="stylesheet" type="text/css" href="/static/bootstrap.css"> <link rel="stylesheet" type="text/css" href="/static/bootstrap.css">
<link rel="stylesheet" type="text/css" href="/static/custom.css?v=4"> <link rel="stylesheet" type="text/css" href="/static/custom.css?v=5">
{% block headextra %}{% endblock %} {% block headextra %}{% endblock %}
</head> </head>

View File

@ -5,7 +5,7 @@
<li class="row my-2 mx-0"> <li class="row my-2 mx-0">
<div class="col-md-1 p-1"> <div class="col-md-1 p-1">
<a href="{{ url_for('user_profile_page', username=r.author.username) }}"> <a href="{{ url_for('user_profile_page', username=r.author.username) }}">
<img class="img-responsive user-photo img-thumbnail img-thumbnail-1" src="{{ (r.author.email or '') | gravatar }}"> <img class="img-responsive user-photo img-thumbnail img-thumbnail-1" src="{{ r.author.getProfilePicURL() }}">
</a> </a>
</div> </div>
<div class="col"> <div class="col">
@ -33,7 +33,7 @@
{% if current_user.is_authenticated %} {% if current_user.is_authenticated %}
<div class="row mt-0 mb-4 comments mx-0"> <div class="row mt-0 mb-4 comments mx-0">
<div class="col-md-1 p-1"> <div class="col-md-1 p-1">
<img class="img-responsive user-photo img-thumbnail img-thumbnail-1" src="{{ (current_user.email or '') | gravatar }}"> <img class="img-responsive user-photo img-thumbnail img-thumbnail-1" src="{{ current_user.getProfilePicURL() }}">
</div> </div>
<div class="col"> <div class="col">
<div class="card"> <div class="card">
@ -55,22 +55,22 @@
{% macro render_threadlist(threads, list_group=False) -%} {% macro render_threadlist(threads, list_group=False) -%}
{% if not list_group %}<ul>{% endif %} {% if not list_group %}<ul>{% endif %}
<li {% if list_group %}class="list-group-item"{% endif %}>
{% for t in threads %} {% for t in threads %}
{% if list_group %} <li {% if list_group %}class="list-group-item"{% endif %}>
<a href="{{ url_for('thread_page', id=t.id) }}"> {% if list_group %}
<a href="{{ url_for('thread_page', id=t.id) }}">
{% if t.private %}&#x1f512; {% endif %}
{{ t.title }}
by {{ t.author.display_name }}
</a>
{% else %}
{% if t.private %}&#x1f512; {% endif %} {% if t.private %}&#x1f512; {% endif %}
{{ t.title }} <a href="{{ url_for('thread_page', id=t.id) }}">{{ t.title }}</a>
by {{ t.author.display_name }} by {{ t.author.display_name }}
</a> {% endif %}
{% else %} </li>
{% if t.private %}&#x1f512; {% endif %}
<a href="{{ url_for('thread_page', id=t.id) }}">{{ t.title }}</a>
by {{ t.author.display_name }}
{% endif %}
{% else %} {% else %}
<i>No threads found</i> <li {% if list_group %}class="list-group-item"{% endif %}><i>No threads found</i></li>
{% endfor %} {% endfor %}
</li> {% if not list_group %}</ul>{% endif %}
</ul>
{% endmacro %} {% endmacro %}

View File

@ -13,7 +13,7 @@
<div class="row mt-0 mb-4 comments mx-0"> <div class="row mt-0 mb-4 comments mx-0">
<div class="col-md-1 p-1"> <div class="col-md-1 p-1">
<img class="img-responsive user-photo img-thumbnail img-thumbnail-1" src="{{ (current_user.email or '') | gravatar }}"> <img class="img-responsive user-photo img-thumbnail img-thumbnail-1" src="{{ current_user.getProfilePicURL() }}">
</div> </div>
<div class="col"> <div class="col">
<div class="card"> <div class="card">