diff --git a/app/__init__.py b/app/__init__.py index 37c6cc8..b7913f5 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -17,6 +17,7 @@ from flask import * from flask_user import * +from flask_gravatar import Gravatar import flask_menu as menu from flask_mail import Mail from flask.ext import markdown @@ -36,6 +37,14 @@ github = GitHub(app) csrf = CsrfProtect(app) mail = Mail(app) pages = FlatPages(app) +gravatar = Gravatar(app, + size=58, + rating='g', + default='mp', + force_default=False, + force_lower=False, + use_ssl=True, + base_url=None) if not app.debug: from .maillogger import register_mail_error_handler diff --git a/app/scss/comments.scss b/app/scss/comments.scss index d2302b1..a3ce50f 100644 --- a/app/scss/comments.scss +++ b/app/scss/comments.scss @@ -1,49 +1,28 @@ -.comments, .comments li { - list-style: none; - padding: 0; - margin: 0; - border: 1px solid #444; +.img-thumbnail-1 { + padding: 0px; + // width: 100%; } .comments { - border-radius: 5px; - margin: 15px 0; - background: #333; + list-style: none; + padding: 0; - .info_strip, .msg { - display: block; - margin: 0; - } + .card { + position:relative; - .info_strip { - padding: 0.2em 1em; - border-bottom: 1px solid #444; - } - - .msg { - padding: 1em; - background: #222; - } - - .author { - font-weight: bold; - float: left; - display: inline-block; - } - - .info_strip span { - float: right; - display: inline-block; - color: #bbb; + .card-header:before { + position: absolute; + top: 11px; + right: 100%; + width: 0; + height: 0; + display: block; + content:" "; + border-color: transparent; + border-style: solid solid outset; + pointer-events:none; + border-right-color: #444; + border-width: 14px; + } } } - -.comment_form { - margin: 1em 0; -} - -.comment_form textarea { - min-width: 60%; - max-width: 100%; - margin: 0 0 1em 0; -} diff --git a/app/templates/macros/threads.html b/app/templates/macros/threads.html index 9ce8a73..0f6df88 100644 --- a/app/templates/macros/threads.html +++ b/app/templates/macros/threads.html @@ -1,28 +1,56 @@ {% macro render_thread(thread, current_user) -%} -
+ {% for r in thread.replies %} +-
+
+
+
+
+
+
+
+
- {{ r.author.display_name }}
- {{ r.created_at | datetime }}
-
+ {{ r.author.display_name }}
+
+
+ {{ r.created_at | datetime }}
+
-
+
+
{{ r.comment | markdown }}
-
- {% endfor %}
-
+
+
+
+ {% endfor %}
+
- {% if current_user.is_authenticated %}
-
- {% endif %}
+{% if current_user.is_authenticated %}
+
+
+
+
+
+
+
+ {{ current_user.display_name }}
+
+
+
+
+
+
+
+{% endif %}
{% endmacro %}
{% macro render_threadlist(threads, list_group=False) -%}
diff --git a/app/templates/packages/view.html b/app/templates/packages/view.html
index 960c2b2..cb0c3ca 100644
--- a/app/templates/packages/view.html
+++ b/app/templates/packages/view.html
@@ -53,7 +53,7 @@
{% elif (package.type == package.type.GAME or package.type == package.type.TXP) and package.screenshots.count() == 0 %}
You need to add at least one screenshot.
- {% elif topic_error_lvl == "error" %}
+ {% elif topic_error_lvl == "danger" %}
Please fix the below topic issue(s).
{% elif "Other" in package.license.name or "Other" in package.media_license.name %}
@@ -97,26 +97,13 @@
{% endif %}
- {% if package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW") %}
- {% if review_thread %}
-
+ Open Thread
- {% from "macros/threads.html" import render_thread %}
- {{ render_thread(review_thread, current_user) }}
- {% else %}
-
- Open Thread
-
- Privately ask a question or give feedback
-
-
- {% endif %}
+ Privately ask a question or give feedback
+
+
{% endif %}
{% endif %}
@@ -301,6 +288,21 @@
{% if review_thread.private %}🔒{% endif %} {{ review_thread.title }}
- {% if review_thread.private %} -- This thread is only visible to the package owner and users of - Editor rank or above. -
- {% endif %} + {% if not review_thread and (package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW")) %} +{% if review_thread.private %}🔒{% endif %} {{ review_thread.title }}
+ {% if review_thread.private %} ++ This thread is only visible to the package owner and users of + Editor rank or above. +
+ {% endif %} + + {% from "macros/threads.html" import render_thread %} + {{ render_thread(review_thread, current_user) }} + {% endif %} + {% endif %} +{% if package.checkPerm(current_user, "EDIT_PACKAGE") %} Add screenshot diff --git a/app/templates/threads/view.html b/app/templates/threads/view.html index 71580de..13097fe 100644 --- a/app/templates/threads/view.html +++ b/app/templates/threads/view.html @@ -5,25 +5,26 @@ Threads {% endblock %} {% block content %} + {% if current_user.is_authenticated %} + {% if current_user in thread.watchers %} +
+ {% else %} + + {% endif %} + {% endif %} +{% if thread.private %}🔒 {% endif %}{{ thread.title }}
+ {% if thread.package or current_user.is_authenticated %} {% if thread.package %}Package: {{ thread.package.title }}
{% endif %} - - {% if current_user.is_authenticated %} - {% if current_user in thread.watchers %} - - {% else %} - - {% endif %} - {% endif %} {% endif %} {% if thread.private %} diff --git a/app/templates/users/user_profile_page.html b/app/templates/users/user_profile_page.html index da9f8ca..8949189 100644 --- a/app/templates/users/user_profile_page.html +++ b/app/templates/users/user_profile_page.html @@ -66,13 +66,40 @@ {% endif %} + +ContentDB uses Gravatar for profile pictures
+ {% if user == current_user %} + {% if user.email %} + + Gravatar + + {% else %} ++ Please add an email to your profile. +
+ {% endif %} + {% endif %} +Edit Details
+