@extends('layouts.admin-layout')
@section('title', 'About Page Cms')
@section('content')
    <style>
        .shadow-section {
            border: 1px solid #ddd;
            /* Light border around the section */
            box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
            /* Subtle shadow effect */
            border-radius: 8px;
            /* Rounded corners */
            padding: 20px;
            /* Add padding inside the section */
            margin-bottom: 20px;
            /* Space between core value sections */
            background-color: #fff;
            /* Background color */
        }

        .shadow-section img {
            border: 1px solid #ddd;
            /* Add border around images */
            border-radius: 8px;
            /* Rounded corners for images */
        }

        .text-end {
            text-align: end !important;
        }
    </style>
    <div class="content-wrapper">
        <section class="content">
            <div class="container-fluid">
                <div class="row">
                    <!-- left column -->
                    <div class="col-md-12 mt-5">
                        <!-- general form elements -->
                        <div class="card card-dark card-box-shadow">
                            <div class="card-header">
                                <h3 class="card-title">(About Page)</h3>
                            </div>
                            <form action="{{ route('admin.pages.update', ['slug' => $page->slug]) }}" method="post"
                                class="category-form" enctype="multipart/form-data">
                                @csrf
                                <input type="hidden" name="slug" value="{{ $page->slug }}">
                                <input type="hidden" name="media_collections[]" value="banner_image">
                                <input type="hidden" name="media_collections[]" value="story_image1">
                                <input type="hidden" name="media_collections[]" value="story_image2">
                                <input type="hidden" name="media_collections[]" value="story_image3">
                                <input type="hidden" name="media_collections[]" value="story_image4">
                                <input type="hidden" name="media_collections[]" value="story_image5">
                                <input type="hidden" name="media_collections[]" value="story_image6">

                                <div class="card-body">

                                    <!-- 4rd Row -->
                                    <h2 class="text-center mb-5">Banner Section</h2>

                                    <div class="row">
                                        <!-- Banner Section -->
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Banner Title</label><br>
                                                <input type="text" required class="form-control form__field"
                                                    name="banner_heading" id="title"
                                                    value="{{ $content['banner_heading'] ?? '' }}">
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="banner_image">Banner Image</label><br>
                                                <input type="file" class="form-control form__field" name="banner_image"
                                                    id="cta_image">
                                                @if ($page->hasMedia('banner_image'))
                                                    <label for="existing_background_banner_image"></label>
                                                    @foreach ($page->getMedia('banner_image') as $media)
                                                        <img src="{{ $media->getUrl() }}" alt="Existing Banner Image"
                                                            style="max-width: 200px; max-height: 200px; margin-top: 10px; background-color: black">
                                                    @endforeach
                                                @endif
                                            </div>
                                        </div>
                                    </div>

                                    <h2 class="text-center my-5">About Story One Section</h2>
                                    <div class="row">

                                        <!-- Banner Section -->

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Heading *</label><br>
                                                <input type="text" required class="form-control form__field"
                                                    name="about_sto1_heading" id="title"
                                                    value="{{ $content['about_sto1_heading'] ?? '' }}">
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Description One *</label><br>
                                                <textarea class="form-control form__field" name="about_sto1_des1" required placeholder="Description">{{ $content['about_sto1_des1'] ?? '' }}</textarea>
                                            </div>
                                        </div>

                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label for="banner_image">Image</label><br>
                                                <input type="file" class="form-control form__field"
                                                    name="story_image1" id="cta_image">
                                                @if ($page->hasMedia('story_image1'))
                                                    <label for="existing_background_story_image1"></label>
                                                    @foreach ($page->getMedia('story_image1') as $media)
                                                        <img src="{{ $media->getUrl() }}" alt="Existing Banner Image"
                                                            style="max-width: 200px; max-height: 200px; margin-top: 10px; background-color: black">
                                                    @endforeach
                                                @endif
                                            </div>
                                        </div>

                                    </div>

                                    <h2 class="text-center my-5">About Story Two Section</h2>
                                    <div class="row">

                                        <!-- Banner Section -->

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Heading *</label><br>
                                                <input type="text" required class="form-control form__field"
                                                    name="about_sto2_heading" id="title"
                                                    value="{{ $content['about_sto2_heading'] ?? '' }}">
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Description One *</label><br>
                                                <textarea class="form-control form__field" name="about_sto2_des1" required placeholder="Description">{{ $content['about_sto2_des1'] ?? '' }}</textarea>
                                            </div>
                                        </div>

                                        <div class="col-md-12">
                                            <div class="form-group">
                                                <label for="banner_image">Image</label><br>
                                                <input type="file" class="form-control form__field"
                                                    name="story_image2" id="cta_image">
                                                @if ($page->hasMedia('story_image2'))
                                                    <label for="existing_background_story_image2"></label>
                                                    @foreach ($page->getMedia('story_image2') as $media)
                                                        <img src="{{ $media->getUrl() }}" alt="Existing Banner Image"
                                                            style="max-width: 200px; max-height: 200px; margin-top: 10px; background-color: black">
                                                    @endforeach
                                                @endif
                                            </div>
                                        </div>

                                    </div>

                                    <h2 class="text-center my-5">About Story Three Section</h2>
                                    <div class="row">

                                        <!-- Banner Section -->

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Heading *</label><br>
                                                <input type="text" required class="form-control form__field"
                                                    name="about_sto3_heading" id="title"
                                                    value="{{ $content['about_sto3_heading'] ?? '' }}">
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Description One *</label><br>
                                                <textarea class="form-control form__field" name="about_sto3_des1" required placeholder="Description">{{ $content['about_sto3_des1'] ?? '' }}</textarea>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Description Two *</label><br>
                                                <textarea class="form-control form__field" name="about_sto3_des2" required placeholder="Description">{{ $content['about_sto3_des2'] ?? '' }}</textarea>
                                            </div>
                                        </div>


                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Description Three *</label><br>
                                                <textarea class="form-control form__field" name="about_sto3_des3" required placeholder="Description">{{ $content['about_sto3_des3'] ?? '' }}</textarea>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Description Four *</label><br>
                                                <textarea class="form-control form__field" name="about_sto3_des4" required placeholder="Description">{{ $content['about_sto3_des4'] ?? '' }}</textarea>
                                            </div>
                                        </div>
                                        

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Description Five *</label><br>
                                                <textarea class="form-control form__field" name="about_sto3_des5" required placeholder="Description">{{ $content['about_sto3_des5'] ?? '' }}</textarea>
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Button Text *</label><br>
                                                <input type="text" required class="form-control form__field"
                                                    name="about_sto3_btn" id="title"
                                                    value="{{ $content['about_sto3_btn'] ?? '' }}">
                                            </div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="banner_image">Image One</label><br>
                                                <input type="file" class="form-control form__field"
                                                    name="story_image3" id="cta_image">
                                                @if ($page->hasMedia('story_image3'))
                                                    <label for="existing_background_story_image3"></label>
                                                    @foreach ($page->getMedia('story_image3') as $media)
                                                        <img src="{{ $media->getUrl() }}" alt="Existing Banner Image"
                                                            style="max-width: 200px; max-height: 200px; margin-top: 10px; background-color: black">
                                                    @endforeach
                                                @endif
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="banner_image">Image Two</label><br>
                                                <input type="file" class="form-control form__field"
                                                    name="story_image4" id="cta_image">
                                                @if ($page->hasMedia('story_image4'))
                                                    <label for="existing_background_story_image4"></label>
                                                    @foreach ($page->getMedia('story_image4') as $media)
                                                        <img src="{{ $media->getUrl() }}" alt="Existing Banner Image"
                                                            style="max-width: 200px; max-height: 200px; margin-top: 10px; background-color: black">
                                                    @endforeach
                                                @endif
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="banner_image">Image Three</label><br>
                                                <input type="file" class="form-control form__field"
                                                    name="story_image5" id="cta_image">
                                                @if ($page->hasMedia('story_image5'))
                                                    <label for="existing_background_story_image5"></label>
                                                    @foreach ($page->getMedia('story_image5') as $media)
                                                        <img src="{{ $media->getUrl() }}" alt="Existing Banner Image"
                                                            style="max-width: 200px; max-height: 200px; margin-top: 10px; background-color: black">
                                                    @endforeach
                                                @endif
                                            </div>
                                        </div>

                                    </div>

                                    <h2 class="text-center my-5">About Story Four Section</h2>
                                    <div class="row">

                                        <!-- Banner Section -->

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Heading *</label><br>
                                                <input type="text" required class="form-control form__field"
                                                    name="about_sto4_heading" id="title"
                                                    value="{{ $content['about_sto4_heading'] ?? '' }}">
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Description One *</label><br>
                                                <textarea class="form-control form__field" name="about_sto4_des1" required placeholder="Description">{{ $content['about_sto4_des1'] ?? '' }}</textarea>
                                            </div>
                                        </div>

                                        

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="banner_image">Image</label><br>
                                                <input type="file" class="form-control form__field"
                                                    name="story_image6" id="cta_image">
                                                @if ($page->hasMedia('story_image6'))
                                                    <label for="existing_background_story_image6"></label>
                                                    @foreach ($page->getMedia('story_image6') as $media)
                                                        <img src="{{ $media->getUrl() }}" alt="Existing Banner Image"
                                                            style="max-width: 200px; max-height: 200px; margin-top: 10px; background-color: black">
                                                    @endforeach
                                                @endif
                                            </div>
                                        </div>

                                    </div>


                                    <h2 class="text-center my-5">About Our Mission Story Section</h2>
                                    <div class="row">


                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Heading *</label><br>
                                                <input type="text" required class="form-control form__field"
                                                    name="our_mission_head" id="title"
                                                    value="{{ $content['our_mission_head'] ?? '' }}">
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Description One *</label><br>
                                                <textarea class="form-control form__field" name="our_mission_des1" required placeholder="Description">{{ $content['our_mission_des1'] ?? '' }}</textarea>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="title">Description Two *</label><br>
                                                <textarea class="form-control form__field" name="our_mission_des2" required placeholder="Description">{{ $content['our_mission_des2'] ?? '' }}</textarea>
                                            </div>
                                        </div>

                                        <div class="col-md-6">
                                            <div class="form-group">
                                                <label for="banner_image">Image </label><br>
                                                <input type="file" class="form-control form__field"
                                                    name="story_image2" id="cta_image">
                                                @if ($page->hasMedia('story_image2'))
                                                    <label for="story_image2"></label>
                                                    @foreach ($page->getMedia('story_image2') as $media)
                                                        <img src="{{ $media->getUrl() }}" alt="Existing Banner Image"
                                                            style="max-width: 200px; max-height: 200px; margin-top: 10px; background-color: black">
                                                    @endforeach
                                                @endif
                                            </div>
                                        </div>
                                    </div>

                                </div>
                                <div class="text-center mt-3">
                                    <button type="submit" class="btn btn-primary">Save</button>
                                </div>
                            </form>

                        </div>

                    </div>
                    <!-- /.card -->
                </div>
            </div>
        </section>
    </div>
    </div>

@endsection
