@extends('back-end.master.app')
@section('title', 'New Info')

@section('body')
    <main class="app-content">
        <div class="card">
            <div class="card-body">
                <div class="row">
                    <div class="col-md-9">
                        <h5>Website Info</h5>
                    </div>
                    <div class="col-md-3">
                        <a href="{{ route('info.index') }}" style="float: right;"
                            class="btn btn-primary btn-sm btn-rounded btn-sm btn-rounded">List</a>
                    </div>
                </div>
                <div class="row mt-5">
                    @foreach ($infos as $info)
                        <div class="col-md-6 col-sm-6 col-12">
                            <div class="card">
                                <img class="card-img-top" src="{{ asset('storage/' . $info->logo) }}"
                                    alt="{{ $info->website_title }}" style="width:100%;">
                                <div class="card-body">
                                    <h4 class="card-title">{{ $info->website_title }}</h4>
                                    <p class="card-text">{{ $info->address }}</p>
                                    <a href="{{ route('info.edit', $info->id) }}" class="btn btn-primary btn-sm btn-rounded"><i
                                            class="fa fa-edit"></i>Edit</a>
                                   
                                </div>
                            </div>
                        </div>
                    @endforeach
                </div>
            </div>
        </div>
    </main>

@endsection


@section('pageJs')
    <script type="text/javascript">
        $(".app-menu").removeClass("active");
        $("#nav_setting").addClass("active");
        $("#nav_settingi").addClass("is-expanded");
        $("#nav_sub_info").addClass("active");
        <?php
if (session()->has("msg")) {
    ?>

        $.notify({
            title: "Notice: ",
            message: "<?= session()->get('msg') ?>",
            icon: "fa fa-check"
        }, {
            type: "success"
        });
        <?php
}
?>
    </script>
@endsection
