mirror of https://github.com/logos-co/open-law.git
105 lines
6.7 KiB
HTML
105 lines
6.7 KiB
HTML
<!-- prettier-ignore -->
|
|
{% extends 'base.html' %}
|
|
{% set selected_tab='my_contributions' %}
|
|
|
|
{% block title %}My Contributions{% endblock %}
|
|
|
|
{% block content %}
|
|
<div
|
|
class="pt-1 relative sm:rounded-lg mt-1 h-box flex"
|
|
>
|
|
{% if not current_user.is_authenticated %}
|
|
<!-- prettier-ignore -->
|
|
<div class="mx-auto my-auto h-full w-full p-2">
|
|
<button type="button" id="connectWalletBtn" class="w-full h-full text-black dark:text-white focus:ring-4 focus:outline-none focus:ring-blue-100 font-medium rounded-lg text-sm px-4 py-2.5 justify-center text-center inline-flex items-center border border-gray-200 dark:border-gray-700"><div class="my-auto"></div> Connect your wallet to see your contributions! </div></button></div>
|
|
<!-- prettier-ignore -->
|
|
{% endif %}
|
|
{% if current_user.is_authenticated and not interpretations.total %}
|
|
<!-- prettier-ignore -->
|
|
<div class="mx-auto my-auto h-full w-full p-2">
|
|
<a href="{{url_for('home.get_all')}}" type="button" class="w-full h-full text-black dark:text-white focus:ring-4 focus:outline-none focus:ring-blue-100 font-medium rounded-lg text-sm px-4 py-2.5 justify-center text-center inline-flex items-center border border-gray-200 dark:border-gray-700"><div class="my-auto"></div> You don't have contributions yet. Explore books and start contributing!</div></a></div>
|
|
<!-- prettier-ignore -->
|
|
{% endif %}
|
|
<!-- prettier-ignore -->
|
|
<div class="flex flex-col w-full">
|
|
{% if current_user.is_authenticated and interpretations.total %}
|
|
<div class="flex justify-between items-center mt-1">
|
|
<h1 class="text-[2rem] font-extrabold dark:text-white ml-4">My contributions</h1>
|
|
{% if current_user.is_authenticated %}
|
|
{% include 'book/components/header_buttons.html' %}
|
|
{% endif %}
|
|
</div>
|
|
<div class="md:hidden flex justify-end border-b py-3 px-4 border-gray-200 dark:border-gray-700">
|
|
{% include 'book/components/sort_by_btn.html' %}
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
|
|
|
|
{% for interpretation in interpretations %}
|
|
{% include 'book/components/interpretation_list_item.html' %}
|
|
{% endfor %}
|
|
|
|
|
|
{% if current_user.is_authenticated and page.pages > 1 %}
|
|
<div class="container content-center mt-3 flex bg-white dark:bg-gray-800">
|
|
<nav aria-label="Page navigation example" class="mx-auto">
|
|
<ul class="inline-flex items-center -space-x-px">
|
|
<li>
|
|
<!-- prettier-ignore -->
|
|
<a href="{{ url_for('book.my_contributions') }}?page=1&q={{page.query}}" class="block px-3 py-2 ml-0 leading-tight text-gray-500 bg-white border border-gray-300 rounded-l-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
|
|
<span class="sr-only">First</span>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5"> <path fill-rule="evenodd" d="M15.79 14.77a.75.75 0 01-1.06.02l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 111.04 1.08L11.832 10l3.938 3.71a.75.75 0 01.02 1.06zm-6 0a.75.75 0 01-1.06.02l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 111.04 1.08L5.832 10l3.938 3.71a.75.75 0 01.02 1.06z" clip-rule="evenodd" /> </svg>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<!-- prettier-ignore -->
|
|
<a href="{{ url_for('book.my_contributions') }}?page={{page.page-1 if page.page > 1 else 1}}&q={{page.query}}" class="block px-3 py-2 ml-0 leading-tight text-gray-500 bg-white border border-gray-300 rounded-l-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
|
|
<span class="sr-only">Previous</span>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5"> <path fill-rule="evenodd" d="M12.79 5.23a.75.75 0 01-.02 1.06L8.832 10l3.938 3.71a.75.75 0 11-1.04 1.08l-4.5-4.25a.75.75 0 010-1.08l4.5-4.25a.75.75 0 011.06.02z" clip-rule="evenodd" /> </svg>
|
|
</a>
|
|
</li>
|
|
|
|
<!-- prettier-ignore -->
|
|
{% for p in page.pages_for_links %}
|
|
<li>
|
|
<!-- prettier-ignore -->
|
|
{% if p == page.page %}
|
|
<!-- prettier-ignore -->
|
|
<a href="{{ url_for('book.my_contributions') }}?page={{p}}&q={{page.query}}" aria-current="page" class="z-10 px-3 py-2 leading-tight text-blue-600 border border-blue-300 bg-blue-50 hover:bg-blue-100 hover:text-blue-700 dark:border-gray-700 dark:bg-gray-700 dark:text-white">{{p}}</a>
|
|
{% else %}
|
|
<!-- prettier-ignore -->
|
|
<a href="{{ url_for('book.my_contributions') }}?page={{p}}&q={{page.query}}" class="px-3 py-2 leading-tight text-gray-500 bg-white border border-gray-300 hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">{{p}}</a>
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
|
|
<li>
|
|
<!-- prettier-ignore -->
|
|
<a href="{{ url_for('book.my_contributions') }}?page={{page.page+1 if page.page < page.pages else page.pages}}&q={{page.query}}" class="block px-3 py-2 leading-tight text-gray-500 bg-white border border-gray-300 rounded-r-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
|
|
<!-- prettier-ignore -->
|
|
<span class="sr-only">Next</span>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5"> <path fill-rule="evenodd" d="M7.21 14.77a.75.75 0 01.02-1.06L11.168 10 7.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" /> </svg>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<!-- prettier-ignore -->
|
|
<a href="{{ url_for('book.my_contributions') }}?page={{page.pages}}&q={{page.query}}" class="block px-3 py-2 leading-tight text-gray-500 bg-white border border-gray-300 rounded-r-lg hover:bg-gray-100 hover:text-gray-700 dark:bg-gray-800 dark:border-gray-700 dark:text-gray-400 dark:hover:bg-gray-700 dark:hover:text-white">
|
|
<!-- prettier-ignore -->
|
|
<span class="sr-only">Last</span>
|
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" class="w-5 h-5"> <path fill-rule="evenodd" d="M10.21 14.77a.75.75 0 01.02-1.06L14.168 10 10.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" /> <path fill-rule="evenodd" d="M4.21 14.77a.75.75 0 01.02-1.06L8.168 10 4.23 6.29a.75.75 0 111.04-1.08l4.5 4.25a.75.75 0 010 1.08l-4.5 4.25a.75.75 0 01-1.06-.02z" clip-rule="evenodd" /> </svg>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<!-- prettier-ignore -->
|
|
{% endblock %}
|
|
<!-- prettier-ignore -->
|
|
{% block scripts %}
|
|
{% endblock %}
|