1
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
ssww23
2026-03-17 01:59:00 +03:00
parent 93a655235a
commit 0ee9f05416
48 changed files with 1193 additions and 413 deletions

View File

@@ -1,12 +1,15 @@
<!DOCTYPE html>
<html lang="ru">
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
@php
$supportedLocales = (array) config('app.supported_locales', []);
$currentLocale = app()->getLocale();
$currentLocaleData = $supportedLocales[$currentLocale] ?? $supportedLocales[config('app.locale', 'ru')] ?? [];
$siteName = config('seo.site_name', config('app.name', 'PC Shop'));
$metaTitleRaw = trim($__env->yieldContent('meta_title'));
$metaTitle = $metaTitleRaw !== '' ? "{$metaTitleRaw} - {$siteName}" : config('seo.default_title', $siteName);
$metaDescription = trim($__env->yieldContent('meta_description')) ?: config('seo.default_description');
$metaKeywords = trim($__env->yieldContent('meta_keywords')) ?: config('seo.default_keywords');
$metaTitle = $metaTitleRaw !== '' ? "{$metaTitleRaw} - {$siteName}" : __(config('seo.default_title', $siteName));
$metaDescription = trim($__env->yieldContent('meta_description')) ?: __(config('seo.default_description'));
$metaKeywords = trim($__env->yieldContent('meta_keywords')) ?: __(config('seo.default_keywords'));
$metaCanonical = trim($__env->yieldContent('meta_canonical')) ?: url()->current();
$metaOgType = trim($__env->yieldContent('meta_og_type')) ?: 'website';
$request = request();
@@ -30,10 +33,10 @@
$metaImageAlt = trim($__env->yieldContent('meta_image_alt')) ?: $metaTitle;
$siteUrl = url('/');
$companyName = config('shop.company_name', $siteName);
$companyDescription = config('shop.company_description', $metaDescription);
$companyDescription = __(config('shop.company_description', $metaDescription));
$companyPhone = trim((string) config('shop.contact_phone', ''));
$companyEmail = trim((string) config('shop.contact_email', ''));
$companyAddress = trim((string) config('shop.contact_address', ''));
$companyAddress = trim((string) __(config('shop.contact_address', '')));
$companyTelegram = trim((string) config('shop.contact_telegram', ''));
if ($companyTelegram !== '' && str_starts_with($companyTelegram, '@')) {
$companyTelegram = 'https://t.me/' . ltrim($companyTelegram, '@');
@@ -86,10 +89,12 @@
<meta name="keywords" content="{{ $metaKeywords }}">
<meta name="robots" content="{{ $metaRobots }}">
<link rel="canonical" href="{{ $metaCanonical }}">
<link rel="alternate" hreflang="ru-RU" href="{{ $metaCanonical }}">
@foreach ($supportedLocales as $localeData)
<link rel="alternate" hreflang="{{ $localeData['hreflang'] ?? 'ru-RU' }}" href="{{ $metaCanonical }}">
@endforeach
<link rel="alternate" hreflang="x-default" href="{{ $metaCanonical }}">
<meta property="og:type" content="{{ $metaOgType }}">
<meta property="og:locale" content="ru_RU">
<meta property="og:locale" content="{{ $currentLocaleData['og_locale'] ?? 'ru_RU' }}">
<meta property="og:site_name" content="{{ $siteName }}">
<meta property="og:title" content="{{ $metaTitle }}">
<meta property="og:description" content="{{ $metaDescription }}">