@extends('template.'.config('settings.template').'.content.master')
@section('head')
    <style>
        .bgimage {
            width:100%;
            height:646px;
            background: url('{{ asset('template/images/finkenhammer-hof.jpg') }}');
            background-repeat: no-repeat;
            background-position: center;
            background-size:cover;
            background-attachment: fixed;
        }
        .bgimage h5 {
            color:white;
            text-shadow:2px 2px #333;
        }
    </style>
@stop
@section('content')
    <section class="bgimage">
        <div class="container">
            <div class="row">
                <div class="col-12 col-md-8 col-lg-7">
                    <div class="p-4 rounded" style="background-color: rgba(204,204,204,0.7); margin-top: 300px;">

                        <h1 class="fw-bolder">Biohof Finkenhammer</h1>
                        <p class="fs-5">Bäckerei & Hühnerhof aus 92714 Pleystein.</p>

                    </div>
                </div>
            </div>
        </div>
    </section>
    <div class="container">


        <div class="row">
            <div class="col-sm-12">

                <a href="https://www.finkenhammer.de/news/bauernmarkt-vohenstrauss-am-25112022-vor-der-eisdiele">
                    <div class="alert alert-success fs-6 pt-2 px-4 mt-3" role="alert">
                        Achtung! Bauernmarkt in Vohenstrauss Diese Woche 25. November 2022 stehen die Marktstände vor der Eisdiele.
                    </div>
                </a>


            </div>

            <div class="col-sm-12">
                <h2>Aktuelles</h2>
            </div>
            @if(filterByContentType("News")->count() == 0)
            <div class="col-12 text-center text-muted">
                Derzeit noch keine Neuigkeiten auf der Homepage veröffentlicht
                <br>
                <br>
                <br>
                <br>
                <br>
            </div>
            @endif
            @foreach(filterByContentType("News")->take(3) as $content)
                <div class="col-12 col-md-6 col-lg-4">
                    <div class="card shadow-sm mb-5 h-100" style="background-color: #f8f8f4;">
                        <img src="{{$content->image()}}" class="img-fluid card-img-top">
                        <div class="card-body">
                            <h2 class="h5 fw-bolder mb-3">{{$content->title}}</h2>
                            <p class="mt-2">{!! $content->vorschau !!}</p>
                        </div>
                        <div class="text-end pt-0 p-4">
                            <a href="{{($content->path)}}" class="text-decoration-none">
                                Mehr lesen ⟶
                            </a>
                        </div>
                    </div>
                </div>
            @endforeach

            <div class="col-12">
                <br>
                <br>
                <br>
                <br>
            </div>



            <a href="{{url('/neuigkeiten')}}" class="small text-center mb-5 mt-3 d-none">Ältere Nachrichten</a>
        </div>
    </div>
@stop