feat: localize landing page content and update icon asset paths

This commit is contained in:
Ümit Tunç
2026-05-11 10:04:58 +03:00
parent 3512858304
commit 1950e8734c
3 changed files with 38 additions and 27 deletions
+2 -2
View File
@@ -74,8 +74,8 @@ class ProductController extends Controller
return view($product->view_template, compact('product', 'settings', 'renderedHeader', 'renderedFooter', 'meta'));
}
// Use landing page template if landing_page_data exists and product type is 'product'
if ($product->type === 'product' && !empty($product->landing_page_data)) {
// Use landing page template if landing_page_data exists
if (!empty($product->landing_page_data)) {
return view('front.products.landing', compact('product', 'settings', 'renderedHeader', 'renderedFooter', 'meta'));
}
@@ -18,8 +18,7 @@ use Illuminate\Support\Facades\Storage;
$currentLang = app()->getLocale();
// Helper function to get translated value with fallback
$getTranslated = function($item, $key, $default = '') {
global $currentLang;
$getTranslated = function($item, $key, $default = '') use ($currentLang) {
if (isset($item["{$key}_{$currentLang}"])) {
return $item["{$key}_{$currentLang}"];
}
@@ -34,13 +33,13 @@ use Illuminate\Support\Facades\Storage;
<div class="container pt-24 xl:pt-32 lg:pt-32 md:pt-32 pb-9">
<div class="flex flex-wrap mx-0 !mt-[-50px] items-center text-center lg:text-left xl:text-left">
<div class="xl:w-5/12 lg:w-5/12 xxl:w-4/12 w-full flex-[0_0_auto] max-w-full !relative !mt-[50px]" data-cues="slideInDown" data-group="page-title" data-delay="700">
@if(!empty($hero['slogan']))
@if($slogan = $getTranslated($hero, 'slogan'))
<h1 class="xl:!text-[2.5rem] !text-[calc(1.375rem_+_1.5vw)] font-semibold !leading-[1.15] !mb-4">
{!! nl2br(e($hero['slogan'])) !!}
{!! nl2br(e($slogan)) !!}
</h1>
@endif
@if(!empty($hero['sub_slogan']))
<p class="lead !text-[1.2rem] !leading-[1.5] !font-normal !mb-7">{{ $hero['sub_slogan'] }}</p>
@if($subSlogan = $getTranslated($hero, 'sub_slogan'))
<p class="lead !text-[1.2rem] !leading-[1.5] !font-normal !mb-7">{{ $subSlogan }}</p>
@endif
<div class="flex justify-center lg:!justify-start xl:!justify-start" data-cues="slideInDown" data-group="page-title-buttons" data-delay="1800">
@if(!empty($hero['app_store_link']))
@@ -92,9 +91,9 @@ use Illuminate\Support\Facades\Storage;
<div class="container pt-32 xl:pt-40 lg:pt-40 md:pt-40 pb-[4.5rem] xl:pb-24 lg:pb-24 md:pb-24">
<div class="flex flex-wrap mx-[-15px] !text-center">
<div class="lg:w-10/12 xl:w-9/12 xxl:w-8/12 flex-[0_0_auto] !px-[15px] max-w-full !mx-auto !relative">
<h2 class="!text-[0.8rem] !leading-[1.35] !tracking-[0.02rem] uppercase !text-[#aab0bc] !mb-3">App Features</h2>
<h2 class="!text-[0.8rem] !leading-[1.35] !tracking-[0.02rem] uppercase !text-[#aab0bc] !mb-3">{{ t('Özellikler') }}</h2>
<h3 class="xl:!text-[2rem] !text-[calc(1.325rem_+_0.9vw)] font-semibold !leading-[1.2] !mb-12 lg:!px-5 xl:!px-0 xxl:!px-6">
{{ $product->translate('title') }} makes your experience <span class="text-gradient gradient-7">better</span> for you to have the perfect control.
{{ $product->translate('title') }} {{ t('deneyiminizi mükemmelleştirmek için buradayız.') }}
</h3>
</div>
<!-- /column -->
@@ -104,17 +103,20 @@ use Illuminate\Support\Facades\Storage;
<div class="xxl:w-11/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">
<div class="flex flex-wrap mx-[-15px] xl:mx-[-20px] lg:mx-[-20px] md:mx-[-20px] !mt-[-50px] !text-center">
@foreach($features as $index => $feature)
@php
$featureTitle = $getTranslated($feature, 'title');
@endphp
<div class="md:w-6/12 lg:w-3/12 xl:w-3/12 w-full flex-[0_0_auto] !px-[15px] xl:!px-[20px] lg:!px-[20px] md:!px-[20px] !mt-[50px] max-w-full">
@if(!empty($feature['icon']))
<div class="svg-bg svg-bg-lg !bg-[#fef3e4] !rounded-[0.8rem] !mb-4">
@php
$iconPath = public_path('docs/styleguide/_/assets/img/icons/solid/' . $feature['icon'] . '.svg');
$iconPath = public_path('assets/img/icons/solid/' . $feature['icon'] . '.svg');
$iconUrl = file_exists($iconPath)
? asset('docs/styleguide/_/assets/img/icons/solid/' . $feature['icon'] . '.svg')
? asset('assets/img/icons/solid/' . $feature['icon'] . '.svg')
: null;
@endphp
@if($iconUrl)
<img src="{{ $iconUrl }}" class="icon-svg solid text-[#343f52] text-navy" alt="{{ $feature['title'] ?? '' }}" style="width: 48px; height: 48px;" loading="lazy">
<img src="{{ $iconUrl }}" class="icon-svg solid text-[#343f52] text-navy" alt="{{ $featureTitle }}" style="width: 48px; height: 48px;" loading="lazy">
@else
<div class="w-12 h-12 bg-gray-200 rounded-lg flex items-center justify-center">
<span class="text-gray-400 text-xs">{{ substr($feature['icon'], 0, 2) }}</span>
@@ -122,8 +124,8 @@ use Illuminate\Support\Facades\Storage;
@endif
</div>
@endif
@if(!empty($feature['title']))
<h4 class="!text-[1rem]">{{ $feature['title'] }}</h4>
@if($featureTitle)
<h4 class="!text-[1rem]">{{ $featureTitle }}</h4>
@endif
</div>
<!--/column -->
@@ -140,15 +142,23 @@ use Illuminate\Support\Facades\Storage;
<!-- /section -->
@endif
{{-- Description Section --}}
@php
$productContent = $product->translate('content');
@endphp
@if(!empty($productContent))
{!! $productContent !!}
@endif
{{-- How It Works Section --}}
@if(!empty($howItWorks) && !empty($steps))
<section class="wrapper !bg-[#ffffff]">
<div class="container pt-32 xl:pt-40 lg:pt-40 md:pt-40 pb-[4.5rem] xl:pb-24 lg:pb-24 md:pb-24">
<div class="flex flex-wrap mx-[-15px] !text-center">
<div class="md:w-10/12 lg:w-7/12 xl:w-7/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto !relative">
@if(!empty($howItWorks['download_form_label']))
@if($howItWorksLabel = $getTranslated($howItWorks, 'download_form_label'))
<h3 class="!text-[calc(1.325rem_+_0.9vw)] font-bold !leading-[1.2] xl:!text-[2rem] !mb-8 xl:!px-6">
{{ $howItWorks['download_form_label'] }}
{{ $howItWorksLabel }}
</h3>
@endif
</div>
@@ -172,11 +182,11 @@ use Illuminate\Support\Facades\Storage;
@if($index < 2)
<div class="{{ $index === 0 ? '!mb-8' : '' }}">
<span class="xl:!text-[3rem] !text-[calc(1.425rem_+_2.1vw)] !leading-none !mb-3 font-medium text-gradient gradient-3">{{ str_pad($step['number'] ?? ($index + 1), 2, '0', STR_PAD_LEFT) }}</span>
@if(!empty($step['title']))
<h4 class="!text-[1rem]">{{ $step['title'] }}</h4>
@if($stepTitle = $getTranslated($step, 'title'))
<h4 class="!text-[1rem]">{{ $stepTitle }}</h4>
@endif
@if(!empty($step['description']))
<p class="!mb-0 xl:!px-7">{{ $step['description'] }}</p>
@if($stepDescription = $getTranslated($step, 'description'))
<p class="!mb-0 xl:!px-7">{{ $stepDescription }}</p>
@endif
</div>
<!-- /div -->
@@ -189,11 +199,11 @@ use Illuminate\Support\Facades\Storage;
@if($index >= 2)
<div class="{{ $index === 2 ? '!mb-8' : '' }}">
<span class="xl:!text-[3rem] !text-[calc(1.425rem_+_2.1vw)] !leading-none !mb-3 font-medium text-gradient gradient-3">{{ str_pad($step['number'] ?? ($index + 1), 2, '0', STR_PAD_LEFT) }}</span>
@if(!empty($step['title']))
<h4 class="!text-[1rem]">{{ $step['title'] }}</h4>
@if($stepTitle = $getTranslated($step, 'title'))
<h4 class="!text-[1rem]">{{ $stepTitle }}</h4>
@endif
@if(!empty($step['description']))
<p class="!mb-0 xl:!px-7">{{ $step['description'] }}</p>
@if($stepDescription = $getTranslated($step, 'description'))
<p class="!mb-0 xl:!px-7">{{ $stepDescription }}</p>
@endif
</div>
<!-- /div -->
@@ -271,7 +281,7 @@ use Illuminate\Support\Facades\Storage;
data-bs-target="#accordion-collapse-faq-{{ $index }}"
aria-expanded="false"
aria-controls="accordion-collapse-faq-{{ $index }}">
{{ $faq['question'] ?? '' }}
{{ $getTranslated($faq, 'question') }}
</button>
</div>
<!-- /.card-header -->
@@ -280,7 +290,7 @@ use Illuminate\Support\Facades\Storage;
aria-labelledby="accordion-heading-faq-{{ $index }}"
data-bs-target="#accordion-faq">
<div class="card-body flex-[1_1_auto] p-[0_1.25rem_.25rem_2.35rem]">
<p>{!! nl2br(e($faq['answer'] ?? '')) !!}</p>
<p>{!! nl2br(e($getTranslated($faq, 'answer'))) !!}</p>
</div>
<!-- /.card-body -->
</div>
+1
View File
@@ -103,6 +103,7 @@ Route::prefix('admin/api')->middleware(['auth', \App\Http\Middleware\SuperAdminM
});
// Products & Services
Route::redirect('/urun-hizmet/Yazılım Danışmanlık', '/urun-hizmet/yazilim-danismanlik', 301);
Route::get('/urun-hizmet/{slug}', [\App\Http\Controllers\ProductController::class, 'show'])->name('products.show');
// Career