feat: add career application support for blog authors and expand blog status workflows
This commit is contained in:
@@ -37,11 +37,11 @@
|
||||
<i class="uil uil-calendar-alt pr-[0.2rem] align-[-.05rem] before:content-['\e9ba']"></i>
|
||||
<span>{{ $cDate }}</span>
|
||||
</li>
|
||||
@if($cPost->author)
|
||||
@if($cPost->author || $cPost->careerApplication)
|
||||
<li class="post-author inline-block before:content-[''] before:inline-block before:w-[0.2rem] before:h-[0.2rem] before:opacity-50 before:m-[0_.6rem_0] before:rounded-[100%] before:align-[.15rem] before:bg-[#aab0bc]">
|
||||
<span class="!text-[#aab0bc]">
|
||||
<i class="uil uil-user pr-[0.2rem] align-[-.05rem] before:content-['\ed6f']"></i>
|
||||
<span>{{ $cPost->author->name }}</span>
|
||||
<span>{{ $cPost->author_name }}</span>
|
||||
</span>
|
||||
</li>
|
||||
@endif
|
||||
@@ -349,7 +349,7 @@
|
||||
"datePublished" => $p->published_at ? $p->published_at->toIso8601String() : $p->created_at->toIso8601String(),
|
||||
"author" => [
|
||||
"@type" => "Person",
|
||||
"name" => $p->author ? $p->author->name : 'Trunçgil'
|
||||
"name" => $p->author_name
|
||||
]
|
||||
];
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
<li class="post-author inline-block before:content-[''] before:inline-block before:w-[0.2rem] before:h-[0.2rem] before:opacity-50 before:m-[0_.6rem_0_.4rem] before:rounded-[100%] before:align-[.15rem] before:bg-[#aab0bc]">
|
||||
<span class="!text-[0.8rem] !text-[#aab0bc]">
|
||||
<i class="uil uil-user pr-[0.2rem] align-[-.05rem] before:content-['\ed6f']"></i>
|
||||
<span>{{ $post->author ? $post->author->name : 'Trunçgil' }}</span>
|
||||
<span>{{ $post->author_name }}</span>
|
||||
</span>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -84,15 +84,15 @@
|
||||
<div class="author-info xl:!flex lg:!flex md:!flex items-center !mb-3">
|
||||
<div class="flex items-center">
|
||||
<figure class="w-12 h-12 !relative !mr-4 rounded-[100%]">
|
||||
<img class="rounded-[50%]" alt="image" src="{{ $post->author && $post->author->avatar ? asset('storage/' . $post->author->avatar) : asset('assets/img/avatars/u5.webp') }}" onerror="this.src='{{ asset('assets/img/avatars/u5.webp') }}'" loading="lazy">
|
||||
<img class="rounded-[50%]" alt="image" src="{{ $post->author_avatar_url }}" onerror="this.src='{{ asset('assets/img/avatars/u5.webp') }}'" loading="lazy">
|
||||
</figure>
|
||||
<div>
|
||||
<h6><a href="#" class="!text-[#343f52] hover:!text-[#e31e24]">{{ $post->author ? $post->author->name : 'Trunçgil' }}</a></h6>
|
||||
<span class="!text-[0.75rem] !text-[#aab0bc] m-0 p-0 list-none">{{ $post->author && $post->author->role ? $post->author->role : 'Trunçgil Teknoloji Editörü' }}</span>
|
||||
<h6><a href="#" class="!text-[#343f52] hover:!text-[#e31e24]">{{ $post->author_name }}</a></h6>
|
||||
<span class="!text-[0.75rem] !text-[#aab0bc] m-0 p-0 list-none">{{ $post->author_role }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="!mt-3 xl:!mt-0 lg:!mt-0 md:!mt-0 !ml-auto">
|
||||
<a href="{{ route('blog.index', ['author' => $post->author_id]) }}" class="btn btn-sm btn-soft-ash !rounded-[50rem] btn-icon btn-icon-start !mb-0 hover:translate-y-[-0.15rem] hover:shadow-[0_0.25rem_0.75rem_rgba(30,34,40,0.15)]"><i class="uil uil-file-alt !mr-[0.3rem] before:content-['\eaec'] text-[.8rem]"></i> Tüm Yazıları</a>
|
||||
<a href="{{ $post->author_id ? route('blog.index', ['author' => $post->author_id]) : ($post->career_application_id ? route('blog.index', ['intern' => $post->career_application_id]) : route('blog.index')) }}" class="btn btn-sm btn-soft-ash !rounded-[50rem] btn-icon btn-icon-start !mb-0 hover:translate-y-[-0.15rem] hover:shadow-[0_0.25rem_0.75rem_rgba(30,34,40,0.15)]"><i class="uil uil-file-alt !mr-[0.3rem] before:content-['\eaec'] text-[.8rem]"></i> Tüm Yazıları</a>
|
||||
</div>
|
||||
</div>
|
||||
<p>Trunçgil Teknoloji editörleri tarafından kaleme alınmış bu makalede teknoloji, yazılım geliştirme ve dijital dönüşüm konularına dair güncel gelişmeleri incelediniz. Destek ve sorularınız için bizimle iletişime geçebilirsiniz.</p>
|
||||
@@ -181,9 +181,9 @@
|
||||
$publishedDate = $post->published_at ? $post->published_at->toIso8601String() : $post->created_at->toIso8601String();
|
||||
$modifiedDate = $post->updated_at ? $post->updated_at->toIso8601String() : $publishedDate;
|
||||
|
||||
$authorName = $post->author ? $post->author->name : 'Trunçgil';
|
||||
$authorRole = $post->author && $post->author->role ? $post->author->role : 'Trunçgil Teknoloji Editörü';
|
||||
$authorUrl = route('blog.index', ['author' => $post->author_id ?? 1]);
|
||||
$authorName = $post->author_name;
|
||||
$authorRole = $post->author_role;
|
||||
$authorUrl = $post->author_id ? route('blog.index', ['author' => $post->author_id]) : ($post->career_application_id ? route('blog.index', ['intern' => $post->career_application_id]) : route('blog.index'));
|
||||
|
||||
$siteName = setting('site_name', 'Trunçgil Teknoloji');
|
||||
$siteLogo = setting('site_logo') ? (str_starts_with(setting('site_logo'), 'http') ? setting('site_logo') : asset('storage/' . ltrim(setting('site_logo'), '/'))) : asset('assets/img/logo.png');
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@php
|
||||
// Blog modelinden published içerikleri çek
|
||||
$blogs = \App\Models\Blog::with(['category', 'author'])
|
||||
$blogs = \App\Models\Blog::with(['category', 'author', 'careerApplication'])
|
||||
->withCount('comments')
|
||||
->published()
|
||||
->latest('published_at')
|
||||
|
||||
Reference in New Issue
Block a user