@extends('layouts.app') @php use Illuminate\Support\Carbon; $registry = new \App\Support\SubdomainRegistry(); // Anzeige-Sprache aus dem ersten URL-Segment (/en|/de); Standard = de. $siteLocale = in_array(request()->segment(1), ['de', 'en'], true) ? request()->segment(1) : 'de'; $en = $siteLocale === 'en'; $t = fn ($de, $enText) => $en ? $enText : $de; $mac = ($app['kind'] ?? '') === 'mac'; $shots = collect($app['screenshots'] ?? []); $shotClass = $mac ? 'mac' : 'ios'; $platform = $mac ? 'Mac' : 'iPhone · iPad'; $pf = $app['price_formatted'] ?? ''; $rel = !empty($app['updated']) ? Carbon::parse($app['updated'])->locale($siteLocale)->diffForHumans() : ''; $verLabel = !empty($app['version']) ? $t('in Version ' . $app['version'], 'in version ' . $app['version']) : $t('in dieser Version', 'in this version'); $rating = (float) ($app['rating'] ?? 0); $ratingCount = (int) ($app['rating_count'] ?? 0); $ratingBadge = ''; if ($rating > 0) { $ratingBadge = number_format($rating, 1, ',', '.'); if ($ratingCount > 0) { $ratingBadge .= ' · ' . number_format($ratingCount, 0, ',', '.'); } } $info = []; if (!empty($app['seller'])) { $info[$t('Anbieter', 'Seller')] = $app['seller']; } if (!empty($app['size'])) { $info[$t('Größe', 'Size')] = $app['size']; } if (!empty($app['genre'])) { $info[$t('Kategorie', 'Category')] = $app['genre']; } if ($pf !== '') { $info[$t('Preis', 'Price')] = $pf; } if (!empty($app['version'])) { $info[$t('Version', 'Version')] = $app['version']; } if ($rel !== '') { $info[$t('Aktualisiert', 'Updated')] = $rel; } if (!empty($app['min_os'])) { $info[$t('Erfordert', 'Requires')] = ($mac ? 'macOS ' : 'iOS ') . $app['min_os'] . ' +'; } if (!empty($app['languages'])) { $info[$t('Sprachen', 'Languages')] = $app['languages']; } if (!empty($app['content'])) { $info[$t('Altersfreigabe', 'Age rating')] = $app['content']; } $metaDesc = \Illuminate\Support\Str::limit(strip_tags($app['description'] ?? ('Die App ' . ($app['name'] ?? '') . ' im App Store.')), 155); @endphp @section('title', ($app['name'] ?? 'App') . ' – App Store | Arthur Kotsch') @section('meta_description', $metaDesc) @section('structured_data') @php // Preis aus dem formatierten String ableiten (der App-Store-Service liefert // keinen numerischen Wert). Leer/"Gratis" → 0. $priceNum = '0'; if ($pf !== '' && preg_match('/[\d.,]+/', $pf, $pm)) { $priceNum = str_replace([',', ' '], ['.', ''], str_replace('.', '', $pm[0])); } $appSchema = array_filter([ '@context' => 'https://schema.org', '@type' => 'SoftwareApplication', 'name' => $app['name'] ?? '', 'description' => $metaDesc, 'image' => $app['icon'] ?? null, 'applicationCategory' => $app['genre'] ?? 'MobileApplication', 'operatingSystem' => $mac ? 'macOS' : 'iOS', 'url' => $app['url'] ?? null, 'softwareVersion' => $app['version'] ?? null, 'author' => ['@type' => 'Person', 'name' => 'Arthur Kotsch'], 'offers' => [ '@type' => 'Offer', 'price' => $priceNum, 'priceCurrency' => $en ? 'USD' : 'EUR', ], ], fn ($v) => $v !== null && $v !== ''); if ($ratingCount > 0 && $rating > 0) { $appSchema['aggregateRating'] = [ '@type' => 'AggregateRating', 'ratingValue' => number_format($rating, 1, '.', ''), 'ratingCount' => $ratingCount, ]; } @endphp @endsection @section('content')
{{ $t('Alle Apps', 'All apps') }}
@if(!empty($app['icon'])) {{ $app['name'] ?? '' }} Icon @endif

{{ $app['name'] ?? '' }}

{{ $app['genre'] ?? '' }} · {{ $platform }}

@if($ratingBadge !== '') {{ $ratingBadge }} @endif @if($pf !== '') {{ $pf }} @endif @if(!empty($app['version'])) v{{ $app['version'] }} @endif
@if(!empty($app['url'])) {{ $t('Im App Store laden', 'Get it on the App Store') }} @endif
@if($shots->isNotEmpty())
@foreach($shots as $s) {{ $app['name'] ?? '' }} Screenshot @endforeach
@endif
@if(!empty($app['notes']))

{{ $t('Neu', 'What’s new') }} {{ $verLabel }}

{!! nl2br(e($app['notes'])) !!}

@endif @if(!empty($app['description']))

{{ $t('Beschreibung', 'Description') }}

{!! nl2br(e($app['description'])) !!}

@endif
@endsection