Add (news bites)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
@import url(https://fonts.bunny.net/css?family=noto-serif:300,400,700,700i|roboto-condensed:700);
|
||||
@import url(https://fonts.bunny.net/css?family=noto-serif:300,400,700,700i|roboto-condensed:300,400,500,600,700);
|
||||
|
||||
@import "variables";
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<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>
|
||||
<p class="mb-0">
|
||||
FutureWalker is an innovative news platform specializing in cutting-edge technology and AI developments. We
|
||||
provide insightful coverage on the latest breakthroughs and trends, offering our audience a front-row seat to
|
||||
the advancements shaping our future. Stay informed and ahead with FutureWalker, your go-to source for tech news
|
||||
that matters.
|
||||
FutureWalker offers specialized coverage of advanced technology and AI breakthroughs, delivering the latest trends and insights through concise, 1-2 minute news updates to quickly bring you up to speed.
|
||||
</p>
|
||||
</aside>
|
||||
|
||||
86
resources/views/front/partials/news_bites.blade.php
Normal file
86
resources/views/front/partials/news_bites.blade.php
Normal file
@@ -0,0 +1,86 @@
|
||||
<div class="accordion" id="accordionTechBites">
|
||||
|
||||
@foreach ($rss_posts as $key => $post)
|
||||
|
||||
<div class="accordion-item">
|
||||
<h2 class="accordion-header" id="heading{{ $post->id }}">
|
||||
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse"
|
||||
data-bs-target="#collapse{{ $post->id }}" aria-controls="collapse{{ $post->id }}">
|
||||
<div>
|
||||
<h3 class="h6 mb-2 fw fw-semibold font-family-roboto-condensed">
|
||||
{{ $post->title }}
|
||||
</h3>
|
||||
|
||||
<div class="d-flex flex-wrap mb-1">
|
||||
@if ($post->entities)
|
||||
@foreach ($post->entities as $key => $keyword)
|
||||
|
||||
@if ($key == 0)
|
||||
<h4
|
||||
class="mb-1 pb-1 d-inline badge bg-secondary border-secondary text-white border me-1 small fw-bold">
|
||||
{{ $keyword }}
|
||||
</h4>
|
||||
@else
|
||||
<h4
|
||||
class="mb-1 pb-1 d-inline badge text-bg-light border me-1 small fw-normal">
|
||||
{{ $keyword }}
|
||||
</h4>
|
||||
@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">{{ $post->published_at->format('d M') }}</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{{ $post->id }}" class="accordion-collapse collapse" aria-labelledby="heading{{ $post->id }}"
|
||||
data-bs-parent="#accordionTechBites">
|
||||
<div class="accordion-body small">
|
||||
<div class="mb-3">{{ $post->bites }}</div>
|
||||
|
||||
@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">
|
||||
More about: @foreach( $post->keywords as $keyword) <a class="ms-1" href="{{ route('front.search.results',['query' => strtolower($keyword) ]) }}">{{ $keyword }}</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>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@endforeach
|
||||
|
||||
|
||||
</div>
|
||||
@@ -14,9 +14,9 @@
|
||||
@endif
|
||||
@else
|
||||
@if (isset($category) && !is_null($category))
|
||||
{{ $category->name }} News from FutureWalker
|
||||
{{ $category->name }} News Bites from FutureWalker
|
||||
@else
|
||||
AI & Tech News from FutureWalker
|
||||
AI & Tech News Bites from FutureWalker
|
||||
@endif
|
||||
@endif
|
||||
</h1>
|
||||
|
||||
55
resources/views/front/rss_post_list.blade.php
Normal file
55
resources/views/front/rss_post_list.blade.php
Normal file
@@ -0,0 +1,55 @@
|
||||
@extends('front.layouts.app')
|
||||
@section('content')
|
||||
<main class="container-lg mt-3">
|
||||
|
||||
@include('front.partials.breadcrumbs')
|
||||
|
||||
<div class="row g-4">
|
||||
<div class="col-md-8">
|
||||
<h1 class="pb-2 h2 font-family-roboto-condensed">
|
||||
|
||||
@if ($page_type == 'search')
|
||||
@if (isset($title))
|
||||
{{ $title }}
|
||||
@endif
|
||||
@else
|
||||
@if (isset($category) && !is_null($category))
|
||||
Latest {{ $category->name }} from FutureWalker
|
||||
@else
|
||||
AI & Tech News from FutureWalker
|
||||
@endif
|
||||
@endif
|
||||
</h1>
|
||||
|
||||
@include('front.partials.news_bites')
|
||||
|
||||
<div class="mt-3 mb-3">
|
||||
@if ($rss_posts->count() > 0)
|
||||
@if ($rss_posts instanceof \Illuminate\Pagination\CursorPaginator)
|
||||
<div class="flex justify-center">
|
||||
{{ $rss_posts->links('pagination::simple-bootstrap-5-rounded') }}
|
||||
</div>
|
||||
@endif
|
||||
@else
|
||||
<div class="py-3 text-center">
|
||||
<div class="mb-4">No 🍪 bites found yet.</div>
|
||||
<div><a href="{{ route('front.all') }}">See more News Bites</a></div>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<div class="position-sticky" style="top: 8rem;">
|
||||
@include('front.partials.sidebar')
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
@endsection
|
||||
|
||||
@push('top_head')
|
||||
{!! $breadcrumb_context !!}
|
||||
@endpush
|
||||
@@ -8,7 +8,7 @@
|
||||
<div class="display-6 fw-bold font-family-roboto-condensed mb-2">Your future depends<wbr> on today's
|
||||
news.</div>
|
||||
<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 from
|
||||
optional—it's critical for your future success. Stay updated with daily news 🍪 bites from
|
||||
<strong>FutureWalker</strong>.
|
||||
</h1>
|
||||
<a href="#latest-news" class="btn btn-primary px-4 rounded-pill text-decoration-none">Start reading
|
||||
@@ -18,7 +18,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($featured_posts->count() > 0)
|
||||
{{-- @if ($featured_posts->count() > 0)
|
||||
<div class="container-lg py-4">
|
||||
<div class="text-center">
|
||||
<h2 id="latest-news" class="font-family-roboto-condensed mb-3 h2">Featured News</h2>
|
||||
@@ -50,16 +50,34 @@ class="text-secondary">{{ $post->published_at->diffForHumans() }}</small>
|
||||
@endforeach
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if ($latest_posts->count() > 0)
|
||||
<div class="container-lg py-4">
|
||||
@endif --}}
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-8 mb-3">
|
||||
<div class="container-lg py-4">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-12 col-lg-8 mb-3">
|
||||
|
||||
@if ($rss_posts->count() > 0)
|
||||
<div class="text-start mb-3">
|
||||
<h2 id="latest-news" class="fw-bold font-family-roboto-condensed mb-1 h2">🍪 Tech Bites</h2>
|
||||
<h5>1-2 minute news bites worth every second</h5>
|
||||
</div>
|
||||
|
||||
|
||||
@include('front.partials.news_bites')
|
||||
|
||||
<div class="w-full text-center mt-3 mb-3">
|
||||
<a href="{{ route('front.all') }}"
|
||||
class="btn btn-primary px-4 rounded-pill text-decoration-none">Read more News Bites</a>
|
||||
</div>
|
||||
|
||||
|
||||
@endif
|
||||
|
||||
{{-- @if ($latest_posts->count() > 0)
|
||||
<div class="text-start">
|
||||
<h2 id="latest-news" class="fw-bold font-family-roboto-condensed mb-3 h2">Latest News</h2>
|
||||
<h2 id="latest-news" class="fw-semibold font-family-roboto-condensed mb-3 h2">Latest News</h2>
|
||||
</div>
|
||||
<div class="row g-2 mb-4">
|
||||
@foreach ($latest_posts as $post)
|
||||
@@ -68,7 +86,7 @@ class="text-secondary">{{ $post->published_at->diffForHumans() }}</small>
|
||||
<div class="card-body d-flex px-3 py-2">
|
||||
|
||||
<div class="row align-self-center">
|
||||
|
||||
|
||||
<div class="col-12 d-flex py-1" style="height:100%;">
|
||||
<div class="align-self-center">
|
||||
<div class="">
|
||||
@@ -85,16 +103,20 @@ class="fw-bold"
|
||||
<div class="d-flex flex-wrap">
|
||||
@foreach ($post->keywords as $keyword)
|
||||
@if ($keyword == $post->main_keyword)
|
||||
<h4 class=" pb-1 d-inline badge text-bg-dark me-1 small">{{ $keyword }}</h4>
|
||||
<h4
|
||||
class=" pb-1 d-inline badge text-bg-dark me-1 small">
|
||||
{{ $keyword }}</h4>
|
||||
@else
|
||||
<h4 class=" pb-1 d-inline badge text-bg-light border me-1 small fw-normal">{{ $keyword }}</h4>
|
||||
<h4
|
||||
class=" pb-1 d-inline badge text-bg-light border me-1 small fw-normal">
|
||||
{{ $keyword }}</h4>
|
||||
@endif
|
||||
@endforeach
|
||||
</div>
|
||||
<div>
|
||||
@if($post->category)
|
||||
<span
|
||||
class="d-inline text-secondary small">{{ $post->category->name }}</span>
|
||||
@if ($post->category)
|
||||
<span
|
||||
class="d-inline text-secondary small">{{ $post->category->name }}</span>
|
||||
<i class="bi bi-dot"></i>
|
||||
@endif
|
||||
|
||||
@@ -119,21 +141,19 @@ class="d-inline text-secondary small">{{ markdown_min_read($post->body) }}</span
|
||||
class="btn btn-primary px-4 rounded-pill text-decoration-none">Discover More
|
||||
News</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-12 col-lg-4 mb-3">
|
||||
<div class="position-sticky" style="top: 8rem;">
|
||||
@include('front.partials.sidebar')
|
||||
@endif --}}
|
||||
|
||||
</div>
|
||||
<div class="col-12 col-lg-4 mb-3">
|
||||
<div class="position-sticky" style="top: 8rem;">
|
||||
@include('front.partials.sidebar')
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
@endif
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
</main>
|
||||
@endsection
|
||||
|
||||
Reference in New Issue
Block a user