Skip to content

Commit

Permalink
view frontend
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkHorseCorder committed Dec 29, 2022
1 parent 1bd0575 commit 45a8d90
Show file tree
Hide file tree
Showing 5 changed files with 275 additions and 0 deletions.
106 changes: 106 additions & 0 deletions project/resources/views/frontend/blog/blog_details.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
@extends('layouts.frontend')

@section('title')
@langg('Blog Details')
@endsection

@section('content')
<!-- Blog -->
<section class="blog-section pt-100 pb-100">
<div class="container">
<div class="row gy-5">
<div class="col-lg-8">
<div class="blog__item blog__item-details">
<div class="blog__item-img">
<img src="{{getPhoto($blog->photo)}}">
</div>
<div class="blog__item-cont">
<div class="blog__author mb-4 mt-3">
<div class="author w-auto">
<h6>by Admin</h6>
</div>
<a href="#0" class="text--base">{{dateFormat($blog->created_at,'d M Y')}}</a>
</div>
<h5 class="blog__item-content-title">
@lang($blog->title)
</h5>
<div class="blog__details">
<p>
@php
echo $blog->description;
@endphp
</p>
<div class="d-flex align-items-center flex-wrap">
<h6 class="m-0 me-2 align-items-center">Share Now</h6>
<ul class="social-icons social-icons-dark">
<li><a target="_blank" href="https://www.facebook.com/sharer/sharer.php?u={{urlencode(url()->current()) }}"><i class="fab fa-facebook-f"></i></a></li>

<li><a target="_blank" href="http://pinterest.com/pin/create/button/?url={{urlencode(url()->current()) }}&description={{ __($blog->title) }}&media={{ getPhoto($blog->photo) }}"><i class="fab fa-pinterest"></i></a></li>

<li><a target="_blank" href="https://twitter.com/intent/tweet?text={{ __($blog->title) }}&amp;url={{urlencode(url()->current()) }}"><i class="fab fa-twitter"></i></a></li>
</ul>
</div>
</div>
</div>
</div>
</div>
<div class="col-xl-4">
<aside class="blog-sidebar ps-xxl-5">
<div class="widget">
<div class="widget-header text-center">
<h5 class="m-0 text-white">@langg('Latest Blog Posts')</h5>
</div>
<div class="widget-body">
<ul class="latest-posts">
@foreach ($latests as $item)
<li>
<a href="{{route('blog.details',[$item->id,$item->slug])}}">
<div class="img">
<img src="{{getPhoto($item->photo)}}" alt="blog">
</div>
<div class="cont">
<h5 class="subtitle">@lang($item->title)</h5>
<span class="date">{{dateFormat($item->created_at,'d M Y')}}</span>
</div>
</a>
</li>

@endforeach

</ul>
</div>
</div>
<div class="widget">
<div class="widget-header text-center">
<h5 class="m-0 text-white">@langg('Category')</h5>
</div>
<div class="widget-body">
<ul class="archive-links">
@foreach ($categories as $item)
<li>
<a href="{{route('blogs',['category'=> $item->slug])}}">
<span>@lang($item->name)</span>
<span>({{$item->blogs_count}})</span>
</a>
</li>
@endforeach

</ul>
</div>
</div>

</aside>
</div>
</div>
</div>
</section>
<!-- Blog -->
@stop

@push('style')
<style>
.blog__details img{
width: 800px!important
}
</style>
@endpush
55 changes: 55 additions & 0 deletions project/resources/views/frontend/blog/blogs.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
@extends('layouts.frontend')

@section('title')
@langg('Blogs')
@endsection

@section('content')

<section class="blog-section pt-100 pb-100 bg--section">
<div class="container">
<div class="row g-4 g-lg-3 g-xl-4 justify-content-center">
@forelse ($blogs as $item)
<div class="col-lg-4 col-md-6 col-sm-10">
<div class="blog__item">
<a href="{{route('blog.details',[$item->id,$item->slug])}}" class="blog-link">&nbsp;</a>
<div class="blog__item-img">
<img src="{{getPhoto($item->photo)}}" alt="blog">
<span class="date">
<span>{{dateFormat($item->created_at,'M')}}</span>
<span>{{dateFormat($item->created_at,'d')}}</span>
</span>
</div>
<div class="blog__item-cont">
<h5 class="blog__item-cont-title line--2">
{{Str::limit($item->title,30)}}
</h5>
<p class="line--3">
{{Str::limit(strip_tags($item->description),130)}}
</p>
<div class="blog__author">
<div class="author">

