Update (ui)

This commit is contained in:
2023-12-03 13:14:42 +08:00
parent 2b9c5f88bc
commit 8309fd467c
22 changed files with 191 additions and 98 deletions

View File

@@ -2,34 +2,35 @@
<div class="card mb-1">
<div class="card-body">
<div class="d-grid d-md-flex justify-content-md-between">
<div class="w-100">
<h3 class="h6 mb-1 fw fw-semibold font-family-roboto-condensed">
<div class="w-100 mb-2">
<h3 class="h5 mb-1 fw fw-semibold font-family-roboto-condensed">
{{ $post->title }}
</h3>
@if ($post->entities_keywords->count() > 0)
<div class="d-flex flex-wrap mb-1 gap-1">
{{-- @if ($post->entities) --}}
@foreach ($post->entities_keywords as $keyword)
{{-- @if ($keyword->type == 'entity') --}}
@if ($loop->iteration <= 3)
@if ($keyword->is_main)
<h4 class="mb-0 pb-1 d-inline badge bg-secondary border-secondary text-white border small fw-bold">
{{ $keyword->value }}
</h4>
@else
<h4 class="mb-0 pb-1 d-inline badge text-bg-light border small fw-normal">
{{ $keyword->value }}
</h4>
@endif
@elseif ($loop->iteration > 3 && count($post->entities_keywords) > 3)
<h4 class="mb-0 pb-1 d-inline badge text-bg-light border small fw-normal">
+{{ count($post->entities_keywords) - 3 }} more
</h4>
@break
@endif
{{-- @endif --}}
@endforeach
{{-- @if ($post->entities) --}}
@foreach ($post->entities_keywords as $keyword)
{{-- @if ($keyword->type == 'entity') --}}
@if ($loop->iteration <= 3)
@if ($keyword->is_main)
<h4
class="mb-0 pb-1 d-inline badge bg-secondary border-secondary text-white border small fw-bold">
{{ $keyword->value }}
</h4>
@else
<h4 class="mb-0 pb-1 d-inline badge text-bg-light border small fw-normal">
{{ $keyword->value }}
</h4>
@endif
@elseif ($loop->iteration > 3 && count($post->entities_keywords) > 3)
<h4 class="mb-0 pb-1 d-inline badge text-bg-light border small fw-normal">
+{{ count($post->entities_keywords) - 3 }} more
</h4>
@break
@endif
{{-- @endif --}}
@endforeach
{{-- @endif --}}
@@ -57,11 +58,6 @@ class="font-family-roboto-condensed mb-0 pb-1 d-inline badge bg-danger border-da
</span>
@if (!is_empty($post->bites))
<i class="bi bi-dot"></i>
<span class="d-inline text-secondary small">{{ min_read($post->bites) }}</span>
@endif
<i class="bi bi-dot"></i>
<span class="d-inline text-secondary small">
{{ get_domain_from_url($post->post_url) }}
@@ -69,10 +65,16 @@ class="font-family-roboto-condensed mb-0 pb-1 d-inline badge bg-danger border-da
</div>
</div>
<div class="text-end d-flex justify-content-end w-100">
<div class="align-self-center">
<div class="text-end d-flex justify-content-center justify-content-md-end w-100">
<div class="align-self-center d-flex d-md-grid gap-1">
<open-news-bite
this-class="btn btn-outline-secondary btn-sm rounded-pill px-3 text-decoration-none"
title="{{ $post->title }}" bite="{{ $post->bites }}"
min-read="{{ min_read($post->bites, 'bite') }}"></open-news-bite>
<a class="btn btn-outline-secondary btn-sm rounded-pill px-3 text-decoration-none"
target="_blank" rel="nofollow noopener noreferrer" href="{{ $post->post_url }}">👉 Read article</a>
target="_blank" rel="nofollow noopener noreferrer" href="{{ $post->post_url }}">👉 Read
full
article</a>
</div>
</div>
</div>