{{-- ===== HERO SECTION ===== --}} @php $c = $content ?? collect(); // A key the operator emptied in the content editor hides that line, // rather than bringing back the stock wording. $val = fn (string $key, ?string $default = null) => $c->has($key) ? trim((string) $c->get($key)->content_value) : $default; $heroTitle = $val('title', __('sections.hero.title')); $heroSubtitle = $val('subtitle', __('sections.hero.subtitle')); $heroDesc = $val('description', __('sections.hero.description')); $badgeText = $val('badge_text', __('sections.hero.badge')); $ctaText = $val('cta_text', __('sections.hero.cta')); $ctaUrl = $val('cta_url', '/client/store') ?: '/client/store'; $cta2Text = $val('cta_secondary_text', __('sections.hero.cta_secondary')); $cta2Url = $val('cta_secondary_url', '/client/domain-search') ?: '/client/domain-search'; $imageUrl = $val('image_url', ''); // The picture beside the text: the operator's own image when set, // otherwise an animation - the one named in the content editor, or the // theme's (theme.json "hero": {"animation": ...}) when that is left empty. // "none" leaves the hero as centred text. $animations = ['browser', 'servers', 'dns']; $animation = strtolower($val('animation', '') ?: ($themeHeroAnimation ?? 'browser')); if (! in_array($animation, $animations, true)) { $animation = 'none'; } $hasVisual = $imageUrl !== '' || $animation !== 'none'; // The domain the animations show. $demoDomain = __('sections.hero.anim_domain'); // The short selling points, shown in one line under the text. $points = array_values(array_filter([ $val('stat_1_text', __('sections.hero.stat_1')), $val('stat_2_text', __('sections.hero.stat_2')), $val('callout_1_text', __('sections.hero.callout_1')), $val('callout_2_text', __('sections.hero.callout_2')), ], fn ($p) => $p !== null && $p !== '')); @endphp
@if($badgeText)
{{ $badgeText }}
@endif {{-- The headline is the one string on this page allowed to carry markup: the Turkish and English values both wrap their second half in for the accent colour that .hero__title span sets. It reaches here from the site content editor or from sections.hero.title, and both of those are operator-writable, so it goes through the same allow-list the public guide pages use rather than through a raw echo. See App\Support\InlineMarkup. --}}

{{ inline_markup($heroTitle) }}

@if($heroSubtitle)

{{ $heroSubtitle }}

@endif @if($heroDesc)

{{ $heroDesc }}

@endif
@if($ctaText) {{ $ctaText }} @endif @if($cta2Text) {{ $cta2Text }} @endif
@if($points)
    @foreach($points as $point)
  • {{ $point }}
  • @endforeach
@endif
@if($hasVisual)
@if($imageUrl !== '') @else @include('partials.hero-animations.'.$animation, ['domain' => $demoDomain]) @endif
@endif