From c1d1c3aa1a11f0096718443b8b6b11244384fa9c Mon Sep 17 00:00:00 2001 From: Aevann1 Date: Sun, 25 Jul 2021 17:37:55 +0200 Subject: [PATCH] gf --- drama/classes/badges.py | 5 -- drama/templates/badge.html | 5 -- drama/templates/badge_pair.html | 6 -- drama/templates/title.html | 1 - drama/templates/titles.html | 106 -------------------------------- drama/templates/userpage.html | 16 +++-- 6 files changed, 11 insertions(+), 128 deletions(-) delete mode 100644 drama/templates/badge.html delete mode 100644 drama/templates/badge_pair.html delete mode 100644 drama/templates/title.html delete mode 100644 drama/templates/titles.html diff --git a/drama/classes/badges.py b/drama/classes/badges.py index 3ea94782af..6936760611 100644 --- a/drama/classes/badges.py +++ b/drama/classes/badges.py @@ -72,11 +72,6 @@ class Badge(Base): def path(self): return self.badge.path - @property - def rendered(self): - - return render_template("badge.html", b=self) - @property def json_core(self): diff --git a/drama/templates/badge.html b/drama/templates/badge.html deleted file mode 100644 index 0793c2e351..0000000000 --- a/drama/templates/badge.html +++ /dev/null @@ -1,5 +0,0 @@ -{% if b.url %} - -{% else %} - -{% endif %} diff --git a/drama/templates/badge_pair.html b/drama/templates/badge_pair.html deleted file mode 100644 index ee0f8e1a18..0000000000 --- a/drama/templates/badge_pair.html +++ /dev/null @@ -1,6 +0,0 @@ -
-{{bp[0].rendered | safe}} -{% if bp|length > 1 %} -{{bp[1].rendered | safe}} -{% endif %} -
\ No newline at end of file diff --git a/drama/templates/title.html b/drama/templates/title.html deleted file mode 100644 index d5f9294611..0000000000 --- a/drama/templates/title.html +++ /dev/null @@ -1 +0,0 @@ -{{t.text}} \ No newline at end of file diff --git a/drama/templates/titles.html b/drama/templates/titles.html deleted file mode 100644 index 7d423b44bf..0000000000 --- a/drama/templates/titles.html +++ /dev/null @@ -1,106 +0,0 @@ -{% extends "default.html" %} - - - -{% block content %} -

User titles

- -

Drama titles are text-based, cosmetic achievements that can be displayed next to your username across the Drama platform. Titles may be earned through various activities on Drama: earning rep, inviting friends, helping staff, and more.

- -
- -

Article guide:

- - - -
- -

Unlockable titles

- -

These titles automatically unlock through different kinds of activity on Drama.

- - - - - - - - - - {% for t in titles if t.kind==1 %} - - - - - {% endfor %} - -
TitleDescription
{% if v %}{{v.username}}{% else %}[name]{% endif %}{{t.rendered | safe}}{{t.requirement_string}}
- -

Supporter titles

- -

These titles can be obtained by financially supporting Drama.

- - - - - - - - - - {% for t in titles if t.kind==2 %} - - - - - {% endfor %} - -
TitleDescription
{% if v %}{{v.username}}{% else %}[name]{% endif %}{{t.rendered | safe}}{{t.requirement_string}}
-

Granted titles

- -

These titles can be granted by Drama staff.

- - - - - - - - - - {% for t in titles if t.kind==3 %} - - - - - {% endfor %} - -
TitleDescription
{% if v %}{{v.username}}{% else %}[name]{% endif %}{{t.rendered | safe}}{{t.requirement_string}}
- -

Unobtainable titles

- -

There is no way to acquire these titles if you don't already have them.

- - - - - - - - - - {% for t in titles if t.kind==4 %} - - - - - {% endfor %} - -
TitleDescription
{% if v %}{{v.username}}{% else %}[name]{% endif %}{{t.rendered | safe}}{{t.requirement_string}}
- -{% endblock %} diff --git a/drama/templates/userpage.html b/drama/templates/userpage.html index df12e9e622..944ffc677d 100644 --- a/drama/templates/userpage.html +++ b/drama/templates/userpage.html @@ -247,8 +247,11 @@
{% for b in u.badges %} - {% include "badge.html" %} - {% else %} + {% if b.url %} + + {% else %} + + {% endif %} {% endfor %}
@@ -299,10 +302,13 @@

{{u.bio_html | safe}}

{% endif %}
- {% for b in u.badges %} - {% include "badge.html" %} + {% for b in u.badges %} + {% if b.url %} + {% else %} - {% endfor %} + + {% endif %} + {% endfor %}
{% if v and v.id == u.id %} Edit profile