remove shadows done stat and fix users in search

This commit is contained in:
Kostiantyn Stoliarskyi 2023-06-20 16:50:30 +03:00
parent 2ec34c03f9
commit 4508c1e48e
6 changed files with 98 additions and 83 deletions

View File

@ -6,7 +6,7 @@
{% block content %}
<div
class="pt-1 relative shadow-md sm:rounded-lg mt-1 h-box flex">
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">

View File

@ -6,7 +6,7 @@
{% block content %}
<div
class="pt-1 relative shadow-md sm:rounded-lg mt-1 h-box flex">
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">

View File

@ -10,23 +10,36 @@
{% include 'book/modals/add_book_modal.html' %}
{% endif %}
<div class="pt-1 relative shadow-md sm:rounded-lg mt-1 h-box flex flex-col">
<div class="pt-1 relative sm:rounded-lg mt-1 h-box flex flex-col">
{% if not current_user.is_authenticated %}
<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">
Connect you wallet to see your library!
</div>
<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">Connect you wallet to see your library!</div>
</button>
</div>
{% endif %}
{% if current_user.is_authenticated and not books.total %}
{% endif %} {% if current_user.is_authenticated and not books.total %}
<div class="mx-auto my-auto h-full w-full p-2">
<button type="button" data-modal-target="add-book-modal" data-modal-toggle="add-book-modal" 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">
<button
type="button"
data-modal-target="add-book-modal"
data-modal-toggle="add-book-modal"
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 flex items-center space-x-2">
<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"> <path stroke-linecap="round" stroke-linejoin="round" d="M12 4.5v15m7.5-7.5h-15" /> </svg>
<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">
<path
stroke-linecap="round"
stroke-linejoin="round"
d="M12 4.5v15m7.5-7.5h-15" />
</svg>
<span>New book</span>
</div>
</button>
@ -37,17 +50,13 @@
{% if current_user.is_authenticated and books.total %}
<div class="flex flex-col w-full">
<div class="flex justify-between mt-1">
<h1 class=" text-lg font-extrabold dark:text-white ml-4">My library</h1>
{% if current_user.is_authenticated %}
{% include 'book/components/header_buttons.html' %}
{% endif %}
<h1 class="text-lg font-extrabold dark:text-white ml-4">My library</h1>
{% if current_user.is_authenticated %} {% include
'book/components/header_buttons.html' %} {% endif %}
</div>
</div>
{% endif %}
{% for book in books if not book.is_deleted %}
{% include 'book/components/book_list_item.html' %}
{% endfor %}
{% endif %} {% for book in books if not book.is_deleted %} {% include
'book/components/book_list_item.html' %} {% endfor %}
<!-- prettier-ignore -->
{% if current_user.is_authenticated and page.pages > 1 %}

View File

@ -13,29 +13,29 @@
<!-- prettier-ignore -->
<p class="hidden md:block text-sm ml-4 w-1/2 text-gray-500 text-center md:text-left dark:text-gray-400"> {{book.about}} </p>
<!-- 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">
<ul class="flex md:flex-wrap justify-between md:justify-start -mb-px text-xs md:text-sm font-medium text-center" id="myTab" data-tabs-toggle="#myTabContent" role="tablist">
<li class="mr-2 w-full md:w-auto" role="presentation">
<!-- prettier-ignore -->
<button class="inline-flex p-4 rounded-t-lg" id="favorited-tab" data-tabs-target="#favorited" type="button" role="tab" aria-controls="favorited" 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="M11.48 3.499a.562.562 0 011.04 0l2.125 5.111a.563.563 0 00.475.345l5.518.442c.499.04.701.663.321.988l-4.204 3.602a.563.563 0 00-.182.557l1.285 5.385a.562.562 0 01-.84.61l-4.725-2.885a.563.563 0 00-.586 0L6.982 20.54a.562.562 0 01-.84-.61l1.285-5.386a.562.562 0 00-.182-.557l-4.204-3.602a.563.563 0 01.321-.988l5.518-.442a.563.563 0 00.475-.345L11.48 3.5z" /> </svg>
Favorited by
<span class="hidden md:inline"> Favorited by</span>
</button>
</li>
<li class="mr-2 w-full md:w-auto" role="presentation">
<!-- prettier-ignore -->
<button class="inline-flex p-4 mrounded-t-lg hover:text-gray-600 dark:hover:text-gray-300" id="contributors-tab" data-tabs-target="#contributors" type="button" role="tab" aria-controls="contributors" {% if active_tab=='contributors' %}aria-selected="true"{% endif %}><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="M15 19.128a9.38 9.38 0 002.625.372 9.337 9.337 0 004.121-.952 4.125 4.125 0 00-7.533-2.493M15 19.128v-.003c0-1.113-.285-2.16-.786-3.07M15 19.128v.106A12.318 12.318 0 018.624 21c-2.331 0-4.512-.645-6.374-1.766l-.001-.109a6.375 6.375 0 0111.964-3.07M12 6.375a3.375 3.375 0 11-6.75 0 3.375 3.375 0 016.75 0zm8.25 2.25a2.625 2.625 0 11-5.25 0 2.625 2.625 0 015.25 0z" /> </svg>
Contributors
<span class="hidden md:inline"> Contributors</span>
</button>
</li>
<li class="mr-2 w-full md:w-auto" role="presentation">
<!-- prettier-ignore -->
<button class="inline-flex p-4 mrounded-t-lg hover:text-gray-600 dark:hover:text-gray-300" id="version-tab" data-tabs-target="#version" type="button" role="tab" aria-controls="version" {% if active_tab=='version' %}aria-selected="true"{% endif %}><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="M9 12.75L11.25 15 15 9.75m-3-7.036A11.959 11.959 0 013.598 6 11.99 11.99 0 003 9.749c0 5.592 3.824 10.29 9 11.623 5.176-1.332 9-6.03 9-11.622 0-1.31-.21-2.571-.598-3.751h-.152c-3.196 0-6.1-1.248-8.25-3.285z" /> </svg>
Released versions
<span class="hidden md:inline"> Released versions</span>
</button>
</li>
<li class="mr-2 w-full md:w-auto" role="presentation">
<!-- prettier-ignore -->
<button class="inline-flex p-4 rounded-t-lg hover:text-gray-600 dark:hover:text-gray-300" id="fork-tab" data-tabs-target="#fork" type="button" role="tab" aria-controls="fork" {% if active_tab=='forks' %}aria-selected="true"{% endif %}><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="M7.217 10.907a2.25 2.25 0 100 2.186m0-2.186c.18.324.283.696.283 1.093s-.103.77-.283 1.093m0-2.186l9.566-5.314m-9.566 7.5l9.566 5.314m0 0a2.25 2.25 0 103.935 2.186 2.25 2.25 0 00-3.935-2.186zm0-12.814a2.25 2.25 0 103.933-2.185 2.25 2.25 0 00-3.933 2.185z" /> </svg>
Forks
<span class="hidden md:inline"> Forks</span>
</button>
</li>
</ul>

