feat: remodelar /sobre conforme mock editorial
All checks were successful
All checks were successful
Alinha a página Sobre à composição aprovada (hero, pilares, Michele, processo, portfólio, CTA), com foto da Michele via CMS e tokens Heritage Editorial. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
20
app/Application/Data/AboutContent.php
Normal file
20
app/Application/Data/AboutContent.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Application\Data;
|
||||
|
||||
use App\Models\PortfolioCase;
|
||||
use App\Models\SiteSetting;
|
||||
use Illuminate\Database\Eloquent\Collection;
|
||||
|
||||
final readonly class AboutContent
|
||||
{
|
||||
/**
|
||||
* @param Collection<int, PortfolioCase> $featuredCases
|
||||
*/
|
||||
public function __construct(
|
||||
public SiteSetting $settings,
|
||||
public Collection $featuredCases,
|
||||
) {}
|
||||
}
|
||||
25
app/Application/Queries/Marketing/GetAboutContent.php
Normal file
25
app/Application/Queries/Marketing/GetAboutContent.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Application\Queries\Marketing;
|
||||
|
||||
use App\Application\Data\AboutContent;
|
||||
use App\Models\PortfolioCase;
|
||||
use App\Models\SiteSetting;
|
||||
|
||||
final class GetAboutContent
|
||||
{
|
||||
public function __invoke(): AboutContent
|
||||
{
|
||||
return new AboutContent(
|
||||
settings: SiteSetting::instance(),
|
||||
featuredCases: PortfolioCase::query()
|
||||
->published()
|
||||
->where('is_featured', true)
|
||||
->orderBy('sort_order')
|
||||
->limit(6)
|
||||
->get(),
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -63,6 +63,9 @@ final class MediaGenerateVariantsCommand extends Command
|
||||
if ($settings && filled($settings->about_image_path)) {
|
||||
$paths[] = (string) $settings->about_image_path;
|
||||
}
|
||||
if ($settings && filled($settings->founder_image_path)) {
|
||||
$paths[] = (string) $settings->founder_image_path;
|
||||
}
|
||||
if ($settings && filled($settings->hero_image_path)) {
|
||||
$paths[] = (string) $settings->hero_image_path;
|
||||
}
|
||||
|
||||
@@ -268,8 +268,10 @@ class ManageSiteSettings extends Page
|
||||
->columns(2),
|
||||
Section::make('Página Sobre')
|
||||
->schema([
|
||||
PublicImageUploadRules::fileUpload('about_image_path', 'Imagem da página Sobre', 'content/about'),
|
||||
PublicImageUploadRules::fileUpload('about_image_path', 'Imagem do hero / Sobre', 'content/about'),
|
||||
PublicImageUploadRules::altTextField('about_image_alt', 'about_image_path'),
|
||||
PublicImageUploadRules::fileUpload('founder_image_path', 'Foto da Michele', 'content/about/founder'),
|
||||
PublicImageUploadRules::altTextField('founder_image_alt', 'founder_image_path'),
|
||||
])
|
||||
->columns(2),
|
||||
Section::make('SEO padrão')
|
||||
|
||||
@@ -5,17 +5,20 @@ declare(strict_types=1);
|
||||
namespace App\Http\Controllers\PublicSite;
|
||||
|
||||
use App\Application\Data\PageMeta;
|
||||
use App\Application\Queries\Marketing\GetAboutContent;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\SiteSetting;
|
||||
use Illuminate\Contracts\View\View;
|
||||
|
||||
final class PageController extends Controller
|
||||
{
|
||||
public function about(): View
|
||||
public function about(GetAboutContent $getAboutContent): View
|
||||
{
|
||||
$settings = SiteSetting::instance();
|
||||
$content = $getAboutContent();
|
||||
$settings = $content->settings;
|
||||
|
||||
return view('pages.about', [
|
||||
'content' => $content,
|
||||
'siteSettings' => $settings,
|
||||
'pageMeta' => PageMeta::forPage(
|
||||
canonical: route('about'),
|
||||
|
||||
@@ -19,6 +19,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
* @property string|null $default_og_image_alt
|
||||
* @property string|null $about_image_path
|
||||
* @property string|null $about_image_alt
|
||||
* @property string|null $founder_image_path
|
||||
* @property string|null $founder_image_alt
|
||||
* @property string|null $hero_image_path
|
||||
* @property string|null $hero_image_alt
|
||||
* @property string|null $services_hero_image_path
|
||||
@@ -47,6 +49,8 @@ use Illuminate\Database\Eloquent\Model;
|
||||
'about_summary',
|
||||
'about_image_path',
|
||||
'about_image_alt',
|
||||
'founder_image_path',
|
||||
'founder_image_alt',
|
||||
'manifesto_title',
|
||||
'manifesto_lead',
|
||||
'manifesto_body',
|
||||
|
||||
Reference in New Issue
Block a user