aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubenwardy <rw@rubenwardy.com>2018-12-25 23:02:49 +0000
committerrubenwardy <rw@rubenwardy.com>2018-12-25 23:02:49 +0000
commit66ee706a6c99ce46e53e0c7069c90f09ae407d5c (patch)
tree9383e8305306cba2adf49e14b060b7b56f5ff05c
parentd44178cb0c6fc45d9decff7e766593f4ab2b3747 (diff)
downloadcheatdb-66ee706a6c99ce46e53e0c7069c90f09ae407d5c.tar.xz
Fix profile picture bugs
-rw-r--r--app/scss/comments.scss1
-rw-r--r--app/templates/base.html2
-rw-r--r--app/templates/macros/threads.html30
-rw-r--r--app/templates/threads/new.html2
4 files changed, 18 insertions, 17 deletions
diff --git a/app/scss/comments.scss b/app/scss/comments.scss
index a3ce50f..7ba774e 100644
--- a/app/scss/comments.scss
+++ b/app/scss/comments.scss
@@ -1,6 +1,7 @@
.img-thumbnail-1 {
padding: 0px;
// width: 100%;
+ background: white;
}
.comments {
diff --git a/app/templates/base.html b/app/templates/base.html
index 1d232f2..222dd15 100644
--- a/app/templates/base.html
+++ b/app/templates/base.html
@@ -7,7 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<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/custom.css?v=4">
+ <link rel="stylesheet" type="text/css" href="/static/custom.css?v=5">
{% block headextra %}{% endblock %}
</head>
diff --git a/app/templates/macros/threads.html b/app/templates/macros/threads.html
index ff952f9..65f02f4 100644
--- a/app/templates/macros/threads.html
+++ b/app/templates/macros/threads.html
@@ -5,7 +5,7 @@
<li class="row my-2 mx-0">
<div class="col-md-1 p-1">
<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>
</div>
<div class="col">
@@ -33,7 +33,7 @@
{% if current_user.is_authenticated %}
<div class="row mt-0 mb-4 comments mx-0">
<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 class="col">
<div class="card">
@@ -55,22 +55,22 @@
{% macro render_threadlist(threads, list_group=False) -%}
{% if not list_group %}<ul>{% endif %}
- <li {% if list_group %}class="list-group-item"{% endif %}>
{% for t in threads %}
- {% if list_group %}
- <a href="{{ url_for('thread_page', id=t.id) }}">
+ <li {% if list_group %}class="list-group-item"{% endif %}>
+ {% 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 %}
- {{ t.title }}
+ <a href="{{ url_for('thread_page', id=t.id) }}">{{ t.title }}</a>
by {{ t.author.display_name }}
- </a>
- {% else %}
- {% if t.private %}&#x1f512; {% endif %}
- <a href="{{ url_for('thread_page', id=t.id) }}">{{ t.title }}</a>
- by {{ t.author.display_name }}
- {% endif %}
+ {% endif %}
+ </li>
{% else %}
- <i>No threads found</i>
+ <li {% if list_group %}class="list-group-item"{% endif %}><i>No threads found</i></li>
{% endfor %}
- </li>
- </ul>
+ {% if not list_group %}</ul>{% endif %}
{% endmacro %}
diff --git a/app/templates/threads/new.html b/app/templates/threads/new.html
index e460618..fec4468 100644
--- a/app/templates/threads/new.html
+++ b/app/templates/threads/new.html
@@ -13,7 +13,7 @@
<div class="row mt-0 mb-4 comments mx-0">
<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 class="col">
<div class="card">