condition with type status
							parent
							
								
									b28a62f275
								
							
						
					
					
						commit
						f83d24df77
					
				| 
						 | 
				
			
			@ -1,3 +1,4 @@
 | 
			
		|||
@inject('type', 'Type')
 | 
			
		||||
@extends('template.'.config('settings.template').'.content.master')
 | 
			
		||||
@section('content')
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -26,62 +27,64 @@
 | 
			
		|||
        </div>
 | 
			
		||||
    </div>
 | 
			
		||||
 | 
			
		||||
    @php($news = filterByContentType("News"))
 | 
			
		||||
    @if($news->isNotEmpty())
 | 
			
		||||
        <section id="article-section" >
 | 
			
		||||
            <div class="container">
 | 
			
		||||
                <div class="row">
 | 
			
		||||
                    <div class="col-12">
 | 
			
		||||
                        <h2 id="aktuelles" class="mb-4">Aktuelles</h2>
 | 
			
		||||
                    </div>
 | 
			
		||||
                
 | 
			
		||||
                    @foreach($news->take(3) as $content)
 | 
			
		||||
                        <div class="col-12 col-md-6 col-lg-4 mb-4">
 | 
			
		||||
                            <div class="card shadow-sm h-100">
 | 
			
		||||
                                <a href="{{ $content->path }}" class="text-decoration-none">
 | 
			
		||||
                                    <x-img src="{{$content->image()}}" style="aspect-ratio:9/5; object-fit:cover;" sizes="(max-width: 330px) 330px,(max-width: 540px) 540px, (max-width: 720px) 720px, (max-width: 992px) 993px, 500" class="img-fluid card-img-top"/>
 | 
			
		||||
                                </a>
 | 
			
		||||
                                <div class="card-body">
 | 
			
		||||
                                    <h3 class="h5 mb-2">
 | 
			
		||||
                                        <a href="{{ $content->path }}" class="text-decoration-none">
 | 
			
		||||
                                            {{$content->title}}
 | 
			
		||||
                                        </a>
 | 
			
		||||
                                    </h3>
 | 
			
		||||
                                    <div class="text-muted small my-3">
 | 
			
		||||
                                        <span title="{{$content->created_at}}">
 | 
			
		||||
                                            <svg style="fill: currentColor;width:15px;margin-bottom: 5px;margin-right: 3px;}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M112 0c8.8 0 16 7.2 16 16V64H320V16c0-8.8 7.2-16 16-16s16 7.2 16 16V64h32c35.3 0 64 28.7 64 64v32 32V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V192 160 128C0 92.7 28.7 64 64 64H96V16c0-8.8 7.2-16 16-16zM416 192H32V448c0 17.7 14.3 32 32 32H384c17.7 0 32-14.3 32-32V192zM384 96H64c-17.7 0-32 14.3-32 32v32H416V128c0-17.7-14.3-32-32-32z"/></svg>
 | 
			
		||||
                                        {{ $content->updated_at->diffForHumans() }}
 | 
			
		||||
                                        </span>
 | 
			
		||||
    @if($type->get("News")->status)
 | 
			
		||||
        @php($news = filterByContentType("News"))
 | 
			
		||||
        @if($news->isNotEmpty())
 | 
			
		||||
            <section id="article-section" >
 | 
			
		||||
                <div class="container">
 | 
			
		||||
                    <div class="row">
 | 
			
		||||
                        <div class="col-12">
 | 
			
		||||
                            <h2 id="aktuelles" class="mb-4">Aktuelles</h2>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    
 | 
			
		||||
                        @foreach($news->take(3) as $content)
 | 
			
		||||
                            <div class="col-12 col-md-6 col-lg-4 mb-4">
 | 
			
		||||
                                <div class="card shadow-sm h-100">
 | 
			
		||||
                                    <a href="{{ $content->path }}" class="text-decoration-none">
 | 
			
		||||
                                        <x-img src="{{$content->image()}}" style="aspect-ratio:9/5; object-fit:cover;" sizes="(max-width: 330px) 330px,(max-width: 540px) 540px, (max-width: 720px) 720px, (max-width: 992px) 993px, 500" class="img-fluid card-img-top"/>
 | 
			
		||||
                                    </a>
 | 
			
		||||
                                    <div class="card-body">
 | 
			
		||||
                                        <h3 class="h5 mb-2">
 | 
			
		||||
                                            <a href="{{ $content->path }}" class="text-decoration-none">
 | 
			
		||||
                                                {{$content->title}}
 | 
			
		||||
                                            </a>
 | 
			
		||||
                                        </h3>
 | 
			
		||||
                                        <div class="text-muted small my-3">
 | 
			
		||||
                                            <span title="{{$content->created_at}}">
 | 
			
		||||
                                                <svg style="fill: currentColor;width:15px;margin-bottom: 5px;margin-right: 3px;}" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M112 0c8.8 0 16 7.2 16 16V64H320V16c0-8.8 7.2-16 16-16s16 7.2 16 16V64h32c35.3 0 64 28.7 64 64v32 32V448c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V192 160 128C0 92.7 28.7 64 64 64H96V16c0-8.8 7.2-16 16-16zM416 192H32V448c0 17.7 14.3 32 32 32H384c17.7 0 32-14.3 32-32V192zM384 96H64c-17.7 0-32 14.3-32 32v32H416V128c0-17.7-14.3-32-32-32z"/></svg>
 | 
			
		||||
                                            {{ $content->updated_at->diffForHumans() }}
 | 
			
		||||
                                            </span>
 | 
			
		||||
                                        </div>
 | 
			
		||||
 | 
			
		||||
                                        {!! Str::limit($content->vorschau, 280) !!}
 | 
			
		||||
                                    </div>
 | 
			
		||||
 | 
			
		||||
                                    {!! Str::limit($content->vorschau, 280) !!}
 | 
			
		||||
                                </div>
 | 
			
		||||
                                    <div class="card-footer text-end">
 | 
			
		||||
                                        <a class="btn btn-sm btn-ci" href="{{ $content->path }}" onclick="gtag('event', 'See Job', {'event_category' : 'Home', 'event_label' : '{{$content->title}}'});">
 | 
			
		||||
                                            Mehr lesen
 | 
			
		||||
                                            <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">
 | 
			
		||||
                                                <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" />
 | 
			
		||||
                                            </svg>
 | 
			
		||||
                                        </a>
 | 
			
		||||
                                    </div>
 | 
			
		||||
 | 
			
		||||
                                <div class="card-footer text-end">
 | 
			
		||||
                                    <a class="btn btn-sm btn-ci" href="{{ $content->path }}" onclick="gtag('event', 'See Job', {'event_category' : 'Home', 'event_label' : '{{$content->title}}'});">
 | 
			
		||||
                                        Mehr lesen
 | 
			
		||||
                                        <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-chevron-right" viewBox="0 0 16 16">
 | 
			
		||||
                                            <path fill-rule="evenodd" d="M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708z" />
 | 
			
		||||
                                        </svg>
 | 
			
		||||
                                    </a>
 | 
			
		||||
                                </div>
 | 
			
		||||
 | 
			
		||||
                            </div>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    @endforeach
 | 
			
		||||
                        @endforeach
 | 
			
		||||
 | 
			
		||||
                    @if($news->count() > 3)
 | 
			
		||||
                        <div class="col-12 text-center mt-3">
 | 
			
		||||
                            <a href="{{url('/aktuelles')}}" class="text-muted text-decoration-none">
 | 
			
		||||
                                <svg style="fill: currentColor; width: 14px; margin-right: 4px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M32 132V48c0-8.8-7.2-16-16-16S0 39.2 0 48V176c0 8.8 7.2 16 16 16H144c8.8 0 16-7.2 16-16s-7.2-16-16-16H53.6C89.5 84.3 166.7 32 256 32c123.7 0 224 100.3 224 224s-100.3 224-224 224c-73.3 0-138.3-35.2-179.2-89.6c-5.3-7.1-15.3-8.5-22.4-3.2s-8.5 15.3-3.2 22.4C97.9 471.8 172.2 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C159.6 0 75.7 53.3 32 132zm224-4c-8.8 0-16 7.2-16 16V256c0 4.2 1.7 8.3 4.7 11.3l80 80c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L272 249.4V144c0-8.8-7.2-16-16-16z"/></svg>
 | 
			
		||||
                                Ältere Nachrichten
 | 
			
		||||
                            </a>
 | 
			
		||||
                        </div>
 | 
			
		||||
                    @endif
 | 
			
		||||
                        @if($news->count() > 3)
 | 
			
		||||
                            <div class="col-12 text-center mt-3">
 | 
			
		||||
                                <a href="{{url('/aktuelles')}}" class="text-muted text-decoration-none">
 | 
			
		||||
                                    <svg style="fill: currentColor; width: 14px; margin-right: 4px;" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M32 132V48c0-8.8-7.2-16-16-16S0 39.2 0 48V176c0 8.8 7.2 16 16 16H144c8.8 0 16-7.2 16-16s-7.2-16-16-16H53.6C89.5 84.3 166.7 32 256 32c123.7 0 224 100.3 224 224s-100.3 224-224 224c-73.3 0-138.3-35.2-179.2-89.6c-5.3-7.1-15.3-8.5-22.4-3.2s-8.5 15.3-3.2 22.4C97.9 471.8 172.2 512 256 512c141.4 0 256-114.6 256-256S397.4 0 256 0C159.6 0 75.7 53.3 32 132zm224-4c-8.8 0-16 7.2-16 16V256c0 4.2 1.7 8.3 4.7 11.3l80 80c6.2 6.2 16.4 6.2 22.6 0s6.2-16.4 0-22.6L272 249.4V144c0-8.8-7.2-16-16-16z"/></svg>
 | 
			
		||||
                                    Ältere Nachrichten
 | 
			
		||||
                                </a>
 | 
			
		||||
                            </div>
 | 
			
		||||
                        @endif
 | 
			
		||||
 | 
			
		||||
                    </div>
 | 
			
		||||
                </div>
 | 
			
		||||
            </div>
 | 
			
		||||
        </section>
 | 
			
		||||
            </section>
 | 
			
		||||
        @endif
 | 
			
		||||
    @endif
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue