source: resources/views/blog/index.blade.php@ 0c07a90

Last change on this file since 0c07a90 was 0924b6c, checked in by Özkan İliyaz <iliyaz_96@…>, 4 years ago

initial commit

  • Property mode set to 100644
File size: 3.0 KB
RevLine 
[0924b6c]1@extends('layouts.blog')
2@section('title', 'Technoblog | Home')
3@section('blog_content')
4
5 <div style="height: 25px;"></div>
6
7 <!-- Main Content Wrapper -->
8 <div class="mainContent pb-5">
9
10 <div class="container-fluid">
11
12 <div class="row">
13 <!-- Welcome Slider -->
14 <div class="col-md-12">
15
16 <div class="welcomeSlider swiper-container">
17
18 <div class="swiper-wrapper">
19
20 @foreach ($latestPosts as $post)
21
22 <div class="swiper-slide">
23 <div class="slider-post-wrapper">
24 <p class="postCategory" style="background: {{ $post->category->color }};">{{ $post->category->name }}</p><img src="{{ asset("uploads/" . $post->image_link) }}">
25 <div class="postOverlay">
26 <p><a href="{{ route("blog.post", ["category" => strtolower($post->category->name), "slug" => $post->slug]) }}">{{ $post->title }} </a></p>
27 <span>
28 <i class="fa fa-clock-o" aria-hidden="true"></i> {{ $post->ago() }}
29 &nbsp;&nbsp;&nbsp;&nbsp;
30 <i class="fa fa-heart-o" aria-hidden="true"></i> {{ $post->total_likes }} Likes
31 &nbsp;&nbsp;
32 <i class="fa fa-comment-o" aria-hidden="true"></i> {{ $post->comment->count() }} comments
33 </span>
34 </div>
35 </div>
36 </div>
37
38 @endforeach
39
40 </div>
41
42 <div class="swiper-pagination"></div>
43 <div class="swiper-button-prev"></div>
44 <div class="swiper-button-next"></div>
45
46 </div>
47
48 </div>
49
50 <!-- Videos -->
51 @foreach ($blogCategories as $category)
52
53 <style>
54 .default_sectionTitle_{{ strtolower($category->name) }}:before,
55 .default_sectionTitle_{{ strtolower($category->name) }} span,
56 .default_sectionTitle_{{ strtolower($category->name) }} a {
57 background: {{ $category->color }};
58 color: {{ $category->color }};
59 }
60 </style>
61
62 <header class="default_sectionTitle default_sectionTitle_{{ strtolower($category->name) }}">
63 <span>{{ $category->name }}</span>
64 <a class="elemWithTooltip" data-tooltip-info="right-Explore More" href="{{ route("blog.category", ["category" => strtolower($category->name)]) }}">More</a>
65 </header>
66
67 @foreach ($posts as $post)
68
69 @if($post->category->name == $category->name)
70
71 <div class="col-md-4 post-item">
72 <div class="card">
73 <div class="card-img-top-wrapper">
74 <img class="card-img-top" src="{{ asset("uploads/" . $post->image_link) }}" alt="Card image cap">
75 </div>
76 <div class="card-body">
77 <h5 class="card-title"><a href="{{ route("blog.post", ["category" => strtolower($post->category->name), "slug" => $post->slug]) }}" class="blogSectionCardLink">{{ $post->title }}</a></h5>
78 <p class="card-text">{!! str_limit($post->content, 90) !!}</p>
79 </div>
80 <div class="card-footer">
81 <small class="text-muted">{{ $post->ago() }}</small>
82 </div>
83 </div>
84 </div>
85
86 @endif
87
88 @endforeach
89
90 @endforeach
91
92 </div>
93
94 </div>
95
96 </div>
97
98@endsection
Note: See TracBrowser for help on using the repository browser.