From 0716b70bfa126e4cf1b79e12f083407bffb44d02 Mon Sep 17 00:00:00 2001 From: Vasyka Date: Tue, 1 Sep 2026 10:50:40 +0000 Subject: [PATCH] feat(faq): video tutorial + full-width layout + wider grid MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - New tenant setting: settings.faq_video_url. TextInput on Settings page → Liste configurabile (accepts YouTube watch URL, youtu.be short URL, YouTube shorts/embed URL, or Vimeo URL). - Faq page has getVideoEmbedUrl() that converts recognized URLs to their /embed/ variant. Unknown URLs fall back to a "?" card with a direct link. Admins see a "configure in Settings" nudge when no URL is set. - Video renders as a 16:9 iframe capped at 480px height, above the hero. - .faq-shell is now width:100% (was max-width:1200px) so FAQ uses all available horizontal space. - .faq-grid switched from strict 2 columns to repeat(auto-fit, minmax(420px, 1fr)) so wide screens get 3 columns and narrow screens stack. Co-Authored-By: Claude Opus 4.7 (1M context) --- app/Filament/Tenant/Pages/Faq.php | 29 ++++++++ app/Filament/Tenant/Pages/Settings.php | 7 ++ lang/en.json | 6 ++ lang/ru.json | 6 ++ .../views/filament/tenant/pages/faq.blade.php | 73 ++++++++++++++++++- 5 files changed, 119 insertions(+), 2 deletions(-) diff --git a/app/Filament/Tenant/Pages/Faq.php b/app/Filament/Tenant/Pages/Faq.php index 5319b29..245e881 100644 --- a/app/Filament/Tenant/Pages/Faq.php +++ b/app/Filament/Tenant/Pages/Faq.php @@ -45,6 +45,35 @@ class Faq extends Page return Hints::AREAS; } + /** + * Convert a YouTube / Vimeo watch URL to the embed URL that goes in + * an + + @elseif ($videoRaw) +
+
🎥
+
+

{{ __('Video tutorial') }}

+

+ {{ __('URL nerecunoscut — deschide-l direct:') }} + {{ $videoRaw }} +

+
+
+ @elseif ($user?->isAdmin()) +
+
🎥
+
+

{{ __('Video tutorial') }}

+

+ {{ __('Adaugă un link YouTube/Vimeo în') }} + {{ __('Setări → Liste configurabile') }} → +

+
+
+ @endif + {{-- CONTROLS --}}