@extends('layouts.idara.panel')


@section('content')


@include('backend.partials.import')


<div class="container">

    @include('backend.partials.features')
    <form action="{{url('presentation/'.$article->id)}}" method="post">
        <input type="hidden" name="_method" value="PUT">
        @csrf
    <div class="card  mt-4">
        <h5 class="card-header">Modifier la présentation</h5>
        <div class="card-body">
            @if(session('success'))
            <div class="alert alert-success">
                {{ session('success') }}
            </div>
            @endif
            @if (count($errors) > 0)
            <div class="alert alert-danger">
                <strong>Whoops!</strong> Some problems with your input.<br><br>
                <ul>
                    @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                    @endforeach
                </ul>
            </div>
            @endif

                <div class="form-group">
                    <label for="exampleFormControlInput1"><strong>Titre :</strong> </label>
                    <input type="text" class="form-control" name="titre" placeholder="titre" value="{{$article->titre}}" required>
                </div>

                <div class="form-group mt-4">
                    <label for="exampleFormControlTextarea1"><strong>Resume :</strong>  </label>
                    <textarea class="form-control" id="presentation" name="texte" rows="3">{!! html_entity_decode   ($article->texte)!!}</textarea>
                </div>

                <div class="form-group mt-4">
                    <label for="exampleFormControlTextarea1"><strong>Détails :</strong></label>
                    <textarea class="form-control" id="details" name="details" rows="3">{!! html_entity_decode   ($article->details)!!}</textarea>
                </div>


        </div>
    </div>

    <div class="card mt-4">
        <div class="card-header">
            Réferencement
        </div>
        <div class="card-body">
            <div class="form-group">
                <label for="exampleFormControlInput1" class="mb-3"><strong>Titre(SEO)</strong></label>

                <input type="text" class="form-control"  name="titre_seo" placeholder="..."
                    value="{{$article->titre_seo}}">
            </div>
            <div class="form-group mt-4">
                <label for="exampleFormControlInput1" class="mb-3"><strong>Resume(SEO)</strong></label>

                <textarea name="resume_seo" id="" style="width: 100%" rows="10" value="">{!!$article->resume_seo!!}</textarea>

            </div>

            <div class="form-group mt-4">
                <label for="exampleFormControlInput1" class="mb-3"><strong>Mot clé (SEO)</strong></label>

                <input type="text" class="form-control"  name="mot_cle" placeholder="..."
                    value="{{$article->mot_cle}}">
            </div>

        </div>
    </div>

    <div class="form-group add mt-4" style="text-align:end">
        <button type="submit" class="btn btn-danger" value="">Modifier</button>

    </div>

</form>

</div>

<style>
    .presentation {
        padding-top: 127px;
        margin: -1px 0 0 41px;
    }

    .clean {
        padding: 16px 9px 19px 15px;
        margin-top: -30px;
        font-size: 19px;
        font-weight: 600;
        color: #764b4b;

    }



    .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused) {
        border-color: var(--ck-color-base-border);
        height: 232px !important;
    }

</style>

@include('backend.partials.scriptIndex')

@endsection
