feat
This commit is contained in:
parent
96c6951e1a
commit
36e0f57d89
@ -2,6 +2,7 @@
|
||||
{% import "/components/header.html" as header %}
|
||||
{% import "/components/footer.html" as footer %}
|
||||
{% import "posts/profile_card.html" as card %}
|
||||
{% import "/components/contacts.html" as contacts %}
|
||||
|
||||
|
||||
{% block title %}Посты{% endblock %}
|
||||
@ -14,7 +15,6 @@
|
||||
<div class="c_gtoe9">
|
||||
<div class="c_iiehk">
|
||||
<div class="c_8xkk0 b_2rmrs">
|
||||
|
||||
<div class="b_hjteq">
|
||||
<div class="b_zo7wz" for="avatar">
|
||||
<img class="b_rhmvx" src="/a/{{find._id}}" alt="{{find.username}}" id="preview" crossorigin="anonymous" fetchpriority="high" loading="eager">
|
||||
@ -25,7 +25,32 @@
|
||||
<div class="c_ctfod b_289i1" id="switch-user">
|
||||
<button class="c_d2l0b b_al8e7">Переключиться на пользователя</button>
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% if 'admin' in user.get('roles', []) or 'partner' in user.get('roles', []) %}
|
||||
<!-- <div class="c_ctfod b_289i1"><span class="c_d2l0b b_al8e7">Написать пользователю</span></div> -->
|
||||
{{ contacts.details(find) }}
|
||||
{% endif %}
|
||||
<div >На платформе с {{ (find._id.generation_time.strftime('%Y')) if find._id else ''}}</div>
|
||||
{% if find.get('grade') is not none%}
|
||||
<p class="it o">Звание:</p>
|
||||
<p class="it">{{find.grade}}</p>
|
||||
{% endif %}
|
||||
{% if find.get('biography') is not none%}
|
||||
<p class="it o">Биография:</p>
|
||||
<p class="it">{{find.biography}}</p>
|
||||
{% endif %}
|
||||
<p>👁 {{total_watch_count}} (+{{today_watch_count}} Сегодня)</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="c_ru432">
|
||||
<div class="c_tihtk">
|
||||
{% for i in cards %}
|
||||
{{ card.section(i, loop.index, user) }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
// @license magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt BSD-3-Clause
|
||||
const userId = '{{find._id}}';
|
||||
@ -50,33 +75,6 @@ document.getElementById('switch-user').addEventListener('click', async () => {
|
||||
});
|
||||
// @license-end
|
||||
</script>
|
||||
{% endif %}
|
||||
{% if 'admin' in user.get('roles', []) %}
|
||||
<div class="c_ctfod b_289i1"><span class="c_d2l0b b_al8e7">Написать пользователю</span></div>
|
||||
{% endif %}
|
||||
<div >На платформе с {{ (find._id.generation_time.strftime('%Y')) if find._id else ''}}</div>
|
||||
{% if find.get('grade') is not none%}
|
||||
<p class="it o">Звание:</p>
|
||||
<p class="it">{{find.grade}}</p>
|
||||
{% endif %}
|
||||
{% if find.get('biography') is not none%}
|
||||
<p class="it o">Биография:</p>
|
||||
<p class="it">{{find.biography}}</p>
|
||||
{% endif %}
|
||||
<p>👁 {{total_watch_count}} (+{{today_watch_count}} Сегодня)</p>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="c_ru432">
|
||||
<div class="c_tihtk">
|
||||
{% for i in cards %}
|
||||
{{ card.section(i, loop.index, user) }}
|
||||
{% endfor %}
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
<script>
|
||||
// @license magnet:?xt=urn:btih:c80d50af7d3db9be66a4d0a86db0286e4fd33292&dn=bsd-3-clause.txt BSD-3-Clause
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
@ -101,6 +99,7 @@ document.addEventListener('DOMContentLoaded', () => {
|
||||
{% block head %}
|
||||
{{ header.style() }}
|
||||
{{ card.style() }}
|
||||
{{ contacts.style() }}
|
||||
<style>
|
||||
.o{font-style: italic;color: #777;}
|
||||
.it{padding: 0px 15px;}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user