File size: 3.42Kb
@extends('layout')
@section('title')
{{ $blog->title }}
@stop
@section('keywords')
{{ $blog->tags }}
@stop
@section('description')
{{ stripString($blog->text) }}
@stop
@section('content')
<h1>{{ $blog->title }} <small>(Оценка: {!! formatNum($blog->rating) !!})</small></h1>
<div class="blog-wrapp">
<nav>
<ol class="breadcrumb">
<li class="breadcrumb-item"><a href="/"><i class="fas fa-home"></i></a></li>
<li class="breadcrumb-item"><a href="/blogs">Блоги</a></li>
@if ($blog->category->parent->id)
<li class="breadcrumb-item"><a href="/blogs/{{ $blog->category->parent->id }}">{{ $blog->category->parent->name }}</a></li>
@endif
<li class="breadcrumb-item"><a href="/blogs/{{ $blog->category_id }}">{{ $blog->category->name }}</a></li>
<li class="breadcrumb-item active">{{ $blog->title }}</li>
</ol>
</nav>
<div class="main-new-link">
<div class="l-block">
<button class="m">Меню блога <i class="fa fa-caret-down" aria-hidden="true"></i></button>
<ul class="main-link">
<li><a href="/articles/print/{{ $blog->id }}">Печать</a></li>
<li><a href="/articles/rss/{{ $blog->id }}">RSS-лента</a></li>
@if (isAdmin())
<li><a href="/admin/articles/edit/{{ $blog->id }}">Редактировать</a></li>
<li><a href="/admin/articles/move/{{ $blog->id }}">Перенести</a></li>
<li><a href="/admin/articles/delete/{{ $blog->id }}?token={{ $_SESSION['token'] }}" onclick="return confirm('Вы действительно хотите удалить данную статью?')">Удалить</a></li>
@endif
</ul>
</div>
<div class="l-block">
@if ($blog->user->id == getUser('id'))
<a class="bt" href="/articles/edit/{{ $blog->id }}">Изменить</a>
@endif
</div>
</div>
<div class="blog-view">
<div class="blog-view-text">
{!! $blog->text !!}
</div>
@if ($page->total > 1)
{!! pagination($page) !!}
@endif
<div class="view-author">
<span>Автор статьи: {!! $blog->user->getProfile() !!} <br> ({{ dateFixed($blog->created_at) }})</span>
<span class="count"><i class="fa fa-eye"></i> {{ $blog->visits }}</span>
</div>
<div class="view-tags">
<span><i class="fa fa-tag"></i></span> {!! $tags !!}
</div>
<div class="rating-comment">
<div class="js-rating">
@unless (getUser('id') == $blog->user_id)
<a class="post-rating-down<?= $blog->vote == '-' ? ' active' : '' ?>" href="#" onclick="return changeRating(this);" data-id="{{ $blog->id }}" data-type="{{ App\Models\Blog::class }}" data-vote="-" data-token="{{ $_SESSION['token'] }}"><i class="fa fa-thumbs-down"></i></a>
@endunless
<span>{!! formatNum($blog->rating) !!}</span>
@unless (getUser('id') == $blog->user_id)
<a class="post-rating-up<?= $blog->vote == '+' ? ' active' : '' ?>" href="#" onclick="return changeRating(this);" data-id="{{ $blog->id }}" data-type="{{ App\Models\Blog::class }}" data-vote="+" data-token="{{ $_SESSION['token'] }}"><i class="fa fa-thumbs-up"></i></a>
@endunless
</div>
<div class="comment-view-blog">
<a href="/articles/comments/{{ $blog->id }}"><i class="material-icons">insert_comment</i> {{ $blog->count_comments }}</a>
</div>
</div>
</div>
</div>
@stop