Add Blog functionality: Created BlogController with index and show methods, added blog views, and integrated localization for meta tags. Updated routes to include blog paths.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
@props(['data' => []])
|
||||
|
||||
<section class="wrapper {{ $data['bg_class'] ?? 'overflow-hidden' }}">
|
||||
<div class="container pt-24 xl:pt-32 lg:pt-32 md:pt-32 pb-24 xl:pb-32 lg:pb-32 md:pb-32 !text-center !relative">
|
||||
@if(!empty($data['background_image']))
|
||||
<div class="absolute" style="top: -7%; left: 50%; transform: translateX(-50%);">
|
||||
<img src="{{ asset($data['background_image']) }}" alt="background">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex flex-wrap mx-[-15px] !relative">
|
||||
<div class="lg:w-10/12 xl:w-9/12 xxl:w-7/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||
@if(!empty($data['icon']))
|
||||
<div class="!mb-5">
|
||||
<img class="m-[0_auto] !w-[4rem] !h-[4rem]" src="{{ asset($data['icon']) }}" alt="icon">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['title']))
|
||||
<h1 class="font-semibold !leading-[1.15] xl:!text-[3.2rem] !text-[calc(1.445rem_+_2.34vw)] !mb-5">
|
||||
{!! $data['title'] !!}
|
||||
</h1>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['subtitle']))
|
||||
<p class="lead !text-[1.2rem] !leading-[1.6] !mb-8 lg:!px-14 xl:!px-[4.5rem] xxl:!px-10">
|
||||
{{ $data['subtitle'] }}
|
||||
</p>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['button_text']))
|
||||
<div class="flex justify-center">
|
||||
<span>
|
||||
<a href="{{ $data['button_url'] ?? '#' }}"
|
||||
class="btn btn-lg btn-grape !text-white !bg-[#e31e24] border-[#e31e24] hover:text-white hover:bg-[#e31e24] hover:!border-[#e31e24] btn-icon btn-icon-end !rounded-[0.8rem]">
|
||||
{{ $data['button_text'] }}
|
||||
@if(!empty($data['button_icon']))
|
||||
<i class="{{ $data['button_icon'] }}"></i>
|
||||
@endif
|
||||
</a>
|
||||
</span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(!empty($data['cta_image']))
|
||||
<div class="container !text-center !mt-10">
|
||||
<img class="max-w-full h-auto !relative m-[0_auto]" style="z-index: 2;" src="{{ asset($data['cta_image']) }}" alt="cta">
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,50 @@
|
||||
@props(['data' => []])
|
||||
|
||||
<section class="wrapper {{ $data['bg_class'] ?? '!bg-[#f0f0f8]' }}">
|
||||
<div class="container py-24 xl:py-32 lg:py-32 md:py-32">
|
||||
@if(!empty($data['section_title']) || !empty($data['section_subtitle']))
|
||||
<div class="flex flex-wrap mx-[-15px] !mb-12 !text-center">
|
||||
<div class="md:w-10/12 lg:w-9/12 xl:w-8/12 xxl:w-7/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||
@if(!empty($data['section_badge']))
|
||||
<h2 class="text-[0.8rem] tracking-[0.02rem] uppercase text-[#e31e24] !mb-3 !leading-[1.35]">{{ $data['section_badge'] }}</h2>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['section_title']))
|
||||
<h2 class="!text-[calc(1.345rem_+_1.14vw)] font-bold !leading-[1.2] xl:!text-[2.2rem] !mb-3">
|
||||
{{ $data['section_title'] }}
|
||||
</h2>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['section_subtitle']))
|
||||
<p class="lead text-[1.05rem] !leading-[1.6]">{{ $data['section_subtitle'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['features']))
|
||||
<div class="flex flex-wrap mx-[-15px] xl:mx-[-20px] lg:mx-[-20px] md:mx-[-20px] !mt-[-50px]">
|
||||
@foreach($data['features'] as $feature)
|
||||
<div class="{{ $data['column_class'] ?? 'md:w-6/12 lg:w-4/12' }} w-full flex-[0_0_auto] xl:!px-[20px] lg:!px-[20px] md:!px-[20px] !px-[15px] max-w-full !mt-[50px]">
|
||||
<div class="flex flex-row">
|
||||
@if(!empty($feature['icon']))
|
||||
<div>
|
||||
<img src="{{ asset($feature['icon']) }}" class="!w-[2.2rem] !h-[2.2rem] !mr-4" alt="icon">
|
||||
</div>
|
||||
@endif
|
||||
<div>
|
||||
@if(!empty($feature['title']))
|
||||
<h4 class="!mb-1">{{ $feature['title'] }}</h4>
|
||||
@endif
|
||||
@if(!empty($feature['description']))
|
||||
<p class="!mb-0">{{ $feature['description'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,53 @@
|
||||
@props(['data' => []])
|
||||
|
||||
<section class="wrapper {{ $data['bg_class'] ?? '!bg-[#f0f0f8]' }}">
|
||||
<div class="container py-24 xl:py-32 lg:py-32 md:py-32">
|
||||
@if(!empty($data['section_title']) || !empty($data['section_subtitle']))
|
||||
<div class="flex flex-wrap mx-[-15px] !mb-12 !text-center">
|
||||
<div class="md:w-10/12 lg:w-8/12 xl:w-7/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||
@if(!empty($data['section_badge']))
|
||||
<h2 class="text-[0.8rem] tracking-[0.02rem] uppercase text-[#e31e24] !mb-3 !leading-[1.35]">{{ $data['section_badge'] }}</h2>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['section_title']))
|
||||
<h2 class="!text-[calc(1.345rem_+_1.14vw)] font-bold !leading-[1.2] xl:!text-[2.2rem] !mb-3">
|
||||
{{ $data['section_title'] }}
|
||||
</h2>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['section_subtitle']))
|
||||
<p class="lead text-[1.05rem] !leading-[1.6]">{{ $data['section_subtitle'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['items']))
|
||||
<div class="flex flex-wrap mx-[-15px] xl:mx-[-12px] lg:mx-[-12px] md:mx-[-12px] !mt-[-24px]">
|
||||
@foreach($data['items'] as $item)
|
||||
<div class="{{ $data['column_class'] ?? 'md:w-6/12 lg:w-4/12' }} w-full flex-[0_0_auto] xl:!px-[12px] lg:!px-[12px] md:!px-[12px] !px-[15px] max-w-full !mt-[24px]">
|
||||
<figure class="!rounded-[0.8rem] !mb-6 group overflow-hidden">
|
||||
<a href="{{ $item['link'] ?? '#' }}">
|
||||
<img class="!rounded-[0.8rem] !transition-all !duration-[0.3s] !ease-in-out group-hover:!scale-105"
|
||||
src="{{ asset($item['image']) }}"
|
||||
alt="{{ $item['title'] ?? '' }}">
|
||||
</a>
|
||||
</figure>
|
||||
@if(!empty($item['category']))
|
||||
<span class="badge bg-[#e31e24] !rounded-[0.8rem] !mb-2 text-white text-[0.7rem]">{{ $item['category'] }}</span>
|
||||
@endif
|
||||
@if(!empty($item['title']))
|
||||
<h4 class="!mb-1">
|
||||
<a href="{{ $item['link'] ?? '#' }}" class="hover:text-[#e31e24]">{{ $item['title'] }}</a>
|
||||
</h4>
|
||||
@endif
|
||||
@if(!empty($item['description']))
|
||||
<p class="!mb-0">{{ $item['description'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
@props(['data' => []])
|
||||
|
||||
<section class="wrapper overflow-hidden">
|
||||
<div class="container pt-36 xl:pt-[12.5rem] lg:pt-[12.5rem] md:pt-[12.5rem] pb-24 xl:pb-32 lg:pb-32 md:pb-32 !text-center !relative">
|
||||
@if(!empty($data['background_image']))
|
||||
<div class="absolute" style="top: -12%; left: 50%; transform: translateX(-50%);" data-cue="fadeIn">
|
||||
<img src="{{ asset($data['background_image']) }}" alt="background">
|
||||
</div>
|
||||
@endif
|
||||
|
||||
<div class="flex flex-wrap mx-[-15px] !relative">
|
||||
<div class="lg:w-8/12 xl:w-8/12 xxl:w-7/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto !relative">
|
||||
@if(!empty($data['badge']))
|
||||
<h2 class="text-[0.8rem] tracking-[0.02rem] uppercase text-[#e31e24] !mb-3 !leading-[1.35]">{{ $data['badge'] }}</h2>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['title']))
|
||||
<h1 class="!text-[calc(1.445rem_+_2.34vw)] font-semibold !leading-[1.15] xl:!text-[3.2rem] !mb-6">
|
||||
{!! $data['title'] !!}
|
||||
</h1>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['subtitle']))
|
||||
<p class="lead text-[1.2rem] !leading-[1.6] !mb-8">{{ $data['subtitle'] }}</p>
|
||||
@endif
|
||||
|
||||
<div class="flex justify-center flex-wrap gap-3">
|
||||
@if(!empty($data['primary_button_text']))
|
||||
<a href="{{ $data['primary_button_url'] ?? '#' }}"
|
||||
class="btn btn-lg btn-grape !text-white !bg-[#e31e24] border-[#e31e24] hover:text-white hover:bg-[#e31e24] hover:!border-[#e31e24] !rounded-[0.8rem]">
|
||||
{{ $data['primary_button_text'] }}
|
||||
</a>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['secondary_button_text']))
|
||||
<a href="{{ $data['secondary_button_url'] ?? '#' }}"
|
||||
class="btn btn-lg btn-outline-grape !text-[#e31e24] !border-[#e31e24] hover:text-white hover:bg-[#e31e24] hover:!border-[#e31e24] !rounded-[0.8rem]">
|
||||
{{ $data['secondary_button_text'] }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if(!empty($data['hero_image']))
|
||||
<div class="!mt-10">
|
||||
<img class="max-w-full h-auto !relative m-[0_auto]" src="{{ asset($data['hero_image']) }}" alt="hero">
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
@props(['data' => []])
|
||||
|
||||
<section class="wrapper {{ $data['bg_class'] ?? '!bg-[#ffffff]' }}">
|
||||
<div class="container py-24 xl:py-32 lg:py-32 md:py-32">
|
||||
@if(!empty($data['section_title']) || !empty($data['section_subtitle']))
|
||||
<div class="flex flex-wrap mx-[-15px] !mb-12 !text-center">
|
||||
<div class="md:w-10/12 lg:w-9/12 xl:w-7/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||
@if(!empty($data['section_badge']))
|
||||
<h2 class="text-[0.8rem] tracking-[0.02rem] uppercase text-[#e31e24] !mb-3 !leading-[1.35]">{{ $data['section_badge'] }}</h2>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['section_title']))
|
||||
<h2 class="!text-[calc(1.345rem_+_1.14vw)] font-bold !leading-[1.2] xl:!text-[2.2rem] !mb-3">
|
||||
{{ $data['section_title'] }}
|
||||
</h2>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['section_subtitle']))
|
||||
<p class="lead text-[1.05rem] !leading-[1.6]">{{ $data['section_subtitle'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['plans']))
|
||||
<div class="flex flex-wrap mx-[-15px] xl:mx-[-20px] lg:mx-[-20px] md:mx-[-20px] !mt-[-50px] justify-center">
|
||||
@foreach($data['plans'] as $plan)
|
||||
<div class="{{ $data['column_class'] ?? 'md:w-6/12 lg:w-4/12' }} w-full flex-[0_0_auto] xl:!px-[20px] lg:!px-[20px] md:!px-[20px] !px-[15px] max-w-full !mt-[50px]">
|
||||
<div class="pricing card {{ !empty($plan['featured']) ? '!shadow-[0_0.5rem_2rem_rgba(30,34,40,0.15)] !border-[#e31e24] !border-2' : '!shadow-[0_0.25rem_1.75rem_rgba(30,34,40,0.07)]' }} !rounded-[0.8rem]">
|
||||
<div class="card-body p-10">
|
||||
@if(!empty($plan['featured']))
|
||||
<div class="!mb-3 !text-center">
|
||||
<span class="badge bg-[#e31e24] !rounded-[0.8rem] !px-3 !py-1 text-white text-[0.75rem]">{{ $data['featured_label'] ?? 'Önerilen' }}</span>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($plan['name']))
|
||||
<h4 class="!mb-2 !text-center">{{ $plan['name'] }}</h4>
|
||||
@endif
|
||||
|
||||
<div class="!text-center !mb-6">
|
||||
@if(!empty($plan['currency']))
|
||||
<span class="text-[1.2rem] text-muted">{{ $plan['currency'] }}</span>
|
||||
@endif
|
||||
@if(!empty($plan['price']))
|
||||
<span class="!text-[2.5rem] font-bold text-[#343f52]">{{ $plan['price'] }}</span>
|
||||
@endif
|
||||
@if(!empty($plan['period']))
|
||||
<span class="text-[1rem] text-muted">/{{ $plan['period'] }}</span>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
@if(!empty($plan['features']))
|
||||
<ul class="list-none !pl-0 !mb-6">
|
||||
@foreach($plan['features'] as $feature)
|
||||
<li class="flex items-start !mb-3">
|
||||
<i class="uil uil-check text-[#e31e24] text-[1.2rem] !mr-2 !mt-1"></i>
|
||||
<span>{{ $feature }}</span>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@endif
|
||||
|
||||
@if(!empty($plan['button_text']))
|
||||
<a href="{{ $plan['button_url'] ?? '#' }}"
|
||||
class="btn {{ !empty($plan['featured']) ? 'btn-grape !text-white !bg-[#e31e24]' : 'btn-outline-grape !text-[#e31e24]' }} !w-full !rounded-[0.8rem]">
|
||||
{{ $plan['button_text'] }}
|
||||
</a>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,30 @@
|
||||
@props(['data' => []])
|
||||
|
||||
<section class="wrapper {{ $data['bg_class'] ?? '!bg-[#ffffff]' }}">
|
||||
<div class="container py-16 xl:py-20 lg:py-20 md:py-20">
|
||||
@if(!empty($data['stats']))
|
||||
<div class="flex flex-wrap mx-[-15px] xl:mx-[-35px] lg:mx-[-35px] counter-wrapper !text-center">
|
||||
@foreach($data['stats'] as $stat)
|
||||
<div class="{{ $data['column_class'] ?? 'md:w-6/12 lg:w-3/12' }} xl:w-3/12 w-full flex-[0_0_auto] xl:!px-[35px] lg:!px-[35px] !px-[15px] max-w-full">
|
||||
<div class="!mb-4">
|
||||
@if(!empty($stat['icon']))
|
||||
<img src="{{ asset($stat['icon']) }}" class="!w-[3rem] !h-[3rem] m-[0_auto] !mb-3" alt="icon">
|
||||
@endif
|
||||
|
||||
@if(!empty($stat['number']))
|
||||
<h3 class="counter xl:!text-[2.5rem] !text-[calc(1.375rem_+_1.5vw)] !leading-none !mb-2 text-[#e31e24]">
|
||||
{{ $stat['number'] }}
|
||||
</h3>
|
||||
@endif
|
||||
|
||||
@if(!empty($stat['label']))
|
||||
<p class="text-[0.9rem] font-medium !mb-0">{{ $stat['label'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
@props(['data' => []])
|
||||
|
||||
<section class="wrapper {{ $data['bg_class'] ?? '!bg-[#f0f0f8]' }}">
|
||||
<div class="container py-24 xl:py-32 lg:py-32 md:py-32">
|
||||
@if(!empty($data['section_title']) || !empty($data['section_subtitle']))
|
||||
<div class="flex flex-wrap mx-[-15px] !mb-12 !text-center">
|
||||
<div class="md:w-10/12 lg:w-8/12 xl:w-7/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
|
||||
@if(!empty($data['section_badge']))
|
||||
<h2 class="text-[0.8rem] tracking-[0.02rem] uppercase text-[#e31e24] !mb-3 !leading-[1.35]">{{ $data['section_badge'] }}</h2>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['section_title']))
|
||||
<h2 class="!text-[calc(1.345rem_+_1.14vw)] font-bold !leading-[1.2] xl:!text-[2.2rem] !mb-3">
|
||||
{{ $data['section_title'] }}
|
||||
</h2>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['section_subtitle']))
|
||||
<p class="lead text-[1.05rem] !leading-[1.6]">{{ $data['section_subtitle'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($data['testimonials']))
|
||||
<div class="flex flex-wrap mx-[-15px] xl:mx-[-20px] lg:mx-[-20px] md:mx-[-20px] !mt-[-50px]">
|
||||
@foreach($data['testimonials'] as $testimonial)
|
||||
<div class="{{ $data['column_class'] ?? 'md:w-6/12 lg:w-4/12' }} w-full flex-[0_0_auto] xl:!px-[20px] lg:!px-[20px] md:!px-[20px] !px-[15px] max-w-full !mt-[50px]">
|
||||
<div class="card !shadow-[0_0.25rem_1.75rem_rgba(30,34,40,0.07)] !rounded-[0.8rem] !bg-white p-6">
|
||||
@if(!empty($testimonial['rating']))
|
||||
<div class="!mb-3">
|
||||
@for($i = 0; $i < ($testimonial['rating'] ?? 5); $i++)
|
||||
<i class="uil uil-star text-[#ffc107] text-[1rem]"></i>
|
||||
@endfor
|
||||
</div>
|
||||
@endif
|
||||
|
||||
@if(!empty($testimonial['quote']))
|
||||
<blockquote class="!border-0 !mb-4">
|
||||
<p class="!mb-0">"{{ $testimonial['quote'] }}"</p>
|
||||
</blockquote>
|
||||
@endif
|
||||
|
||||
<div class="flex items-center">
|
||||
@if(!empty($testimonial['avatar']))
|
||||
<img class="!rounded-[50%] !w-12 !h-12 !mr-4" src="{{ asset($testimonial['avatar']) }}" alt="avatar">
|
||||
@endif
|
||||
<div>
|
||||
@if(!empty($testimonial['name']))
|
||||
<h6 class="!mb-0">{{ $testimonial['name'] }}</h6>
|
||||
@endif
|
||||
@if(!empty($testimonial['position']))
|
||||
<p class="!mb-0 text-[0.85rem]">{{ $testimonial['position'] }}</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endforeach
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user