HEX
Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.33
System: Linux li317-225.members.linode.com 3.10.0-1062.12.1.el7.x86_64 #1 SMP Tue Feb 4 23:02:59 UTC 2020 x86_64
User: apache (48)
PHP: 7.4.33
Disabled: NONE
Upload Files
File: /var/www/hobbyistgarage/resources/views/index.blade.php
@extends('znews.layout.blog')

@section('title', '')


@section('content')


        <!-- Start page content -->
        <section id="page-content" class="page-wrapper">
        @if(isset($populars) && count($populars) > 0)
            <!-- Start Popular News [layout A+D]  -->
            <div class="zm-section bg-white ptb-70">
                <div class="container">
                    <div class="row mb-40">
                        <div class="col-md-12 col-sm-12 col-lg-12 col-xs-12">
                            <div class="section-title">
                                <h2 class="h6 header-color inline-block uppercase">Popular</h2>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <div class="col-md-5 col-sm-12 col-xs-12 col-lg-6">
                            <div class="zm-posts">
                            	@php
                            		$article = $populars->first();
                            	@endphp
                            	@if($article)
                                <article class="zm-post-lay-a">
                                    <div class="zm-post-thumb">
                                        <a href="{{ url('article/'.$article->short_url) }}">
                                        @include('znews._partials.imgset', ['size' => '645'])
                                          </a>
                                                                                
                                    </div>
                                    <div class="zm-post-dis">
                                        <div class="zm-post-header">
                                            <div class="zm-category">
												@foreach($article->categories as $category)
                                                    	@if(is_object($category))
                                                       	 	<a class="bg-cat-1 cat-btn" href="{{ url('/category/'.$category->short_url) }}">{{ $category->name }}</a>
                                                    	@endif
                                                    @endforeach
                                            </div>
                                            <h2 class="zm-post-title h2"><a href="{{ url('article/'.$article->short_url) }}">{{ $article->title }}</a></h2>
                                            <div class="zm-post-meta">
                                                <ul>
                                                    <li class="s-meta"><a href="{{ url('article/'.$article->short_url) }}" class="zm-date">{{ date("l, F d, Y", strtotime($article->published_at)) }}</a></li>
                                                </ul>
                                            </div>
                                        </div>
                                        <div class="zm-post-content">
                                            <p>{{ $article->description }}</p>
                                        </div>
                                    </div>
                                </article>
                                @endif
                            </div>
                        </div>
                        <div class="col-md-7 col-sm-12 col-xs-12 col-lg-6">
                            <div class="zm-posts">
                            @foreach($populars as $article)
                                <!-- Start single post layout D -->
                                @if(!$loop->first) 
                                <article class="zm-post-lay-d clearfix">
                                    <div class="zm-post-thumb f-left">
                                        <a href="{{ url('/category/'.$category->short_url) }}">
                                        @include('znews._partials.imgset', ['size' => '230'])
                                        
                                        </a>
                                    </div>
                                    <div class="zm-post-dis f-right">
                                        <div class="zm-post-header">
                                            <div class="zm-category">@foreach($article->categories as $category)
                                                    	@if(is_object($category))
                                                       	 	<a class="bg-cat-1 cat-btn" href="{{ url('/category/'.$category->short_url) }}">{{ $category->name }}</a>
                                                    	@endif
                                                    @endforeach</div>
                                            <h2 class="zm-post-title"><a href="{{ url('/category/'.$category->short_url) }}">{{ $article->title }}</a></h2>
                                            <div class="zm-post-meta">
                                                <ul>
                                                    <li class="s-meta"><a href="{{ url('/category/'.$category->short_url) }}" class="zm-date">{{ date("l, F d, Y", strtotime($article->published_at)) }}</a></li>
                                                </ul>
                                            </div>
                                        </div>
                                    </div>
                                </article>
                                @endif
                                <!-- Start single post layout D -->
                              @endforeach
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            <!-- End Popular News [layout A+D]  -->
            @endif

            
            <div class="zm-section bg-white pt-10 pb-40">
                <div class="container">
                	<div class="row mb-40">
                        <div class="col-md-12 col-sm-12 col-lg-12 col-xs-12">
                            <div class="section-title">
                                <h2 class="h6 header-color inline-block uppercase">Latest</h2>
                            </div>
                        </div>
                    </div>
                    <div class="row">
                        <!-- Start left side -->
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-8 columns">
                            <div class="row">
                                <div class="col-md-12">
                                    <div class="zm-posts">
                                    @if(isset($articles))
                                    @foreach($articles as $article)
                                        <!-- Start single post layout C -->
                                        <article class="zm-post-lay-c zm-single-post clearfix">
                                            <div class="zm-post-thumb f-left">
                                                <a href="{{ url('article/'.$article->short_url) }}">
                                                
                                                 @include('znews._partials.imgset', ['size' => '340'])
                                                
                                                
                                               </a>
                                            </div>
                                            <div class="zm-post-dis f-right">
                                                <div class="zm-post-header">
                                                    <div class="zm-category">
                                                     @foreach($article->categories as $category)
                                                    	@if(is_object($category))
                                                       	 	<a class="bg-cat-1 cat-btn" href="{{ url('/category/'.$category->short_url) }}">{{ $category->name }}</a>
                                                    	@endif
                                                    @endforeach</div>
                                                    <h2 class="zm-post-title"><a href="{{ url('article/'.$article->short_url) }}">{{ $article->title }}</a></h2>
                                                    <div class="zm-post-meta">
                                                        <ul>
                                                        
                                                            <li class="s-meta"><a href="{{ url('article/'.$article->short_url) }}" class="zm-date">{{ date("l, F d, Y", strtotime($article->published_at)) }} </a></li>
                                                        </ul>
                                                    </div>
                                                    <div class="zm-post-content">
                                                        <p>{{ $article->description }}</p>
                                                    </div>
                                                </div>
                                            </div>
                                        </article>
                                        <!-- Start single post layout C -->
                                        
                                       @endforeach
                                     @endif
                                      
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- End left side -->
                        <!-- Start Right sidebar -->
                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-4 sidebar-warp columns">
                            <div class="row">
                                <!-- Start Subscribe From -->
                                <div class="col-md-6 col-sm-12 col-xs-12 col-lg-12 xs-mt-40 sm-mt-50 md-mt-60">
                                    <aside class="subscribe-form bg-dark text-center sidebar">
                                        <h3 class="uppercase zm-post-title">Get Email Updates</h3>
                                        <p>Join our awesome subscribers and update yourself with our exclusive news.</p>
                                        @include('znews._partials.newsletter')
                                    </aside>
                                </div>
                                <!-- End Subscribe From -->
                                <aside class="zm-tagcloud-list col-xs-12 col-sm-6 col-md-6 col-lg-12 mt-60">
                                    <div class="row mb-40">
                                        <div class="col-md-12">
                                            <div class="section-title">
                                                <h2 class="h6 header-color inline-block uppercase">Tags</h2>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-md-12">
                                            <div class="zm-tagcloud">
                                            	@foreach($tags as $tag)
                                					<a href="{{ url('/tag/'.$tag->short_url) }}">{{ ucfirst($tag->name) }}</a>
												@endforeach
                                            </div>
                                        </div>
                                    </div>
                                </aside>
                                <!-- Start post layout E -->
                                <aside class="zm-post-lay-e-area col-xs-12 col-sm-6 col-md-6 col-lg-12 mt-60 hidden-md">
                                    <div class="row mb-40">
                                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                                            <div class="section-title">
                                                <h2 class="h6 header-color inline-block uppercase">Trending</h2>
                                            </div>
                                        </div>
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                                            <div class="zm-posts">
                                                <!-- Start single post layout E -->
                                                @if(isset($trending))
                                                   @foreach($trending as $article)
                                                    <!-- Start single post layout E -->
                                                    <article class="zm-post-lay-e zm-single-post clearfix">
                                                        <div class="zm-post-thumb f-left">
                                                            <a href="{{ url('article/'.$article->short_url) }}">
                                                            @include('znews._partials.imgset', ['size' => '250'])
                                                            </a>
                                                        </div>
                                                        <div class="zm-post-dis f-right">
                                                            <div class="zm-post-header">
                                                                <h2 class="zm-post-title"><a href="{{ url('article/'.$article->short_url) }}">{{ $article->title }}</a></h2>
                                                                <div class="zm-post-meta">
                                                                    <ul>
                                                                        <li class="s-meta"><a href="{{ url('article/'.$article->short_url) }}" class="zm-date">{{ date("l, F d, Y", strtotime($article->published_at)) }}</a></li>
                                                                    </ul>
                                                                </div>
                                                            </div>
                                                        </div>
                                                    </article>
                                                    <!-- Start single post layout E -->
                                                  @endforeach
                                               @endif
                                                <!-- Start single post layout E -->
                                                
                                            </div>
                                        </div>
                                    </div>
                                </aside>
                                <!-- Start post layout E -->
                            </div>
                        </div>
                        <!-- End Right sidebar -->
                    </div>
                    <!-- Start pagination area -->
                    <div class="row hidden-xs">
                        <div class="zm-pagination-wrap mt-70">
                            <div class="container">
                                <div class="row">
                                    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
                                            @if(isset($articles) && $articles->hasPages())
                                            	{{ $articles->links('vendor.pagination.bootstrap-4') }}
                                            @endif
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- End pagination area -->
                    <!-- Start Advertisement -->
                    <div class="advertisement">
                        <div class="row mt-40">
                            <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 text-center">
                                @if(isset($ad) && count($ad) >0 )
                                	{!! $ad->last()->ad !!}
                                @endif
                            </div>
                        </div>
                    </div>
                    <!-- End Advertisement -->
                </div>
            </div>
        </section>
        <!-- End page content -->
@endsection