Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
freekmurze committed Jun 11, 2024
1 parent 54066fd commit 28c0306
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 10 deletions.
17 changes: 17 additions & 0 deletions app/Http/Controllers/ExternalFeedItemsController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?php

namespace App\Http\Controllers;

use App\Models\ExternalFeedItem;

class ExternalFeedItemsController
{
public function __invoke()
{
$externalFeedItems = ExternalFeedItem::query()
->orderBy('created_at', 'desc')
->paginate(20);

return view('front.pages.externalFeedItems.index', compact('externalFeedItems'));
}
}
10 changes: 10 additions & 0 deletions resources/views/front/pages/externalFeedItems/index.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<x-page title="From our team and products" background="/backgrounds/blogs.jpg">
<h1>From our team and products</h1>


@foreach($externalFeedItems as $externalFeedItem)
@include('front.pages.insights.partials.externalFeedItem')
@endforeach

{{ $externalFeedItems->links() }}
</x-page>
15 changes: 6 additions & 9 deletions resources/views/front/pages/insights/index.blade.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
<x-page title="Blog" background="/backgrounds/blogs.jpg">
<!-- @todo replace background -->

<x-page title="Insights" background="/backgrounds/blogs.jpg">
<section id="banner" class="banner" role="banner">
Insights
</section>
Expand All @@ -13,16 +11,13 @@
More insights
</h2>

<section class="section section-group">
<section >
<div class="wrap">
<div class="max-w-md grid gap-6">
<div>
@foreach($posts as $post)
@include('front.pages.insights.partials.postListItem')
@endforeach
</div>
<div class="mt-12">
{{ $posts->onEachSide(1)->links() }}
</div>
</div>
</section>

Expand All @@ -33,8 +28,10 @@
</h2>

@foreach($externalFeedItems as $externalFeedItem)
@include('front.pages.insights.partials.externalFeedItems')
@include('front.pages.insights.partials.externalFeedItem')
@endforeach

<a href="{{ route('external-feed-items') }}">View more</a>


</x-page>
2 changes: 1 addition & 1 deletion resources/views/front/pages/insights/show.blade.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<x-page title="Blog" background="/backgrounds/blogs.jpg">
<x-page title="{{ $post->title }}" background="/backgrounds/blogs.jpg">
{{ $post->date?->format('d F Y') ?? 'Preview' }}

<h1>{{ $post->title }}</h1>
Expand Down
2 changes: 2 additions & 0 deletions routes/web.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use App\Http\Controllers\DownloadLatestReleaseForExpiredLicenseController;
use App\Http\Controllers\DownloadPurchasableController;
use App\Http\Controllers\DownloadRayController;
use App\Http\Controllers\ExternalFeedItemsController;
use App\Http\Controllers\InsightsController;
use App\Http\Controllers\MusicController;
use App\Http\Controllers\ShowReleaseNotesController;
Expand Down Expand Up @@ -45,6 +46,7 @@

Route::get('insights', [InsightsController::class, 'index'])->name('insights');
Route::get('insights/{slug}', [InsightsController::class, 'detail'])->name('insights.show');
Route::get('team-products', ExternalFeedItemsController::class)->name('external-feed-items');

Route::redirect('/docs/products/ray', '/docs/ray');

Expand Down

0 comments on commit 28c0306

Please sign in to comment.