issue merge username and `view profile`, so username links to profile and we don't need different tab for it #182

This commit is contained in:
Kostiantyn Stoliarskyi 2023-06-20 09:12:45 +03:00
parent b4160feef8
commit 9a0ccb6b3b
3 changed files with 9 additions and 13 deletions

View File

@ -13,7 +13,7 @@
<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"> Connect you wallet to see your favorite books! </div></button></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"> Connect you wallet to see your favorite books! </div></button></div>
<!-- prettier-ignore --> <!-- prettier-ignore -->
{% endif %} {% endif %}
{% if current_user.is_authenticated and current_user.stars|length==0 %} {% if current_user.is_authenticated and books.total<1 %}
<!-- prettier-ignore --> <!-- prettier-ignore -->
<div class="mx-auto my-auto h-full w-full "> <div class="mx-auto my-auto h-full w-full ">
<a href="{{ url_for('home.explore_books') }}" 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"><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> You don't have favorite books start to explore book to choose one! </div></a></div> <a href="{{ url_for('home.explore_books') }}" 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"><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> You don't have favorite books start to explore book to choose one! </div></a></div>
@ -21,7 +21,7 @@
{% endif %} {% endif %}
<!-- prettier-ignore --> <!-- prettier-ignore -->
<div class="flex flex-col w-full"> <div class="flex flex-col w-full">
{% if current_user.is_authenticated and current_user.stars|length>0 %} {% if current_user.is_authenticated and books.total>0 %}
<div class="flex justify-between mt-1"> <div class="flex justify-between mt-1">
<h1 class=" text-lg font-extrabold dark:text-white ml-4">Fav books</h1> <h1 class=" text-lg font-extrabold dark:text-white ml-4">Fav books</h1>
{% if current_user.is_authenticated %} {% if current_user.is_authenticated %}

View File

@ -110,10 +110,7 @@
<!-- prettier-ignore --> <!-- prettier-ignore -->
<div class="z-50 hidden my-4 text-base list-none bg-white divide-y divide-gray-100 rounded shadow dark:bg-gray-700 dark:divide-gray-600" id="dropdown-user" > <div class="z-50 hidden my-4 text-base list-none bg-white divide-y divide-gray-100 rounded shadow dark:bg-gray-700 dark:divide-gray-600" id="dropdown-user" >
<div class="px-4 py-3" role="none"> <div class="px-4 py-3" role="none">
<p class="text-center text-sm text-gray-900 dark:text-white" role="none"> {{current_user.username}} </p> <a href="{{ url_for('user.profile',user_id=current_user.id) }}" class="text-center text-sm text-gray-900 dark:text-white" role="none"> {{current_user.username}} </a>
</div>
<div class="px-4 py-3" role="none">
<a class="text-center text-sm text-gray-900 dark:text-white" role="none" href="{{ url_for('user.profile',user_id=current_user.id) }}"> View profile </a>
</div> </div>
<div class="px-4 py-3" role="none"> <div class="px-4 py-3" role="none">
<a class="text-center text-sm text-gray-900 dark:text-white" role="none" href="{{ url_for('user.edit_profile') }}"> Edit profile </a> <a class="text-center text-sm text-gray-900 dark:text-white" role="none" href="{{ url_for('user.edit_profile') }}"> Edit profile </a>

View File

@ -19,35 +19,35 @@
{% else %} {% else %}
<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="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> <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="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 %} {% endif %}
<p class="ml-2">{{ current_user.username }}</p> <a href="{{ url_for('user.profile',user_id=current_user.id) }}" class="ml-2">{{ current_user.username }}</a>
</span> </span>
</li> </li>
<li class="md:hidden"> <li class="md:hidden">
<a href="{{ url_for('user.edit_profile') }}" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700"> <a href="{{ url_for('user.edit_profile') }}" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700">
<!-- prettier-ignore --> <!-- prettier-ignore -->
<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="M16.862 4.487l1.687-1.688a1.875 1.875 0 112.652 2.652L10.582 16.07a4.5 4.5 0 01-1.897 1.13L6 18l.8-2.685a4.5 4.5 0 011.13-1.897l8.932-8.931zm0 0L19.5 7.125M18 14v4.75A2.25 2.25 0 0115.75 21H5.25A2.25 2.25 0 013 18.75V8.25A2.25 2.25 0 015.25 6H10" /> </svg> <span >Edit profile</span>
<span class="ml-3">Edit profile</span>
</a> </a>
</li> </li>
<li class="md:hidden" id="dropdownNotificationButton" data-dropdown-toggle="dropdownNotification" > <li class="md:hidden" id="dropdownNotificationButton" data-dropdown-toggle="dropdownNotification" >
<!-- prettier-ignore --> <!-- prettier-ignore -->
<span class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700" > <span class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700" >
<svg class="w-6 h-6" aria-hidden="true" fill="currentColor" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"> <path d="M10 2a6 6 0 00-6 6v3.586l-.707.707A1 1 0 004 14h12a1 1 0 00.707-1.707L16 11.586V8a6 6 0 00-6-6zM10 18a3 3 0 01-3-3h6a3 3 0 01-3 3z"></path> </svg> {% if current_user.active_notifications %}
<div class="relative flex"> <div class="relative flex">
<div <div
class="relative inline-flex w-3 h-3 bg-red-500 border-2 border-white rounded-full -top-2 right-3 dark:border-gray-900"></div> class="relative inline-flex w-3 h-3 bg-red-500 border-2 border-white rounded-full -top-2 right-3 dark:border-gray-900"></div>
</div> </div>
<p class="ml-2">Notifications</p> {% endif %}
<p>Notifications</p>
</span> </span>
</li> </li>
{% endif %} {% endif %}
{% if current_user.is_authenticated %}
<li> <li>
<a href="{{ url_for('book.my_library') }}" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700"> <a href="{{ url_for('book.my_library') }}" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700">
<!-- prettier-ignore --> <!-- prettier-ignore -->
<span>My Library</span > <span>My Library</span >
</a> </a>
</li> </li>
{% if current_user.is_authenticated %}
<li> <li>
<a href="{{url_for('book.my_contributions')}}" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700"> <a href="{{url_for('book.my_contributions')}}" class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700">
<!-- prettier-ignore --> <!-- prettier-ignore -->
@ -61,7 +61,6 @@
</a> </a>
</li> </li>
{% endif %} {% endif %}
<li class="md:hidden"> <li class="md:hidden">
<div id="theme-toggle" class="absolute bottom-14 left-3 cursor-pointer flex items-center mt-2 p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700"> <div id="theme-toggle" class="absolute bottom-14 left-3 cursor-pointer flex items-center mt-2 p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700">
<button type="button" class=" text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none rounded-lg text-sm"> <button type="button" class=" text-gray-500 dark:text-gray-400 hover:bg-gray-100 dark:hover:bg-gray-700 focus:outline-none rounded-lg text-sm">