View File

@ -7,17 +7,19 @@
{% block content %}
<div class="relative overflow-x-auto shadow-md sm:rounded-lg mt-1">
<!-- prettier-ignore -->
<div class="p-5 flex border-b-2 border-gray-200 border-solid dark:border-gray-700 text-gray-900 dark:text-white dark:divide-gray-700">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="w-8 h-8"> <path stroke-linecap="round" stroke-linejoin="round" d="M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0M3.124 7.5A8.969 8.969 0 015.292 3m13.416 0a8.969 8.969 0 012.168 4.5" /> </svg>
<h1 class="text-2xl font-extrabold dark:text-white ml-4">Notifications</h1>
<a href="{{url_for('notifications.mark_all_as_read')}}" type="button" class="{% if not current_user.active_notifications %}disabled{% endif %} ml-auto text-green-700 hover:text-white border border-green-700 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-green-300 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 mb-2 dark:border-green-500 dark:text-green-500 dark:hover:text-white dark:hover:bg-green-600 dark:focus:ring-green-800">Mark all notifications as READ</a>
<div class=" items-center p-3 md:p-5 flex border-b-2 border-gray-200 border-solid dark:border-gray-700 text-gray-900 dark:text-white dark:divide-gray-700">
<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 md:w-8 md:h-8"> <path stroke-linecap="round" stroke-linejoin="round" d="M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75v-.7V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0M3.124 7.5A8.969 8.969 0 015.292 3m13.416 0a8.969 8.969 0 012.168 4.5" /> </svg>
<h1 class="font-2 md:text-2xl font-extrabold dark:text-white ml-4">Notifications</h1>
<a href="{{url_for('notifications.mark_all_as_read')}}" type="button" class="{% if not current_user.active_notifications %}disabled{% endif %} ml-auto text-green-700 hover:text-white border border-green-700 hover:bg-green-800 focus:ring-4 focus:outline-none focus:ring-green-300 font-medium rounded-lg text-xs md:text-sm px-5 py-2.5 text-center mr-2 mb-2 dark:border-green-500 dark:text-green-500 dark:hover:text-white dark:hover:bg-green-600 dark:focus:ring-green-800">Mark all <span class="hidden md:inline">notifications</span> as READ</a>
</div>
{% if not current_user.notifications %}
{% if not notifications.total %}
<p
class="hidden md:block text-l ml-4 w-1/2 mt-2 text-gray-500 text-center md:text-left dark:text-gray-400">
class="block text-l ml-4 md:w-1/2 mt-2 text-gray-500 text-center md:text-left dark:text-gray-400">
You don't have notifications!
</p>
{% endif %} {% for notification in notifications %}
{% endif %}
<!-- prettier-ignore -->
{% for notification in notifications %}
<!-- prettier-ignore -->
<dl class="bg-white dark:bg-gray-900 max-w-full p-5 text-gray-900 divide-y divide-gray-200 dark:text-white dark:divide-gray-700 m-3 border-2 border-gray-200 border-solid rounded-lg dark:border-gray-700">
<dt class="mb-2"> <a class="flex flex-col pb-4 text-gray-500 {% if not notification.is_read %} text-blue-950 dark:text-white font-bold {% endif %}" href="{{url_for('notifications.mark_as_read',notification_id=notification.id)}}">{{notification.text}}</a> </dt>

View File

@ -53,10 +53,14 @@
{% for user in users if not user.is_deleted %}
<tr class="bg-white border-b dark:bg-gray-800 dark:border-gray-700 hover:bg-gray-50 dark:hover:bg-gray-600">
<th scope="row" class="flex items-center px-6 py-4 text-gray-900 whitespace-nowrap dark:text-white">
<img class="w-10 h-10 rounded-full" src="data:image/jpeg;base64,{{user.avatar_img}}" alt="User's avatar">
{% if current_user.avatar_img %}
<img class="w-10 h-10 rounded-full" src="data:image/jpeg;base64,{{ current_user.avatar_img }}" alt="user avatar">
{% else %}
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" stroke-width="1.5" stroke="currentColor" class="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 %}
<div class="pl-3">
<div class="text-base font-semibold">{{user.username}}</div>
<div class="font-normal text-gray-500">{{user.wallet_id}}</div>
<div class="text-base font-semibold w-24 md:w-full truncate">{{user.username}}</div>
<div class="hidden md:block font-normal text-gray-500">{{user.wallet_id}}</div>
</div>
</th>
<td class="px-6 py-4">