profiles => format clean archi

This commit is contained in:
styve Lioumba
2025-10-20 20:34:45 +02:00
parent 4191ac1ed0
commit ef02c6a537
171 changed files with 25748 additions and 23863 deletions

View File

@@ -1,40 +1,60 @@
@if (user != undefined) {
<a [routerLink]="[user.username?user.username:user.id]" [state]="{user,profile}" class="cursor-pointer">
<div class="group text-center text-gray-500 dark:text-gray-400 ">
@if (profile.estVerifier) {
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="currentColor" class="size-6 text-purple-800">
<path fill-rule="evenodd"
d="M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z"
clip-rule="evenodd"/>
</svg>
}
@if (user.avatar) {
<img
class="mx-auto mb-4 w-36 h-36 rounded-full grayscale object-cover object-top ransition duration-500 group-hover:scale-105 group-hover:grayscale-0 "
src="{{environment.baseUrl}}/api/files/users/{{user.id}}/{{user.avatar}}" alt="{{user.username}}" loading="lazy">
} @else {
<img
class="mx-auto mb-4 w-36 h-36 rounded-full grayscale object-cover object-top ransition duration-500 group-hover:scale-105 group-hover:grayscale-0 "
src="https://api.dicebear.com/9.x/adventurer/svg?seed={{user.username}}" alt="{{user.username}}" loading="lazy">
}
<div
class="translate-y-2 transition duration-300 ease-in-out group-hover:translate-y-0 flex flex-col items-center space-y-2">
@if (user.name) {
<h3 class="mb-1 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">{{ user.name }}</h3>
} @else if (user.username) {
<h3 class="mb-1 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">{{ user.username }}</h3>
} @else {
<h3 class="text-xl font-bold tracking-tight text-gray-900 dark:text-white">Non mentionné</h3>
}
<p class="font-semibold">{{ profile.profession }}</p>
<app-chips [sectorId]="profile.secteur"/>
<app-reseaux [reseaux]="profile.reseaux"/>
</div>
</div>
</a>
}
@if (user != undefined) {
<a
[routerLink]="[user.username ? user.username : user.id]"
[state]="{ user, profile }"
class="cursor-pointer"
>
<div class="group text-center text-gray-500 dark:text-gray-400">
@if (profile.estVerifier) {
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 24 24"
fill="currentColor"
class="size-6 text-purple-800"
>
<path
fill-rule="evenodd"
d="M8.603 3.799A4.49 4.49 0 0 1 12 2.25c1.357 0 2.573.6 3.397 1.549a4.49 4.49 0 0 1 3.498 1.307 4.491 4.491 0 0 1 1.307 3.497A4.49 4.49 0 0 1 21.75 12a4.49 4.49 0 0 1-1.549 3.397 4.491 4.491 0 0 1-1.307 3.497 4.491 4.491 0 0 1-3.497 1.307A4.49 4.49 0 0 1 12 21.75a4.49 4.49 0 0 1-3.397-1.549 4.49 4.49 0 0 1-3.498-1.306 4.491 4.491 0 0 1-1.307-3.498A4.49 4.49 0 0 1 2.25 12c0-1.357.6-2.573 1.549-3.397a4.49 4.49 0 0 1 1.307-3.497 4.49 4.49 0 0 1 3.497-1.307Zm7.007 6.387a.75.75 0 1 0-1.22-.872l-3.236 4.53L9.53 12.22a.75.75 0 0 0-1.06 1.06l2.25 2.25a.75.75 0 0 0 1.14-.094l3.75-5.25Z"
clip-rule="evenodd"
/>
</svg>
}
@if (user.avatar) {
<img
class="mx-auto mb-4 w-36 h-36 rounded-full grayscale object-cover object-top ransition duration-500 group-hover:scale-105 group-hover:grayscale-0"
src="{{ environment.baseUrl }}/api/files/users/{{ user.id }}/{{ user.avatar }}"
alt="{{ user.username }}"
loading="lazy"
/>
} @else {
<img
class="mx-auto mb-4 w-36 h-36 rounded-full grayscale object-cover object-top ransition duration-500 group-hover:scale-105 group-hover:grayscale-0"
src="https://api.dicebear.com/9.x/adventurer/svg?seed={{ user.username }}"
alt="{{ user.username }}"
loading="lazy"
/>
}
<div
class="translate-y-2 transition duration-300 ease-in-out group-hover:translate-y-0 flex flex-col items-center space-y-2"
>
@if (user.name) {
<h3 class="mb-1 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
{{ user.name }}
</h3>
} @else if (user.username) {
<h3 class="mb-1 text-2xl font-bold tracking-tight text-gray-900 dark:text-white">
{{ user.username }}
</h3>
} @else {
<h3 class="text-xl font-bold tracking-tight text-gray-900 dark:text-white">
Non mentionné
</h3>
}
<p class="font-semibold">{{ profile.profession }}</p>
<app-chips [sectorId]="profile.secteur" />
<app-reseaux [reseaux]="profile.reseaux" />
</div>
</div>
</a>
}