A lot of things
This commit is contained in:
34
resources/views/activity/latest-news.blade.php
Normal file
34
resources/views/activity/latest-news.blade.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?php /** @var \App\Models\News $news */ ?>
|
||||
<section class="home-section">
|
||||
<div class="home-section-header">
|
||||
<h2 class="home-section-title">
|
||||
<i data-lucide="newspaper" size="16"></i>
|
||||
Latest news
|
||||
</h2>
|
||||
<a href="{{ route('news.index') }}" class="home-section-more">
|
||||
See all <i data-lucide="arrow-right" size="12"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="news-strip">
|
||||
@foreach($latestNews as $news)
|
||||
<a href="{{ route('news.show', $news) }}" class="news-strip-card">
|
||||
<div class="news-strip-cover"
|
||||
@if($news->gallery->first())
|
||||
style="background-image: url('{{ Storage::url($news->gallery()->first()->image) }}')"
|
||||
@endif>
|
||||
<span class="news-strip-date">
|
||||
{{ $news->created_at->format('M j') }}
|
||||
</span>
|
||||
</div>
|
||||
<div class="news-strip-body">
|
||||
<span class="news-strip-badge">News</span>
|
||||
<h3 class="news-strip-title">{{ $news->title }}</h3>
|
||||
<span class="news-strip-meta">
|
||||
{{ $news->created_at->diffForHumans() }}
|
||||
</span>
|
||||
</div>
|
||||
</a>
|
||||
@endforeach
|
||||
</div>
|
||||
</section>
|
||||
Reference in New Issue
Block a user