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) -%} - - {% 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 %} -

{% 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")) %} +
+ 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 not package.approved and (package.author == current_user or package.checkPerm(current_user, "APPROVE_NEW")) %} + {% if review_thread %} +

{% 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 %} +