lists.blade.php 3.0 KB
@extends('v2/base')

@section('content')

    <!-- sys_sub_head -->
    <section class="sys_sub_head">
        <div class="page-title-bar">
            <h2 class="title">Blog</h2>
        </div>
    </section>

    <!-- web_main start -->
    <section class="web_main page_main">
        <div class="layout">
            <div class="blog_list">
                <ul class="blog-list-items">
                    @foreach($lists['data']??[] as $list)
                    <li class="blog-item">
                        <h2 class="item-title">
                            <a href="/blog/{{$list['blog_id']}}">{{$list['blog_title']}}</a>
                        </h2>
                        <div class="item-author">
                            <span class="time">{{date('F:d,Y',strtotime($list['blog_push_time']))}}</span>|
                            <span class="author">BY {{$list['blog_push_author']}}</span>
                        </div>
                        @if($list['blog_thumbnail'])
                        <div class="item-img flex_row">
                            <a href="/blog/{{$list['blog_id']}}">
                                <img src="{{$list['blog_thumbnail']}}" alt="{{$list['blog_title']}}">
                            </a>
                        </div>
                        @endif
                        <div class="item-text">
                            {!! mb_substr(strip_tags($list['body']['blog_body']), 0, 400) . (strlen(strip_tags($list['body']['blog_body'])) > 400 ? '......' : '') !!}
                        </div>
                        <div class="item-els flex_row">
                            <a href="/blog/{{$list['blog_id']}}" class="btn-learnmore item-more">read more</a>
                            <div class="item-tag">
                                <label>tags:</label>
                                <em>{{$list['blog_seo_keywords']}}</em>
                            </div>
                        </div>
                    </li>
                    @endforeach
                </ul>
                <div class="page_bar">
                    <div class="pages">
                        @foreach($lists['links']??[] as $p)
                            @if($p['url'])
                            <a href="?page={{$p['page']}}" class="@if($p['active']) current @endif page-fy">{!! $p['label'] !!}</a>
                            @else
                                <span class="page-fy" style="cursor: no-drop;">{!! $p['label'] !!}</span>
                            @endif
                        @endforeach
{{--                        <a href='' class='page-fy' id="first_page">&lt;&lt;</a>--}}
{{--                        <a href='' class='page-fy'> &lt; Prev </a>--}}
{{--                        <a href="" class='page-fy'> Next &gt; </a>--}}
{{--                        <a href='' class='page-fy'>&gt;&gt;</a>--}}
{{--                        <span class='current2' id="page_total">Page 1 / 2</span>--}}
                    </div>
                </div>
            </div>

        </div>


    </section>
    <!--// web_main end -->


@endsection