This commit is contained in:
parent
aec931c26d
commit
192d0456e2
1 changed files with 64 additions and 69 deletions
|
|
@ -2,72 +2,68 @@
|
|||
|
||||
{block name="content"}
|
||||
|
||||
<section class="user-profile mb-5 /*vh /* p-5" {if $user->getPseudo()|stripos:'minou' !== false}style=" background-color: #ff8c00 !important; /* Orange tigre */
|
||||
background-image: repeating-linear-gradient(
|
||||
45deg,
|
||||
transparent,
|
||||
transparent 30px,
|
||||
rgba(0, 0, 0, 0.15) 30px,
|
||||
rgba(0, 0, 0, 0.15) 60px
|
||||
) !important;
|
||||
border: 2px solid #000 !important;
|
||||
color: #000 !important;
|
||||
position: relative;
|
||||
z-index: 1;"{/if}>
|
||||
<div class="row" >
|
||||
<div class="col-md-4 text-center">
|
||||
<img src="{$smarty.env.BASE_URL}/{$smarty.env.IMG_USER_PATH}{if ($smarty.env.IMG_USER_PATH|cat:($user->getImage()))|file_exists}{$user->getImage()}{else}images.jpg{/if}" alt="Avatar de {$user->getPseudo()}" class="rounded-circle flex-shrink-0 border border-2 border-white"
|
||||
style="width: 256px; height: 256px; object-fit: cover; margin-top: 8px;{if $user->getPseudo()|stripos:'minou' !== false}
|
||||
box-shadow: 0 0 0 4px #000; {/if}"
|
||||
>
|
||||
{assign var="isMinou" value=($user->getPseudo()|stripos:'minou' !== false)}
|
||||
|
||||
<div class="w-100 align-self-start">
|
||||
|
||||
<!-- Profil -->
|
||||
<section class="mb-5 p-4 rounded-3 {if $isMinou}border border-dark border-2{/if}"
|
||||
{if $isMinou}style="background-color:#ff8c00; background-image:repeating-linear-gradient(45deg,transparent,transparent 30px,rgba(0,0,0,.15) 30px,rgba(0,0,0,.15) 60px);"{/if}>
|
||||
|
||||
<div class="row align-items-center g-4">
|
||||
|
||||
<!-- Avatar -->
|
||||
<div class="col-md-3 text-center">
|
||||
<img src="{$smarty.env.BASE_URL}/{$smarty.env.IMG_USER_PATH}{if ($smarty.env.IMG_USER_PATH|cat:($user->getImage()))|file_exists}{$user->getImage()}{else}images.jpg{/if}"
|
||||
alt="Avatar de {$user->getPseudo()}"
|
||||
class="rounded-circle border border-3 border-white shadow"
|
||||
style="width:180px; height:180px; object-fit:cover; {if $isMinou}outline:4px solid #000;{/if}">
|
||||
</div>
|
||||
<div class="col-md-8 align-items-center p-0">
|
||||
<div>
|
||||
<h1 {if $user->getPseudo()|stripos:'minou' !== false}style="font-weight: 800 !important;
|
||||
text-transform: uppercase;
|
||||
color: #000 !important;"{/if}>{$user->getPseudo()}</h1>
|
||||
<p class="text-muted">{$user->getMail()}</p>
|
||||
|
||||
<!-- Infos -->
|
||||
<div class="col-md-9">
|
||||
<h1 class="fw-bold mb-1 {if $isMinou}text-uppercase text-dark{/if}">
|
||||
{$user->getPseudo()}
|
||||
</h1>
|
||||
<p class="text-muted mb-3">{$user->getMail()}</p>
|
||||
|
||||
{if $user->getWork()}
|
||||
<div class="d-flex align-items-center gap-2 mt-3">
|
||||
<i class="fa-solid fa-briefcase"></i>
|
||||
<p class="mb-0">{$user->getWork()}</p>
|
||||
<div class="d-flex align-items-center gap-2 mb-2">
|
||||
<i class="fa-solid fa-briefcase text-secondary"></i>
|
||||
<span>{$user->getWork()}</span>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $user->getLocation()}
|
||||
|
||||
<div class="d-flex align-items-center gap-2 mt-3">
|
||||
<i class="fa-solid fa-location-dot"></i>
|
||||
<p class="mb-0">{$user->getLocation()}</p>
|
||||
<div class="d-flex align-items-center gap-2 mb-2">
|
||||
<i class="fa-solid fa-location-dot text-secondary"></i>
|
||||
<span>{$user->getLocation()}</span>
|
||||
</div>
|
||||
{/if}
|
||||
{if $user->getLocation()}
|
||||
|
||||
<div class="d-flex align-items-center gap-2 mt-3">
|
||||
<i class="fa-regular fa-note-sticky"></i> <p class="mb-0">{$user->getDescription()}</p>
|
||||
{if $user->getDescription()}
|
||||
<div class="d-flex align-items-center gap-2 mb-3">
|
||||
<i class="fa-regular fa-note-sticky text-secondary"></i>
|
||||
<span>{$user->getDescription()}</span>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($smarty.session.user) && $smarty.session.user.user_id == $user->getId()}
|
||||
<a class="btn btn-sm btn-primary flex-fill" {if $user->getPseudo()|stripos:'minou' !== false}style="
|
||||
background-color: #000 !important;
|
||||
color: #ff8c00 !important;
|
||||
border: none !important;
|
||||
font-weight: bold !important;
|
||||
transition: transform 0.2s;"{/if}
|
||||
href="{$smarty.env.BASE_URL}/user/edit">Edit account</a>
|
||||
<a href="{$smarty.env.BASE_URL}/user/edit"
|
||||
class="btn btn-sm {if $isMinou}btn-dark{else}btn-primary{/if}">
|
||||
✏️ Modifier mon profil
|
||||
</a>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
<section>
|
||||
<!-- Projets -->
|
||||
<section>
|
||||
<h2 class="mb-4 border-bottom pb-2">Les projets de {$user->getPseudo()}</h2>
|
||||
|
||||
<div class="row m-0">
|
||||
<div class="row g-4">
|
||||
{if count($arrProjectToDisplay) > 0}
|
||||
{foreach $arrProjectToDisplay as $objProject}
|
||||
{assign var="isAuthor" value=(isset($smarty.session.user) && $smarty.session.user.user_id == $objProject->getUser_id())}
|
||||
|
|
@ -75,19 +71,18 @@
|
|||
{assign var="isDeleted" value=($objProject->getDeleted_at() !== null)}
|
||||
{assign var="isRefused" value=($objProject->getStatus() == "refusé")}
|
||||
|
||||
{if $isModerator
|
||||
|| ($isAuthor && !$isDeleted)
|
||||
|| (!$isRefused && !$isDeleted)}
|
||||
|
||||
{if $isModerator || ($isAuthor && !$isDeleted) || (!$isRefused && !$isDeleted)}
|
||||
{include file="views/_partial/preview.tpl"}
|
||||
{/if}
|
||||
{/foreach}
|
||||
{else}
|
||||
<div class="col-12">
|
||||
<p class="col-12 alert alert-info">Cet utilisateur n'a pas encore publié de projets.</p>
|
||||
<p class="alert alert-info">Cet utilisateur n'a pas encore publié de projets.</p>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
</section>
|
||||
</section>
|
||||
|
||||
</div>
|
||||
|
||||
{/block}
|
||||
Loading…
Add table
Add a link
Reference in a new issue