mirror of https://github.com/logos-co/open-law.git
65 lines
3.7 KiB
HTML
65 lines
3.7 KiB
HTML
<!-- prettier-ignore -->
|
|
{% extends 'base.html' %}
|
|
|
|
{% block title %}{{user.username.strip() + "'s profile" or user.wallet_id}}{% endblock %}
|
|
|
|
|
|
{% block content %}
|
|
<div class="border-b border-gray-200 dark:border-gray-700">
|
|
{% if user.is_deleted %}
|
|
<h1 class="hidden md:inline font-extrabold text-lg dark:text-white ml-4">
|
|
Sorry this user was deactivated
|
|
</h1>
|
|
{% else %}
|
|
<div class="flex flex-col md:flex-row p-3 md:p-5 md:items-center">
|
|
<!-- prettier-ignore -->
|
|
{% if user.avatar_img %}
|
|
<!-- prettier-ignore -->
|
|
<img class="hidden md:block w-10 h-10 rounded-full mr-3" src="data:image/jpeg;base64,{{ user.avatar_img }}" alt="user avatar">
|
|
{% else %}
|
|
<!-- prettier-ignore -->
|
|
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="hidden md:block w-10 h-10"> <path stroke-linecap="round" stroke-linejoin="round" d="M17.982 18.725A7.488 7.488 0 0012 15.75a7.488 7.488 0 00-5.982 2.975m11.963 0a9 9 0 10-11.963 0m11.963 0A8.966 8.966 0 0112 21a8.966 8.966 0 01-5.982-2.275M15 9.75a3 3 0 11-6 0 3 3 0 016 0z" /> </svg>
|
|
{% endif %}
|
|
|
|
<!-- prettier-ignore -->
|
|
<h1 class="inline font-extrabold text-lg dark:text-white ml-4">{{user.username}}</h1>
|
|
<!-- prettier-ignore -->
|
|
<span class="block text-xs md:text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400">
|
|
{{user.wallet_id}}
|
|
</span>
|
|
</div>
|
|
{% endif %}
|
|
<!-- prettier-ignore -->
|
|
<ul class="flex md:flex-wrap -mb-px text-xs md:text-sm font-medium text-center" id="myTab" data-tabs-toggle="#myTabContent" role="tablist">
|
|
<li class="md:mr-2 w-full md:w-auto flex items-center justify-center" role="presentation">
|
|
<!-- prettier-ignore -->
|
|
<button class="inline-flex p-4 rounded-t-lg items-center" id="library-tab" data-tabs-target="#library" type="button" role="tab" aria-controls="library" aria-selected="false"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 mr-3"> <path stroke-linecap="round" stroke-linejoin="round" d="M16.5 3.75V16.5L12 14.25 7.5 16.5V3.75m9 0H18A2.25 2.25 0 0120.25 6v12A2.25 2.25 0 0118 20.25H6A2.25 2.25 0 013.75 18V6A2.25 2.25 0 016 3.75h1.5m9 0h-9" /> </svg>
|
|
Library
|
|
</button>
|
|
</li>
|
|
<li class="md:mr-2 w-full md:w-auto flex items-center justify-center" role="presentation">
|
|
<!-- prettier-ignore -->
|
|
<button class="inline-flex p-4 items-center rounded-t-lg hover:text-gray-600 dark:hover:text-gray-300" id="contributions-tab" data-tabs-target="#contributions" type="button" role="tab" aria-controls="contributions" aria-selected="false"><svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-6 h-6 mr-3"> <path stroke-linecap="round" stroke-linejoin="round" d="M3.75 13.5l10.5-11.25L12 10.5h8.25L9.75 21.75 12 13.5H3.75z" /> </svg>
|
|
Contributions
|
|
</button>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="myTabContent">
|
|
<!-- prettier-ignore -->
|
|
<div class="hidden p-4 rounded-lg bg-gray-50 dark:bg-gray-800" id="library" role="tabpanel" aria-labelledby="library-tab">
|
|
{% for book in user.books if not book.is_deleted %}
|
|
{% include 'book/components/book_list_item.html' %}
|
|
{% endfor %}
|
|
</div>
|
|
<!-- prettier-ignore -->
|
|
<div class="hidden p-4 rounded-lg bg-gray-50 dark:bg-gray-800" id="contributions" role="tabpanel" aria-labelledby="contributions-tab">
|
|
{% for interpretation in interpretations %}
|
|
{% with show_breadcrumbs=True, hide_vote_btns=True %}
|
|
{% include 'book/components/interpretation_list_item.html' %}
|
|
{% endwith %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|