fix header, add user image

This commit is contained in:
SvyatoslavArtymovych 2023-05-05 11:20:52 +03:00
parent 0b065575fc
commit d2302137ec
3 changed files with 17 additions and 8 deletions

File diff suppressed because one or more lines are too long

View File

@ -59,7 +59,7 @@
<button id="connectWalletBtn" type="button" class="text-white bg-gradient-to-r from-cyan-500 to-blue-500 hover:bg-gradient-to-bl focus:ring-4 focus:outline-none focus:ring-cyan-300 dark:focus:ring-cyan-800 font-medium rounded-lg text-sm px-5 py-2.5 text-center">Connect wallet</button>
{% endif %}
{% if current_user.is_authenticated %}
<div class="flex">
<div class="md:flex hidden">
<div class="items-center md:ml-3 hidden md:flex">
<!-- prettier-ignore -->
<button id="dropdownNotificationButton" data-dropdown-toggle="dropdownNotification" class="inline-flex items-center text-sm font-medium text-center text-gray-500 hover:text-gray-900 focus:outline-none dark:hover:text-white dark:text-gray-400" type="button">
@ -70,11 +70,15 @@
</button>
</div>
<div class="items-center md:ml-3 hidden md:flex">
<div>
<div class="flex justify-center align-middle">
<!-- prettier-ignore -->
<button type="button" class="text-gray-500 dark:text-gray-400 hover:bg-gray-100 md:mr-2 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm p-2.5" aria-expanded="false" data-dropdown-toggle="dropdown-user" >
<button type="button" class=" text-gray-500 dark:text-gray-400 hover:bg-gray-100 md:mr-2 dark:hover:bg-gray-700 focus:outline-none focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 rounded-lg text-sm" aria-expanded="false" data-dropdown-toggle="dropdown-user" >
<span class="sr-only">Open user menu</span>
<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>
{% if current_user.avatar_img %}
<img class="w-9 h-9 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-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 %}
<!-- prettier-ignore -->
</button>
</div>

View File

@ -9,10 +9,15 @@
<li class="md:hidden">
<!-- prettier-ignore -->
<span class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white bg-gray-200 dark:bg-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="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>
{% if current_user.avatar_img %}
<img class="w-9 h-9 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-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 %}
<p class="ml-2">{{ current_user.username }}</p>
</span>
</li>
<li>
<li class="md:hidden">
<a
href="{{ url_for('user.profile') }}"
class="flex items-center p-2 text-gray-900 rounded-lg dark:text-white hover:bg-gray-100 dark:hover:bg-gray-700">