Update (UI)
This commit is contained in:
@@ -28,7 +28,7 @@ public function home(Request $request)
|
|||||||
|
|
||||||
$top_rss_keywords = HybridTopRssPostKeywords::get(1, 16);
|
$top_rss_keywords = HybridTopRssPostKeywords::get(1, 16);
|
||||||
|
|
||||||
$rss_posts = RssPost::with('entities_keywords')->where('status', 'published')->orderBy('published_at', 'desc')->paginate(15);
|
$rss_posts = RssPost::with('entities_keywords')->whereNotNull('keywords')->where('status', 'published')->orderBy('published_at', 'desc')->paginate(15);
|
||||||
|
|
||||||
return response(view('front.welcome', compact('rss_posts', 'top_rss_keywords')), 200);
|
return response(view('front.welcome', compact('rss_posts', 'top_rss_keywords')), 200);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,6 +64,7 @@ public function searchResults(Request $request, $query)
|
|||||||
|
|
||||||
$rss_posts = RssPost::with('category', 'entities_keywords')
|
$rss_posts = RssPost::with('category', 'entities_keywords')
|
||||||
->where('status', 'published')
|
->where('status', 'published')
|
||||||
|
->whereNotNull('keywords')
|
||||||
->whereRaw("to_tsvector('english', title || ' ' || bites || ' ' || keyword_list) @@ plainto_tsquery('english', ?)", [trim(preg_replace('/\s+/', ' ', $query))])
|
->whereRaw("to_tsvector('english', title || ' ' || bites || ' ' || keyword_list) @@ plainto_tsquery('english', ?)", [trim(preg_replace('/\s+/', ' ', $query))])
|
||||||
->where('published_at', '<=', now())
|
->where('published_at', '<=', now())
|
||||||
->orderBy('published_at', 'desc')
|
->orderBy('published_at', 'desc')
|
||||||
@@ -106,6 +107,7 @@ public function index(Request $request)
|
|||||||
//SEOTools::setDescription($description);
|
//SEOTools::setDescription($description);
|
||||||
|
|
||||||
$rss_posts = RssPost::with('category', 'entities_keywords')->where('status', 'published')
|
$rss_posts = RssPost::with('category', 'entities_keywords')->where('status', 'published')
|
||||||
|
->whereNotNull('keywords')
|
||||||
->where('published_at', '<=', now())
|
->where('published_at', '<=', now())
|
||||||
->orderBy('published_at', 'desc')
|
->orderBy('published_at', 'desc')
|
||||||
->cursorPaginate(60) ?? collect();
|
->cursorPaginate(60) ?? collect();
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
* The default configurations to be used by the meta generator.
|
* The default configurations to be used by the meta generator.
|
||||||
*/
|
*/
|
||||||
'defaults' => [
|
'defaults' => [
|
||||||
'title' => 'FutureWalker: Daily AI & tech news', // set false to total remove
|
'title' => 'FutureWalker: Real-time AI & tech news', // set false to total remove
|
||||||
'titleBefore' => false, // Put defaults.title before page title, like 'It's Over 9000! - Dashboard'
|
'titleBefore' => false, // Put defaults.title before page title, like 'It's Over 9000! - Dashboard'
|
||||||
'description' => 'Stay updated with critical AI & tech news to build your future.', // set false to total remove
|
'description' => 'Stay updated with critical AI & tech news to build your future.', // set false to total remove
|
||||||
'separator' => ' - ',
|
'separator' => ' - ',
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
* The default configurations to be used by the opengraph generator.
|
* The default configurations to be used by the opengraph generator.
|
||||||
*/
|
*/
|
||||||
'defaults' => [
|
'defaults' => [
|
||||||
'title' => 'FutureWalker: Daily AI & tech news', // set false to total remove
|
'title' => 'FutureWalker: Real-time AI & tech news', // set false to total remove
|
||||||
'description' => 'Stay updated with critical AI & tech news to build your future.', // set false to total remove
|
'description' => 'Stay updated with critical AI & tech news to build your future.', // set false to total remove
|
||||||
'url' => null, // Set null for using Url::current(), set false to total remove
|
'url' => null, // Set null for using Url::current(), set false to total remove
|
||||||
'type' => 'website',
|
'type' => 'website',
|
||||||
@@ -61,7 +61,7 @@
|
|||||||
* The default configurations to be used by the json-ld generator.
|
* The default configurations to be used by the json-ld generator.
|
||||||
*/
|
*/
|
||||||
'defaults' => [
|
'defaults' => [
|
||||||
'title' => 'FutureWalker: Daily AI & tech news', // set false to total remove
|
'title' => 'FutureWalker: Real-time AI & tech news', // set false to total remove
|
||||||
'description' => 'Stay updated with critical AI & tech news to build your future.', // set false to total remove
|
'description' => 'Stay updated with critical AI & tech news to build your future.', // set false to total remove
|
||||||
'url' => 'current', // Set to null or 'full' to use Url::full(), set to 'current' to use Url::current(), set false to total remove
|
'url' => 'current', // Set to null or 'full' to use Url::full(), set to 'current' to use Url::current(), set false to total remove
|
||||||
'type' => 'WebPage',
|
'type' => 'WebPage',
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
<aside class="p-4 mb-3 bg-black text-white rounded-3 shadow-sm">
|
<aside class="p-4 mb-3 bg-black text-white rounded-3 shadow-sm">
|
||||||
<h4 class="font-family-roboto-condensed">About <span class="text-uppercase">FutureWalker</span></h4>
|
<h4 class="font-family-roboto-condensed">About <span class="text-uppercase">FutureWalker</span></h4>
|
||||||
<p class="mb-0">
|
<p class="mb-0">
|
||||||
FutureWalker offers specialized coverage of advanced technology and AI breakthroughs, delivering the latest
|
FutureWalker is a AI-powered news syndication site, hyperfocused only latest AI & tech news.
|
||||||
trends and insights through concise, 1-2 minute news updates to quickly bring you up to speed.
|
|
||||||
</p>
|
</p>
|
||||||
</aside>
|
</aside>
|
||||||
|
|||||||
@@ -1,34 +1,32 @@
|
|||||||
<div class="accordion" id="accordionTechBites">
|
@foreach ($rss_posts as $key => $post)
|
||||||
|
<div class="card mb-1">
|
||||||
@foreach ($rss_posts as $key => $post)
|
<div class="card-body">
|
||||||
<div class="accordion-item">
|
<div class="d-flex justify-content-between">
|
||||||
<h2 class="accordion-header" id="heading{{ $key }}">
|
<div class="">
|
||||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
<h3 class="h6 mb-1 fw fw-semibold font-family-roboto-condensed">
|
||||||
data-bs-target="#collapse{{ $key }}" aria-controls="collapse{{ $key }}">
|
|
||||||
<div>
|
|
||||||
<h3 class="h6 mb-2 fw fw-semibold font-family-roboto-condensed">
|
|
||||||
{{ $post->title }}
|
{{ $post->title }}
|
||||||
</h3>
|
</h3>
|
||||||
|
|
||||||
|
@if ($post->entities_keywords->count() > 0)
|
||||||
<div class="d-flex flex-wrap mb-1">
|
<div class="d-flex flex-wrap mb-1">
|
||||||
@if ($post->entities)
|
{{-- @if ($post->entities) --}}
|
||||||
@foreach ($post->entities_keywords as $keyword)
|
@foreach ($post->entities_keywords as $keyword)
|
||||||
{{-- @if ($keyword->type == 'entity') --}}
|
{{-- @if ($keyword->type == 'entity') --}}
|
||||||
@if ($loop->iteration <= 2)
|
@if ($loop->iteration <= 2)
|
||||||
@if ($keyword->is_main)
|
@if ($keyword->is_main)
|
||||||
<h4
|
<h4
|
||||||
class="mb-1 pb-1 d-inline badge bg-secondary border-secondary text-white border me-1 small fw-bold">
|
class="mb-0 pb-1 d-inline badge bg-secondary border-secondary text-white border me-1 small fw-bold">
|
||||||
{{ $keyword->value }}
|
{{ $keyword->value }}
|
||||||
</h4>
|
</h4>
|
||||||
@else
|
@else
|
||||||
<h4
|
<h4
|
||||||
class="mb-1 pb-1 d-inline badge text-bg-light border me-1 small fw-normal">
|
class="mb-0 pb-1 d-inline badge text-bg-light border me-1 small fw-normal">
|
||||||
{{ $keyword->value }}
|
{{ $keyword->value }}
|
||||||
</h4>
|
</h4>
|
||||||
@endif
|
@endif
|
||||||
@elseif ($loop->iteration == 3)
|
@elseif ($loop->iteration == 3)
|
||||||
<h4
|
<h4
|
||||||
class="mb-1 pb-1 d-inline badge text-bg-light border me-1 small fw-normal">
|
class="mb-0 pb-1 d-inline badge text-bg-light border me-1 small fw-normal">
|
||||||
+{{ count($post->entities_keywords) - 3 }} more
|
+{{ count($post->entities_keywords) - 3 }} more
|
||||||
</h4>
|
</h4>
|
||||||
@break
|
@break
|
||||||
@@ -36,14 +34,15 @@ class="mb-1 pb-1 d-inline badge text-bg-light border me-1 small fw-normal">
|
|||||||
{{-- @endif --}}
|
{{-- @endif --}}
|
||||||
@endforeach
|
@endforeach
|
||||||
|
|
||||||
@endif
|
{{-- @endif --}}
|
||||||
@if ($post->impact_level == 'high')
|
@if ($post->impact_level == 'high')
|
||||||
<h4
|
<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">
|
class="font-family-roboto-condensed mb-0 pb-1 d-inline badge bg-danger border-danger text-white border me-1 small fw-bold text-uppercase">
|
||||||
🔥 High Impact
|
🔥 High Impact
|
||||||
</h4>
|
</h4>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
<div class="small">
|
<div class="small">
|
||||||
@if ($post->category)
|
@if ($post->category)
|
||||||
@@ -59,52 +58,20 @@ class="font-family-roboto-condensed mb-1 pb-1 d-inline badge bg-danger border-da
|
|||||||
@endif
|
@endif
|
||||||
|
|
||||||
</span>
|
</span>
|
||||||
<i class="bi bi-dot"></i>
|
|
||||||
@if (!is_empty($post->bites))
|
@if (!is_empty($post->bites))
|
||||||
|
<i class="bi bi-dot"></i>
|
||||||
<span class="d-inline text-secondary small">{{ min_read($post->bites) }}</span>
|
<span class="d-inline text-secondary small">{{ min_read($post->bites) }}</span>
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</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>
|
||||||
<div class="fw-bold">The Bite:</div>
|
<div class=" text-end d-flex justify-content-end">
|
||||||
<div class="mb-3">{{ $post->bites }}</div>
|
<div class="align-self-center">
|
||||||
@endif
|
<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 </a>
|
||||||
|
|
||||||
@if (!is_empty($post->impact))
|
|
||||||
|
|
||||||
@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
|
|
||||||
|
|
||||||
@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>
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@endforeach
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@endforeach
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
<div class="display-6 fw-bold font-family-roboto-condensed mb-2">Your Future Depends<wbr> on Today's
|
<div class="display-6 fw-bold font-family-roboto-condensed mb-2">Your Future Depends<wbr> on Today's
|
||||||
News</div>
|
News</div>
|
||||||
<h1 class="h4 fw-normal mb-4">In the fast-evolving world of AI and tech, staying updated is not
|
<h1 class="h4 fw-normal mb-4">In the fast-evolving world of AI and tech, staying updated is not
|
||||||
optional—it's critical for your future success. Stay updated with daily news 🍪 bites from
|
optional—it's critical for your future success. Stay updated with hourly news
|
||||||
<strong>FutureWalker</strong>.
|
<strong>FutureWalker</strong>.
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
@@ -77,7 +77,7 @@ class="text-secondary">{{ $post->published_at->diffForHumans() }}</small>
|
|||||||
<div class="text-start mb-3">
|
<div class="text-start mb-3">
|
||||||
<div class="d-flex">
|
<div class="d-flex">
|
||||||
<h2 class="align-self-center fw-bold font-family-roboto-condensed mb-1 h2">
|
<h2 class="align-self-center fw-bold font-family-roboto-condensed mb-1 h2">
|
||||||
🍪 Tech Bites </h2>
|
This Just In 🛰️</h2>
|
||||||
<div class="align-self-center">
|
<div class="align-self-center">
|
||||||
<span
|
<span
|
||||||
class="mb-2 ms-2 badge illuminated-slow bg-gradient-rainbow text-white d-inline-flex font-family-roboto-condensed"><i
|
class="mb-2 ms-2 badge illuminated-slow bg-gradient-rainbow text-white d-inline-flex font-family-roboto-condensed"><i
|
||||||
@@ -86,10 +86,6 @@ class="bi bi-clock-history me-1"></i> UPDATED HOURLY</span>
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h5 class="h6">
|
|
||||||
Tap on <i class="bi bi-chevron-down"></i> to read the 1 minute news bite worth every second
|
|
||||||
</h5>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
@@ -97,7 +93,7 @@ class="bi bi-clock-history me-1"></i> UPDATED HOURLY</span>
|
|||||||
|
|
||||||
<div class="w-full text-center mt-3 mb-3">
|
<div class="w-full text-center mt-3 mb-3">
|
||||||
<a href="{{ route('front.all') }}"
|
<a href="{{ route('front.all') }}"
|
||||||
class="btn btn-primary px-4 rounded-pill text-decoration-none">Read more News Bites</a>
|
class="btn btn-primary px-4 rounded-pill text-decoration-none">Discover more news</a>
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user