Add (initial): futurewalker code

This commit is contained in:
2023-11-20 00:15:18 +08:00
parent f8602cb456
commit 9ce3e5c82a
166 changed files with 15941 additions and 1072 deletions

View File

@@ -13,6 +13,6 @@ class="nav-link px-2 text-body-secondary">Disclaimer</a></li>
<li class="nav-item"><a href="/feeds/posts-feed" class="nav-link px-2 text-body-secondary">RSS</a></li>
</ul>
<p class="text-center text-body-secondary">{{ date('Y') }} EchoScoop. All rights reserved.</p>
<p class="text-center text-body-secondary">&copy; {{ date('Y') }} FutureWalker. All rights reserved.</p>
</footer>
</div>

View File

@@ -1,22 +1,17 @@
<div class="w-full shadow-sm bg-white">
<header class="border-bottom lh-1 py-3">
<div class="row flex-nowrap justify-content-center align-items-center">
<div class="w-full shadow-sm bg-black text-white">
<header class="container lh-1 py-3">
<div class="row d-block d-md-flex justify-content-center align-items-center">
<div class="col-12 col-md-5 col-lg-4 py-2 py-md-0 text-center text-md-start">
<a class="blog-header-logo text-decoration-none text-white" href="{{ route('front.home') }}">
<div class="fw-bolder fs-3 font-family-roboto-condensed text-uppercase">FutureWalker</div>
<div class="col-4 text-center">
<a class="blog-header-logo text-body-emphasis text-decoration-none" href="{{ route('front.home') }}">
<span class="fw-bolder fs-3">EchoScoop</span>
</a>
</div>
<div class="col-12 col-md-7 col-lg-8 text-center text-md-end">
<div>Important news shaping the digital future</div>
</div>
</div>
</header>
<div class="nav-scroller py-2 mb-3 border-bottom">
<nav class="container nav nav-underline justify-content-between">
@foreach ($parent_categories as $category)
<a class="fw-bold nav-item nav-link link-body-emphasis {{ active(route('front.category', ['category_slug' => $category->slug])) }}"
href="{{ route('front.category', ['category_slug' => $category->slug]) }}">{{ $category->short_name }}</a>
@endforeach
</nav>
</div>
</div>

View File

@@ -1,7 +1,6 @@
<div class="p-4 mb-3 bg-white rounded-3 shadow-sm">
<h4 class="fst-italic">About EchoScoop</h4>
<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">
EchoScoop is a streamlined news platform delivering concise global updates. We keep our news to be bite-sized
within 1 to 5 minutes read. Our goal is to keep you promptly informed with each scoop.
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.
</p>
</div>
</aside>

View File

@@ -1,14 +1,21 @@
<div class="row g-0 border-0 rounded-3 overflow-hidden flex-md-row mb-4 shadow-sm h-md-250 position-relative bg-white">
<div class="col p-4 d-flex flex-column position-static">
@if (isset($category) && $category->id != $post->category->id)
<div class="row g-3 border-0 overflow-hidden flex-md-row mb-4 h-md-250 position-relative bg-white">
<div class="col-12 col-lg-3 d-flex" style="height:100%;">
<div class="align-self-center">
<img class="img-fluid rounded-4 shadow" src="{{ $post->featured_image }}"
alt="{{ $post->title }}">
</div>
</div>
<div class="col-12 col-lg-9 d-flex flex-column position-static">
@if (isset($category) && $category->id != $post->category?->id)
<span class="d-inline-block mb-2 text-success-emphasis"><i>Under</i> <strong
class="ms-1">{{ $category->name }} <i class="bi bi-chevron-right small"></i>
{{ $post->category->name }}</strong></span>
class="ms-0">{{ $category?->name }} <i class="bi bi-chevron-right small"></i>
{{ $post->category?->name }}</strong></span>
@else
<span class="d-inline-block mb-2 text-success-emphasis"><i>Under</i> <strong
class="ms-1">{{ $post->category->name }}</strong></span>
@endif
<h3 class="mb-1 h4">{{ $post->title }}</h3>
<h2 class="mb-1 h4 font-family-roboto-condensed">{{ $post->title }}</h2>
<div class="mb-3 text-body-secondary">
@if (!is_empty($post->published_at))
@@ -20,8 +27,9 @@ class="ms-1">{{ $post->category->name }}</strong></span>
{{ markdown_min_read($post->body) }}
</div>
<p class="mb-3">{{ $post->excerpt }}</p>
<a href="{{ route('front.post', ['slug' => $post->slug, 'category_slug' => $post->category->slug]) }}"
<p class="mb-3 small">{{ str_first_sentence($post->bites) }}</p>
<a href="{{ route('front.post', ['slug' => $post->slug, 'category_slug' => $post->category?->slug]) }}"
class="icon-link gap-1 icon-link-hover stretched-link">
Continue reading...
<svg class="bi">

