diff --git a/resources/views/layouts/public.blade.php b/resources/views/layouts/public.blade.php index f2a8ee119fe0b91ff7bf298db03819fd2e8c710d..34fecbcd8b0e7d26398178c87ae1246be175d3c5 100644 --- a/resources/views/layouts/public.blade.php +++ b/resources/views/layouts/public.blade.php @@ -8,6 +8,23 @@ <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> @vite(['resources/scss/public.scss', 'resources/js/app.js']) + + <meta property="og:locale" content="{{ config('app.locale') }}"> + <meta property="og:locale:alternate" content="{{ config('app.fallback_locale') }}"> + @if(!empty($title)) + <meta property="og:title" content="{{ $title }}"> + @endif + <meta property="og:type" content="website"> + <meta property="og:url" content="{{ url()->current() }}"> + @if(!empty($description)) + <meta name="description" content="{{ $description }}"> + <meta property="og:description" content="{{ $description }}"> + @endif + @if(!empty($image) && is_a($image, \App\Models\UploadedPicture::class)) + <meta property="og:image" content="{{ $image->getFullsizeUrl() }}"> + <meta property="og:image:width" content="{{ $image->width }}"> + <meta property="og:image:height" content="{{ $image->height }}"> + @endif </head> <body> @yield('content') diff --git a/resources/views/public/portfolio-show.blade.php b/resources/views/public/portfolio-show.blade.php index 9a8127f9722df173ee58f04ba33b39f773de5bca..bd3173a5e49d5173275150093e37c4031cea937a 100644 --- a/resources/views/public/portfolio-show.blade.php +++ b/resources/views/public/portfolio-show.blade.php @@ -1,4 +1,8 @@ -@extends('layouts.public', ['title' => $creation->nameTranslationKey->getTranslation()]) +@extends('layouts.public', [ + 'title' => $creation->nameTranslationKey->getTranslation(), + 'description' => $creation->shortDescriptionTranslationKey->getTranslation(), + 'image' => $creation->coverUploadedPicture +]) @section('content') <x-public.navbar class="container mx-auto px-4"/>