Add (badge)
This commit is contained in:
@@ -14,82 +14,91 @@
|
||||
@if ($post->entities)
|
||||
@foreach ($post->entities_keywords as $keyword)
|
||||
@if ($keyword->type == 'entity')
|
||||
@if ($keyword->is_main)
|
||||
<h4
|
||||
class="mb-1 pb-1 d-inline badge bg-secondary border-secondary text-white border me-1 small fw-bold">
|
||||
{{ $keyword->value }}
|
||||
</h4>
|
||||
@else
|
||||
@if ($loop->iteration <= 2)
|
||||
@if ($keyword->is_main)
|
||||
<h4
|
||||
class="mb-1 pb-1 d-inline badge bg-secondary border-secondary text-white border me-1 small fw-bold">
|
||||
{{ $keyword->value }}
|
||||
</h4>
|
||||
@else
|
||||
<h4
|
||||
class="mb-1 pb-1 d-inline badge text-bg-light border me-1 small fw-normal">
|
||||
{{ $keyword->value }}
|
||||
</h4>
|
||||
@endif
|
||||
@elseif ($loop->iteration == 3)
|
||||
<h4
|
||||
class="mb-1 pb-1 d-inline badge text-bg-light border me-1 small fw-normal">
|
||||
{{ $keyword->value }}
|
||||
+{{ count($post->entities_keywords) - 3 }} more
|
||||
</h4>
|
||||
@endif
|
||||
@break
|
||||
@endif
|
||||
@endforeach
|
||||
@endif
|
||||
@if ($post->impact_level == 'high')
|
||||
<h4
|
||||
class="font-family-roboto-condensed mb-1 pb-1 d-inline badge bg-danger border-danger text-white border me-1 small fw-bold text-uppercase">
|
||||
🔥 High Impact
|
||||
</h4>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="small">
|
||||
@if ($post->category)
|
||||
<span class="d-inline text-secondary small">{{ $post->category->name }}</span>
|
||||
<i class="bi bi-dot"></i>
|
||||
@endif
|
||||
|
||||
<span class="d-inline text-secondary small">
|
||||
@if ($post->published_at->isBetween(now()->subDays(1), now()))
|
||||
{{ $post->published_at->diffForHumans() }}
|
||||
@else
|
||||
{{ $post->published_at->format('d M') }}
|
||||
@endif
|
||||
|
||||
</span>
|
||||
<i class="bi bi-dot"></i>
|
||||
<span class="d-inline text-secondary small">{{ min_read($post->bites) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</h2>
|
||||
<div id="collapse{{ $key }}" class="accordion-collapse collapse"
|
||||
aria-labelledby="heading{{ $key }}" data-bs-parent="#accordionTechBites">
|
||||
<div class="accordion-body small">
|
||||
|
||||
@if (!is_empty($post->bites))
|
||||
<div class="fw-bold">The Bite:</div>
|
||||
<div class="mb-3">{{ $post->bites }}</div>
|
||||
@endif
|
||||
|
||||
@if (in_array($post->impact_level, ['medium', 'high']))
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<div class="fw-bold">Social Impact:</div>
|
||||
<div>{{ $post->impact }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if ($post->entities)
|
||||
<div class="mb-2 text-wrap">
|
||||
More about: @foreach ($post->entities_keywords as $keyword)
|
||||
<a class="word-wrap-break-word ms-2"
|
||||
href="{{ get_route_search_result($keyword->value_lowercased) }}">#{{ $keyword->value_lowercased }}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
<div>
|
||||
Read more at:
|
||||
<a class="" target="_blank" rel="nofollow noopener noreferrer"
|
||||
href="{{ $post->post_url }}"> {{ get_domain_from_url($post->post_url) }} </a>
|
||||
|
||||
@endif
|
||||
@if ($post->impact_level == 'high')
|
||||
<h4
|
||||
class="font-family-roboto-condensed mb-1 pb-1 d-inline badge bg-danger border-danger text-white border me-1 small fw-bold text-uppercase">
|
||||
🔥 High Impact
|
||||
</h4>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="small">
|
||||
@if ($post->category)
|
||||
<span class="d-inline text-secondary small">{{ $post->category->name }}</span>
|
||||
<i class="bi bi-dot"></i>
|
||||
@endif
|
||||
|
||||
<span class="d-inline text-secondary small">
|
||||
@if ($post->published_at->isBetween(now()->subDays(1), now()))
|
||||
{{ $post->published_at->diffForHumans() }}
|
||||
@else
|
||||
{{ $post->published_at->format('d M') }}
|
||||
@endif
|
||||
|
||||
</span>
|
||||
<i class="bi bi-dot"></i>
|
||||
<span class="d-inline text-secondary small">{{ min_read($post->bites) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</button>
|
||||
</h2>
|
||||
<div id="collapse{{ $key }}" class="accordion-collapse collapse"
|
||||
aria-labelledby="heading{{ $key }}" data-bs-parent="#accordionTechBites">
|
||||
<div class="accordion-body small">
|
||||
|
||||
@if (!is_empty($post->bites))
|
||||
<div class="fw-bold">The Bite:</div>
|
||||
<div class="mb-3">{{ $post->bites }}</div>
|
||||
@endif
|
||||
|
||||
@if (in_array($post->impact_level, ['medium', 'high']))
|
||||
<div class="card mb-2">
|
||||
<div class="card-body">
|
||||
<div class="fw-bold">Social Impact:</div>
|
||||
<div>{{ $post->impact }}</div>
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
@if ($post->entities)
|
||||
<div class="mb-2 text-wrap">
|
||||
More about: @foreach ($post->entities_keywords as $keyword)
|
||||
<a class="word-wrap-break-word ms-2"
|
||||
href="{{ get_route_search_result($keyword->value_lowercased) }}">#{{ $keyword->value_lowercased }}</a>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
<div>
|
||||
Read the full article:
|
||||
<a target="_blank" rel="nofollow noopener noreferrer" href="{{ $post->post_url }}">
|
||||
{{ get_domain_from_url($post->post_url) }} </a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endforeach
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user