@extends('template.'.config('settings.template').'.content.master')
@section('content')

<br>
<br>
<br>
<br>

    <section id="article-section">


        <div class="container">

            <div class="article-feed">
                    <article class="newsentry" style="width: 100%;">

                        <div class="col-lg-12">
                            <div class="card shadow-lg" id="news-{{$nach->id}}">

                                <div class="card-body">
                                    @if($nach->created_at->diffInHours(date('Y-m-d H:i:s')) < 1)
                                        <div class="progress" style="height: 30px;">
                                            <div class="progress-bar progress-bar-striped progress-bar-animated bg-warning" role="progressbar" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100" style="width: 100%">
                                                <span style="color: black; font-size: 16px;">{{ $nach->created_at->diffForHumans() }} veröffentlicht</span>
                                            </div>
                                        </div>
                                        <br>
                                    @endif

                                    <a href="#">
                                        <h2 class="card-title">{{$nach->title}}</h2>
                                    </a>

                                    <h6 class="card-subtitle mb-2">

                                            <span style="font-weight: normal " class="text-dark"">{{date('d.m.Y H:i', strtotime($nach->created_at))}}</span>
                                    </h6>



                                    @if ($nach->image)
                                        <img src="{{ asset('uploads/' . $nach->image) }}" class="img-responsive" style="max-width: 100%;margin-bottom: 20px; margin-top:20px;    display: block;">
                                    @endif


                                    <p class="card-text">
                                        {!! isset($nach->additional_fields['1']) ? $nach->additional_fields['1']  : 'keine Angaben' !!}
                                    </p>



                                </div>

                            </div>
                        </div>


                    </article>
            </div>
        </div>
    </section>


@stop
    @section('scripts')

    <script src="https://cdnjs.cloudflare.com/ajax/libs/jscroll/2.4.1/jquery.jscroll.min.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-cookie/1.4.1/jquery.cookie.min.js"></script>


    <script src="{{ asset('template/js/dropzone.min.js') }}"></script>
    <script src="{{ asset('template/js/fslightbox.js') }}"></script>


    <script>
        toastr.options = {
            "progressBar": true
        };
    </script>




@stop
