@extends('layouts.idara.panel')


@section('content')


@include('backend.partials.import')


<div class="container"> 

    @include('backend.partials.features')

    <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
            <form action="{{url('presentation/'.$article->id)}}" method="post">
                <input type="hidden" name="_method" value="PUT">
                @csrf
                <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 class="form-group add mt-4">
                    <button type="submit" class="btn btn-danger" value="">Modifier</button>

                </div>
            </form>
        </div>
    </div>
</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
