@extends('layouts.idara.panel')


@section('content')
<link rel="stylesheet" href="{{ asset('backend/css/idara.css') }}">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css" integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ==" crossorigin="anonymous" referrerpolicy="no-referrer" />

@include('backend.partials.import')

@include('backend.partials.features')


        <section class="mt-4">
            <div class="card">
                <div class="card-header actionTitle">

                    <div class="row">
                        <div class="col">
                            <strong><i class="fa fa-ellipsis-v" aria-hidden="true"></i> {{$article->titre}}</strong>

                        </div>
                        <div class="col flexBtn">
                            <div class="dropdown">
                                <button class="btn  dropdown-toggle" type="button" data-bs-toggle="dropdown" aria-expanded="false">
                                    <i class="fa fa-gears"></i> Actions
                                </button>
                                <ul class="dropdown-menu">
                                    <a href="{{url('/clean')}}">
                                        <li><button class="dropdown-item" type="button"><i class="fas fa-eye" aria-hidden="true"></i> Visualiser</button></li>

                                    </a>
                                    <a href="{{ route('slide.edit',['id'=>$article]) }}">
                                        <li><button class="dropdown-item" type="button"> <i class="fa-solid fa-pen-to-square"></i> Modifier</button></li>
                                    </a>

                                </ul>
                            </div>
                      
                        </div>

                    </div>


                </div>

                <div class="card-body">
                    <div><i class="fa-solid fa-calendar-days"></i> <strong>Date de mise à jour : </strong> {{$article->created_at}}</div>

                    <br>
                    <div> {!! html_entity_decode ($article->texte)!!}</div>

                </div>
            </div>


        </section>
        <section>

            @if(session('success'))
            <div class="alert alert-success">
                {{ session('success') }}
            </div>
            @endif
            @if(empty($article->image))

            @else
            <div class="card mt-4">
                <h5 class="card-header">Image</h5>
                <div class="card-body">

                    <div class="showImage">

                        <img src="{{ asset('storage/image/'.$article->image) }}" alt="description of myimage">
                        
                    </div>
                </div>
            </div>
            @endif

        </section>


    </div>

    @endsection