<h6>By Admin</h6>
</div>
<span class="read--more">@langg('Read More')</span>
</div>
</div>
</div>
</div>
@empty
<div class="col-lg-4 col-md-6 col-sm-10">
<div class="blog__item">
<h5>@langg('No blogs found!')</h5>
</div>
</div>
@endforelse
@if ($blogs->hasPages())
<div class="col-lg-12 col-md-12 col-sm-12">
{{$blogs->links()}}
</div>
@endif
</div>
</div>
</section>
@endsection
26 changes: 26 additions & 0 deletions project/resources/views/frontend/partials/cookie.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<div class="container cookie_content">
<div class="js-cookie-consent cookie-consent">
<span class="cookie-consent__message m-2">
@lang(@$gs->cookie->cookie_text)
</span>

<div class="d-flex">
<button class="js-cookie-consent-agree cookie-consent__agree cmn--btn m-2">
@lang(@$gs->cookie->button_text)
</button>
<button class="btn-outline-warning text-white btn m-2 deny">
@lang('Don\'t Allow')
</button>
</div>
</div>
</div>

<script>
'use strict';
$('.deny').on('click',function () {
$(document).find('.cookie-section').addClass('d-none')
$.get("{{route('cookie.deny')}}", {data:''},
function (res) {},
);
})
</script>
54 changes: 54 additions & 0 deletions project/resources/views/frontend/sections/blog.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
<!-- Blog -->
@php
$blogs = App\Models\Blog::where('status',1)->whereHas('category',function($q){
$q->where('status',1);
})->latest()->inRandomOrder()->take(3)->get();
@endphp

@if ($blogs->count() > 0)

<section class="blog-section pt-100 pb-100 bg--section">
<div class="container">
<div class="section-header text-center">
<h6 class="section-header__subtitle">@lang(@$section->content->title)</h6>
<h3 class="section-header__title">@lang(@$section->content->heading)</h3>
<p>
@lang(@$section->content->sub_heading)
</p>
</div>
<div class="row g-4 g-lg-3 g-xl-4 justify-content-center">
@foreach ($blogs as $item)
<div class="col-lg-4 col-md-6 col-sm-10">
<div class="blog__item">
<a href="{{route('blog.details',[$item->id,$item->slug])}}" class="blog-link">&nbsp;</a>
<div class="blog__item-img">
<img src="{{getPhoto($item->photo)}}" alt="blog">
<span class="date">
<span>{{dateFormat($item->created_at,'M')}}</span>
<span>{{dateFormat($item->created_at,'d')}}</span>
</span>
</div>
<div class="blog__item-cont">
<h5 class="blog__item-cont-title line--2">
{{Str::limit($item->title,30)}}
</h5>
<p class="line--3">
{{Str::limit(strip_tags($item->description),130)}}
</p>
<div class="blog__author">
<div class="author">

<h6>By Admin</h6>
</div>
<span class="read--more">@langg('Read More')</span>
</div>
</div>
</div>
</div>
@endforeach

</div>
</div>
</section>

@endif
34 changes: 34 additions & 0 deletions project/resources/views/frontend/sections/feature.blade.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<section class="shield-section bg--section pt-100 pb-100">
<div class="container">
<div class="row gy-5 justify-content-evenly align-items-center">
<div class="col-lg-6">
<div class="shield-content">
<h2 class="title">
@lang(@$section->content->heading)
</h2>
@if (!empty($section->sub_content))
<ul class="security-feature-list">
@foreach ($section->sub_content as $item)
<li>
@lang($item->feature)
</li>
@endforeach
</ul>
@endif
<div class="mt-4 pt-3">
<a href="{{url(@$section->content->btn_url ?? '/')}}" class="cmn--btn">@lang(@$section->content->btn_name) <span class="round-effect">
<i class="fas fa-long-arrow-alt-right"></i>
</span></a>
</div>
</div>
</div>
<div class="col-lg-5 col-xl-4">
<div class="shield-area">
<h4 class="title text--white">
@lang(@$section->content->feature_text)
</h4>
</div>
</div>
</div>
</div>
</section>

0 comments on commit 45a8d90

Please sign in to comment.