feat: implement dynamic hero cover image with fallback for odullerimiz template

This commit is contained in:
Ümit Tunç
2026-05-27 06:51:31 +03:00
parent 3c92a81cfe
commit af147f5fea
@@ -15,12 +15,17 @@
// Timeline color palette
$colors = ['#e31e24', '#f5a623', '#27ae60', '#2980b9', '#8e44ad', '#1abc9c'];
// Dynamic cover image pulling from page's featured image or falling back
$coverImage = ($page && $page->featured_image)
? asset('storage/' . $page->featured_image)
: (($page && $page->featured_image_url) ? $page->featured_image_url : asset('assets/img/photos/bg4.webp'));
@endphp
<div class="grow shrink-0 bg-[#fbfcfd]">
<!-- Hero Section -->
<section class="wrapper image-wrapper bg-image bg-overlay bg-overlay-400 !text-white bg-no-repeat bg-[center_center] bg-cover relative z-0 !bg-fixed before:content-[''] before:block before:absolute before:z-[1] before:w-full before:h-full before:left-0 before:top-0 before:bg-[rgba(30,34,40,.55)]" data-image-src="{{ asset('assets/img/photos/bg4.webp') }}" style="background-image: url('{{ asset('assets/img/photos/bg4.webp') }}');">
<section class="wrapper image-wrapper bg-image bg-overlay bg-overlay-400 !text-white bg-no-repeat bg-[center_center] bg-cover relative z-0 !bg-fixed before:content-[''] before:block before:absolute before:z-[1] before:w-full before:h-full before:left-0 before:top-0 before:bg-[rgba(30,34,40,.55)]" data-image-src="{{ $coverImage }}" style="background-image: url('{{ $coverImage }}');">
<div class="container pt-28 pb-40 xl:pt-36 lg:pt-36 md:pt-36 xl:pb-[12.5rem] lg:pb-[12.5rem] md:pb-[12.5rem] !text-center">
<div class="flex flex-wrap mx-[-15px]">
<div class="xl:w-8/12 lg:w-8/12 w-full flex-[0_0_auto] !px-[15px] max-w-full !mx-auto">