관리-도구
편집 파일: blogs_old.blade.php
@extends('theme.saintsaccessories.websiteEcom') @section('content') <style> .mybanner { width: 100%; min-height: 40vh; position: relative; display: flex; align-items: center; justify-content: center; padding: 4rem 0; } .BlogS--Section { background:white; } .BlogS--Section .blog-card__content p{color:#757575;} .blog-card__content ul{display:flex;justify-content:space-between; align-items:center;} .blog-card__content ul .subtitle { border: 1px solid lightgrey; padding: 0.75rem 2rem; font-size: 16px; } .input-field input { width: 100%; display: block; font-size: 14px; background: #fff; border: 1px solid #00000020; resize: none; padding: 0.75rem; position: relative; } .blogs-sidebar-search i[class^="bx"] { vertical-align: middle; position: absolute; right: 8%; top: 20%; transition:all 0.3s ease; } .blogs-sidebar-search i[class^="bx"]:hover {transform:scale(1.11);} </style> <!-- Banner start --> <div class="mybanner"> <div class="banner__bg"> <img src="{{ asset('public/theme/saintsaccessories/images/banner-bg-1.png') }}" alt="image" class="imgFluid"> </div> <div class="container"> <div class="row"> <div class="col-12"> <div class="section-content section-content--light banner__content"> <div class="heading">Blogs</div> </div> </div> </div> </div> </div> <!-- Banner end --> <!-- Blogs --> <div class="container py-5 my-5 wow zoomIn"> <div class="row"> <div class="col-12"> <div class="section-content"> <div class="heading">Latest Articles</div> </div> </div> @php use App\Http\Controllers\BlogController; $blogContr = new BlogController(); @endphp <div class="col-12 col-lg-9"> <div class="row"> @foreach($blogContr->getLatestBlogs() as $latestBlog) <div class="col-12 col-lg-6"> <article class="blog-card"> <a href="#" class="blog-card__img"> @foreach(json_decode($latestBlog->image) as $img) @if($loop->iteration == 1) <img src="{{asset('/public/theme/default/images/'.$img) }}" alt="image" class="imgFluid"> @endif @endforeach </a> <div class="blog-card__content"> <div class="blog-card__content-top"> <div class="title">{!! $latestBlog->title !!}</div> <a href="#" class="comment">0</a> </div> <ul class="categories"> <li> <a href="#">latest</a>, <a href="#">{{ $latestBlog->category->name ?? 'Uncategorized' }}</a> </li> <li>{{ $latestBlog->created_at->format('Y-m-d') }}</li> </ul> <p class="desc"> @php $shortContent = substr($latestBlog->content,0,150); @endphp {!! $shortContent !!} </p> </div> <div class="blog-card__bottom"> <a href="/blog/{{$latestBlog->id}}"> {!! $latestBlog->button_text !!} </a> </div> </article> </div> @endforeach </div> </div> <div class="col-12 col-lg-3"> <div class="row blogs-search-side-bar"> <div class="col-12"> <div class="input-field blogs-sidebar-search d-none"> <input type="text" placeholder="search" > <a href="#" data-toggle-btn="searchbar" placeholder="Search"><i class="bx bx-search bx-sm"></i></a> </div> </div> @foreach($blogContr->getBlogs() as $blog) <div class="col-12"> <article class="blog-card"> <div class="blog-card__content"> <div class="blog-card__content-top"> <div class="title">{!! $blog->title !!}</div> <a href="#" class="comment">0</a> </div> <p class="desc"> @php $shortContent = substr($blog->content,0,150); @endphp {!! $shortContent !!} </p> </div> <div class="blog-card__bottom"> <a href="/blog/{{$blog->id}}"> {!! $blog->button_text !!} </a> </div> </article> </div> @endforeach </div> </div> <div class="col-12"> <div class="section-content pt-5"> <div class="heading">Other Articles</div> </div> </div> @foreach($blogContr->getRandomBlogs() as $randomBlog) <div class="col-12 col-lg-4"> <article class="blog-card"> <a href="#" class="blog-card__img"> @foreach(json_decode($randomBlog->image) as $img) @if($loop->iteration == 1) <img src="{{asset('/public/theme/default/images/'.$img) }}" alt="image" class="imgFluid"> @endif @endforeach </a> <div class="blog-card__content"> <div class="blog-card__content-top"> <div class="title">{!! $randomBlog->title !!}</div> <a href="#" class="comment">0</a> </div> <ul class="categories"> <li> <a href="#"></a> <a href="#">{{ $randomBlog->category->name ?? 'Uncategorized' }}</a> </li> <li>{{ $randomBlog->created_at->format('Y-m-d') }}</li> </ul> <p class="desc"> @php $shortContent = substr($randomBlog->content,0,150); @endphp {!! $shortContent !!} </p> </div> <div class="blog-card__bottom"> <a href="/blog/{{$randomBlog->id}}"> {!! $randomBlog->button_text !!} </a> </div> </article> </div> @endforeach </div> </div> </div> @endsection @section('js-script') <script src="{{ asset('public/theme/default/js/cart.js?v=1.1') }}"></script> @endsection