انتقل إلى المحتوى
الأدلة
التنقل
التنبيهات
الطبقات العائمة
التخطيط
عرض البيانات
النماذج
.md

التواصل

contact-18

قائمة مواقع بجانب خريطة: اختر مكتبًا من القائمة فتظهر خريطته بجانبها. بلغة CSS فقط، دون أي سكربت.

فتح بملء الشاشة

التثبيت

php artisan ui:add-block contact-18

أمر واحد يثبّت ملف Blade الخاص بالقالب وكل مكوّن يعتمد عليه. اعرضه في تخطيطك كالتالي <x-ui.blocks.contact-18 />.

المكونات المضمّنة

الاستخدام

Locations list beside a map. Picking an office in the list shows its map next to it. It works with no script: each office is a visually hidden radio, so the list is keyboard friendly (Tab in, arrow keys to move) and the selected map follows `:checked` in CSS. Every piece of content is a prop. A location is ['name' => ..., 'address' => ...] plus an optional 'map', an embed URL. No map is embedded by default: the panel shows a placeholder until you pass 'map', which renders as a lazy-loaded iframe titled with the location name (or 'mapTitle'). Give each instance on a page its own `id`.

<x-ui.blocks.contact-18
    id="offices"
    tagline="Offices"
    heading="Where to find us"
    description="Pick a studio to see it on the map."
    :locations="[
        ['name' => 'Sydney', 'address' => '1 Market St, Sydney NSW 2000', 'map' => 'https://www.openstreetmap.org/export/embed.html?bbox=151.20,-33.87,151.21,-33.86'],
        ['name' => 'Auckland', 'address' => '2 Queen St, Auckland 1010'],
    ]"
    action-label="Show on map"
/>

الخصائص

كل خاصية مع قيمتها الافتراضية. مرّر أيًّا منها كسمة، واستخدم : لربط قيمة PHP.

@props([
    'id' => 'contact-18',
    'tagline' => 'Tagline',
    'heading' => 'Locations',
    'description' => 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.',
    'locations' => [
        ['name' => 'Sydney', 'address' => '123 Sample St, Sydney NSW 2000 AU'],
        ['name' => 'New York', 'address' => '123 Sample St, New York NY 10000 USA'],
        ['name' => 'London', 'address' => '123 Sample St, London W1C 1DE, United Kingdom'],
    ],
    'actionLabel' => 'View Map',
])