Update (kernel)

This commit is contained in:
2023-11-20 08:51:38 +08:00
parent 3ed6215b16
commit 9c1d432b8c
7 changed files with 47 additions and 40 deletions

View File

@@ -16,9 +16,10 @@
</header>
</div>
<div class="w-full bg-dark text-white d-none d-md-block">
<div class="container-lg text-center py-2">
@foreach ($categories as $category)
<a href="#" class="text-white mx-3 font-family-roboto-condensed text-uppercase">{{ $category->name }}</a>
@endforeach
</div>
</div>
<div class="container-lg text-center py-2">
@foreach ($categories as $category)
<a href="#"
class="text-white mx-3 font-family-roboto-condensed text-uppercase">{{ $category->name }}</a>
@endforeach
</div>
</div>

View File

@@ -9,19 +9,19 @@
<article class="blog-post
">
<div class="mb-2">
<h1 class="fw-bold font-family-roboto-condensed mb-1">{{ $post->title }}</h1>
<div class="mb-2">
<h1 class="fw-bold font-family-roboto-condensed mb-1">{{ $post->title }}</h1>
<div>
@foreach ($post->keywords as $keyword)
@if($keyword == $post->main_keyword)
<span class="badge text-bg-dark me-1">{{ $keyword }}</span>
@else
<span class="badge text-bg-light border me-1">{{ $keyword }}</span>
@endif
@endforeach
</div>
</div>
<div>
@foreach ($post->keywords as $keyword)
@if ($keyword == $post->main_keyword)
<span class="badge text-bg-dark me-1">{{ $keyword }}</span>
@else
<span class="badge text-bg-light border me-1">{{ $keyword }}</span>
@endif
@endforeach
</div>
</div>
<div class="mb-2 text-secondary">

View File

@@ -32,10 +32,16 @@
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">
<h3 class="h4 fw-bold font-family-roboto-condensed mb-0">
<a
href="{{ route('front.post', ['category_slug' => $post->category->slug, 'slug' => $post->slug]) }}">{{ $post->title }}</a>
</h3>
<div class="mb-0"><small
class="text-secondary">{{ $post->published_at->diffForHumans() }}</small>
<i class="bi bi-dot"></i>
<small
class="text-secondary">{{ markdown_min_read($post->body) }}</small>
</div>
<p>{{ str_first_sentence($post->bites) }}</p>
</div>
</div>
@@ -55,20 +61,20 @@ class="rounded-4 card-img-top shadow" style="object-fit: cover;">
<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">
<div class="row g-2 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="card-body d-flex p-2 p-lg-3">
<div class="row align-self-center">
<div class="col-12 col-lg-5 d-flex py-1" style="height:100%;">
<div class="col-3 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 }}"
<img class="img-fluid rounded-2" 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="col-9 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">
@@ -82,6 +88,9 @@ class="fw-bold"
</div>
<div><small
class="text-secondary">{{ $post->published_at->diffForHumans() }}</small>
<i class="bi bi-dot"></i>
<small
class="text-secondary">{{ markdown_min_read($post->body) }}</small>
</div>
</div>