Files
eatvio-infra/resources/views/components/profile/blog-post.blade.php
2023-10-04 17:57:09 +03:00

81 lines
3.7 KiB
PHP

<div class="p-3 mb-4 --bg_white --shadow --radius --no_wrap" id="profile-{{ $user->id . "_" . $post->id }}">
@php
$postShowUrl = route('blog_post.show', $post->id);
$postViewsCount = views($post)->unique()->count();
@endphp
<div class="d-flex mb-4 align-items-center justify-content-between">
<div class="d-flex align-items-center">
<a href="{{ route('profile.show', $user->id) }}" class="d-none d-sm-block overflow-hidden rounded-full mr-4">
<div class="centered-bg-img" style="background-image: url('{{ $user->profile_photo_url }}')"></div>
</a>
<small>
<span class="d-block --f_bold lh-1">{{ $user->name }}</span>
<span class="--f_grey">{{ $post->updated_at->diffForHumans() }}</span>
</small>
</div>
<!--ul class="navbar-nav" style="--bs-scroll-height:100px;">
<li class="nav-item dropdown">
<a id="dLabel" class="nav-link py-0 dropdown-toggle-js" href="#" data-bs-toggle="dropdown" aria-expanded="false" role="button">
<svg width="18" height="4">
<use xlink:href="#Dots"></use>
</svg>
</a>
<ul class="dropdown-menu" aria-labelledby="navbarScrollingDropdown" aria-labelledby="dLabel">
<li><a class="dropdown-item" href="#">Действие</a></li>
<li><a class="dropdown-item" href="#">Другое действие</a></li>
<li>
<hr class="dropdown-divider">
</li>
<li><a class="dropdown-item" href="#">Что-то еще</a></li>
</ul>
</li>
</ul-->
</div>
<a href="{{ $postShowUrl }}" style="color:#000">
<div class="h6 --f_bold --no_wrap_normal">{{ $post->title }}</div>
<small class="d-block --no_wrap_normal my-3">{!! $post->description !!}</small>
</a>
<div class="post_img position-relative">
<a href="{{ $postShowUrl }}" style="color:#000">
<img src="{{ Storage::url($post->image) }}" class="w-100" />
</a>
<div class="post_v_l w-100 d-flex justify-content-center align-items-center position-absolute --f_white">
<svg width="20" height="14" class="me-2">
<use xlink:href="#Eye_White"></use>
</svg>
<span class="me-3">{{ $postViewsCount }}</span>
<svg width="16" height="14" class="me-2">
<use xlink:href="#Heart_White"></use>
</svg>
<span class="me-3">{{ $post->likes_count }}</span>
</div>
</div>
<div class="d-flex mt-3 align-items-center justify-content-between --f_bold">
<a href="{{ $postShowUrl }}#commentsList" class="d-flex align-items-center --f_main"><small>
<svg width="21" height="20" class="me-1">
<use xlink:href="#ActionComment"></use>
</svg>
{{ __('profile.comment') }}
</small></a>
<a href="#" class="d-flex align-items-center --f_main"><small>
<svg width="24" height="21" class="me-1">
<use xlink:href="#HeartPath"></use>
</svg>
{{ __('profile.like') }}
</small></a>
<a href="#" class="d-flex align-items-center --f_main copy-link" data-link-url="{{ $postShowUrl }}"><small>
<svg width="21" height="22" class="me-1">
<use xlink:href="#Share"></use>
</svg>
<span class="d-none d-sm-inline">{{ __('profile.share') }}</span>
</small>
</a>
</div>
</div>