View File

@@ -0,0 +1,9 @@
<aside>
<form class="d-flex mb-3" action="{{ route('front.search')}}" method="POST">
@csrf
<input name="query" class="form-control me-2" type="search" placeholder="Search for AI news..." aria-label="Search">
<button class="btn btn-outline-primary" type="submit">
<i class="bi bi-search"></i>
</button>
</form>
</aside>

View File

@@ -0,0 +1,22 @@
@include('front.partials.about')
@include('front.partials.search')
{{--
<aside class="text-center">
<h3 class="font-family-roboto-condensed h4 text-uppercase">Never miss a news</h3>
<div class="d-flex flex-row justify-content-center">
<a href="https://www.facebook.com/futurewalker" target="_blank" class="mx-1 btn btn-link mb-2">
<i class="bi bi-facebook"></i>
</a>
{{-- <a href="https://twitter.com/futurewalker" target="_blank" class="mx-1 btn btn-link mb-2">
<i class="bi bi-twitter"></i>
</a> --}}
{{-- <a href="https://www.youtube.com/user/hackaday" target="_blank" class="mx-1 btn btn-link mb-2">
<i class="bi bi-youtube"></i>
</a>
<a href="https://hackaday.com/blog/feed/" target="_blank" class="mx-1 btn btn-link mb-2">
<i class="bi bi-rss"></i>
</a>
</div>
</aside>
--}}

View File

@@ -1,23 +1,30 @@
@extends('front.layouts.app')
@section('content')
<main class="container">
<main class="container-lg mt-3">
@include('front.partials.breadcrumbs')
<div class="row g-4">
<div class="col-md-8">
<h1 class="pb-2 fw-normal h2">
@if (isset($category) && !is_null($category))
{{ $category->name }} News from EchoScoop
<h1 class="pb-2 h2 font-family-roboto-condensed">
@if($page_type == 'search')
@if(isset($title))
{{ $title }}
@endif
@else
Latest News from EchoScoop
@if (isset($category) && !is_null($category))
{{ $category->name }} News from FutureWalker
@else
AI &amp; Tech News from FutureWalker
@endif
@endif
</h1>
@if ($posts->count() > 0)
@foreach ($posts as $post)
@include('front.partials.post_detail', ['post' => $post])
@endforeach
@if ($posts instanceof \Illuminate\Pagination\Paginator)
@if ($posts instanceof \Illuminate\Pagination\CursorPaginator)
<div class="flex justify-center">
{{ $posts->links('pagination::simple-bootstrap-5-rounded') }}
</div>
@@ -31,9 +38,9 @@
</div>
<div class="col-md-4">
<div class="position-sticky" style="top: 2rem;">
@include('front.partials.about')
</div>
<div class="position-sticky" style="top: 2rem;">
@include('front.partials.sidebar')
</div>
</div>
</div>
</main>

View File

@@ -1,14 +1,34 @@
@extends('front.layouts.app')
@section('content')
<main class="container">
<main class="container-lg mt-3">
@include('front.partials.breadcrumbs')
<div class="row g-4">
<div class="col-md-8">
<article class="blog-post bg-white rounded-3 shadow-sm px-4 py-4 px-lg-5 py-lg-4
<article class="blog-post
">
<h1 class="fw-bold font-family-roboto-condensed mb-3">{{ $post->title }}</h1>
<div class="mb-2 text-secondary">
<small>{{ $post->published_at->format('jS F Y') }}</small>
<small>By FutureWalker</small>
</div>
<div class="card mb-3 border-0 shadow-sm">
<div class="card-body p-4">
<div class="fw-bold mb-2">Quick News Bite:</div>
<div><small>{{ $post->bites }}</small></div>
</div>
</div>
<div class="row justify-content-center">
<div class="col-12 col-md-12">
<img src="{{ $post->featured_image }}" class="img-fluid rounded-3 shadow-lg mb-3"
alt="">
</div>
</div>
{!! $content !!}
</article>
@@ -16,7 +36,7 @@
<div class="col-md-4">
<div class="position-sticky" style="top: 2rem;">
@include('front.partials.about')
@include('front.partials.sidebar')
</div>
</div>
</div>

View File

@@ -1,58 +1,114 @@
@extends('front.layouts.app')
@section('content')
<main class="container">
@if (!is_null($featured_post))
<div class="p-4 p-md-5 mb-4 rounded-3 text-body-emphasis bg-white shadow-sm">
<div class="col-lg-12 px-0">
<h1 class="display-6 fw-semibold mb-1">{{ $featured_post->title }}</h1>
<div class="mb-1 text-body-secondary">
@if (!is_empty($featured_post->published_at))
{{ $featured_post->published_at->format('M j') }}
@endif
<i class="bi bi-dot"></i>
{{ markdown_min_read($featured_post->body) }}
<main>
<div class="w-full py-5 bg-hero">
<div class="container-lg">
<div class="text-center row justify-content-center">
<div class="col-12 col-md-10 col-lg-8">
<div class="display-6 fw-bold font-family-roboto-condensed mb-2">Your future depends<wbr> on today's
news.</div>
<div 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
<strong>FutureWalker</strong>.
</div>
<a href="#latest-news" class="btn btn-primary px-4 rounded-pill">Start reading now</a>
</div>
<p class="lead my-3 mb-3">{{ $featured_post->excerpt }}</p>
<p class="lead mb-0"><a
href="{{ route('front.post', ['slug' => $featured_post->slug, 'category_slug' => $featured_post->category->slug]) }}"
class=" fw-bold">Continue reading...</a></p>
</div>
</div>
@endif
<div class="row g-4">
<div class="col-md-8">
@if ($latest_posts->count() > 0)
@foreach ($latest_posts as $post)
@include('front.partials.post_detail', ['post' => $post])
@endforeach
<div class="w-100 d-flex justify-content-center">
<a class="btn btn-primary shadow rounded-pill px-3 text-decoration-none"
href="{{ route('front.all') }}">View Latest News</a>
</div>
@else
<div class="py-3 text-center">
<div class="mb-2">No posts found yet.</div>
</div>
@endif
</div>
<div class="col-md-4">
<div class="position-sticky" style="top: 2rem;">
@include('front.partials.about')
</div>
</div>
</div>
@if ($featured_posts->count() > 0)
<div class="container-lg py-4">
<div class="text-center">
<h2 id="latest-news" class="fw-bold font-family-roboto-condensed mb-3 h2">Featured News</h2>
</div>
<div class="row g-3">
@foreach ($featured_posts as $post)
<div class="col-12 col-md-4">
<div class="card border-0" style="height:100%;">
<div class="ratio ratio-16x9">
<img src="{{ $post->featured_image }}" alt="" class="rounded-4 card-img-top shadow"
style="object-fit: cover;">
</div>
<div class="card-body px-0">
<h3 class="h4 fw-bold font-family-roboto-condensed">
<a href="{{ route('front.post', ['category_slug' => $post->category->slug,'slug' => $post->slug]) }}">{{ $post->title }}</a>
</h3>
<p>{{ str_first_sentence($post->bites) }}</p>
</div>
</div>
</div>
@endforeach
</div>
</div>
@endif
@if ($latest_posts->count() > 0)
<div class="container-lg py-4">
<div class="row">
<div class="col-12 col-lg-8 mb-3">
<div class="text-start">
<h2 id="latest-news" class="fw-bold font-family-roboto-condensed mb-3 h2">Latest News</h2>
</div>
<div class="row g-3 mb-4">
@foreach ($latest_posts as $post)
<div class="col-12 col-md-6">
<div class="card bg-white border-0 shadow" style="height:100%;">
<div class="card-body d-flex">
<div class="row align-self-center">
<div class="col-12 col-lg-5 d-flex py-1" style="height:100%;">
<div class="align-self-center">
<img class="img-fluid rounded-4" src="{{ $post->featured_image }}"
alt="{{ $post->title }}">
</div>
</div>
<div class="col-12 col-lg-7 d-flex py-1" style="height:100%;">
<div class="align-self-center">
<div class="">
<h3 class="h6 mb-0 fw-bold font-family-roboto-condensed">
<a href="{{ route('front.post', ['category_slug' => $post->category->slug,'slug' => $post->slug]) }}" class="fw-bold"
style=" display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;">{{ $post->title }}</a></h3>
</div>
<div><small
class="text-secondary">{{ $post->published_at->diffForHumans() }}</small>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endforeach
</div>
<div class="w-full text-center">
<a href="{{ route('front.all') }}"
class="btn btn-outline-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: 2rem;">
@include('front.partials.sidebar')
</div>
</div>
</div>
</div>
@endif
</main>
@endsection