forked from rDrama/rDrama
1
0
Fork 0
master
Aevann1 2021-07-25 17:37:55 +02:00
parent 3c46fcdc7f
commit c1d1c3aa1a
6 changed files with 11 additions and 128 deletions

View File

@ -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):

View File

@ -1,5 +0,0 @@
{% if b.url %}
<a href="{{b.url}}"><img style="width: 32px; height: 32px" src="{{b.path}}" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{b.name}} - {{b.text}}"></a>
{% else %}
<img style="width: 32px; height: 32px" src="{{b.path}}" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{b.name}} - {{b.text}}">
{% endif %}

View File

@ -1,6 +0,0 @@
<div>
{{bp[0].rendered | safe}}
{% if bp|length > 1 %}
{{bp[1].rendered | safe}}
{% endif %}
</div>

View File

@ -1 +0,0 @@
<span style="color: #{{t.color}}{% if t.background_color_1 %}; background-color: #{{t.background_color_1}}{% endif %}{% if t.background_color_1 and t.background_color_2 %}; background-image: linear-gradient({{t.gradient_angle}}deg, #{{t.background_color_1}} 0%, #{{t.background_color_2}} 100%){% endif %}{% if t.box_shadow_color %}; box-shadow: 0 1px 2px rgba({{t.box_shadow_color}}, 0.5){% endif %}{% if t.text_shadow_color %}; text-shadow: 1px 1px 2px rgb({{t.text_shadow_color}}){% endif %}"{% if t.background_color_1 %} class="badge font-weight-normal text-small ml-1"{% endif %}>{{t.text}}</span>

View File

@ -1,106 +0,0 @@
{% extends "default.html" %}
{% block content %}
<h1 class="article-title">User titles</h1>
<p>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.</p>
<div class="mb-5">
<h3 class="h5">Article guide:</h3>
<ul>
<li><a href="#UnlockableTitles">Unlockable titles</a></li>
<li><a href="#SupporterTitles">Supporter titles</a></li>
<li><a href="#GrantedTitles">Granted titles</a></li>
<li><a href="#UnobtainableTitles">Unobtainable titles</a></li>
</ul>
</div>
<h2 class="h3" id="UnlockableTitles">Unlockable titles</h2>
<p>These titles automatically unlock through different kinds of activity on Drama.</p>
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th scope="col">Title</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
{% for t in titles if t.kind==1 %}
<tr>
<td>{% if v %}<a href="{{v.permalink}}" class="user-name">{{v.username}}</a>{% else %}[name]{% endif %}{{t.rendered | safe}}</td>
<td>{{t.requirement_string}}</td>
</tr>
{% endfor %}
</tbody>
</table>
<h2 class="h3" id="SupporterTitles">Supporter titles</h2>
<p>These titles can be obtained by financially supporting Drama.</p>
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th scope="col">Title</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
{% for t in titles if t.kind==2 %}
<tr>
<td>{% if v %}<a href="{{v.permalink}}" class="user-name">{{v.username}}</a>{% else %}[name]{% endif %}{{t.rendered | safe}}</td>
<td>{{t.requirement_string}}</td>
</tr>
{% endfor %}
</tbody>
</table>
<h2 class="h3" id="GrantedTitles">Granted titles</h2>
<p>These titles can be granted by Drama staff.</p>
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th scope="col">Title</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
{% for t in titles if t.kind==3 %}
<tr>
<td>{% if v %}<a href="{{v.permalink}}" class="user-name">{{v.username}}</a>{% else %}[name]{% endif %}{{t.rendered | safe}}</td>
<td>{{t.requirement_string}}</td>
</tr>
{% endfor %}
</tbody>
</table>
<h2 class="h3" id="UnobtainableTitles">Unobtainable titles</h2>
<p>There is no way to acquire these titles if you don't already have them.</p>
<table class="table table-striped mb-5">
<thead class="bg-primary text-white">
<tr>
<th scope="col">Title</th>
<th scope="col">Description</th>
</tr>
</thead>
<tbody>
{% for t in titles if t.kind==4 %}
<tr>
<td>{% if v %}<a href="{{v.permalink}}" class="user-name">{{v.username}}</a>{% else %}[name]{% endif %}{{t.rendered | safe}}</td>
<td>{{t.requirement_string}}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}

View File

@ -247,8 +247,11 @@
<div>
{% for b in u.badges %}
{% include "badge.html" %}
{% else %}
{% if b.url %}
<a href="{{b.url}}"><img style="width: 60px; height: 60px" src="{{b.path}}" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{b.name}} - {{b.text}}"></a>
{% else %}
<img style="width: 60px; height: 60px" src="{{b.path}}" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{b.name}} - {{b.text}}">
{% endif %}
{% endfor %}
</div>
@ -299,10 +302,13 @@
<p class="text-muted text-break">{{u.bio_html | safe}}</p>
{% endif %}
<div class="mb-3">
{% for b in u.badges %}
{% include "badge.html" %}
{% for b in u.badges %}
{% if b.url %}
<a href="{{b.url}}"><img style="width: 32px; height: 32px" src="{{b.path}}" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{b.name}} - {{b.text}}"></a>
{% else %}
{% endfor %}
<img style="width: 32px; height: 32px" src="{{b.path}}" data-toggle="tooltip" data-placement="bottom" title="" data-original-title="{{b.name}} - {{b.text}}">
{% endif %}
{% endfor %}
</div>
{% if v and v.id == u.id %}
<a href="/settings/profile" class="btn btn-secondary btn-sm">Edit profile</a>