FEATURE: hide comments when article does not allow them
This commit is contained in:
@@ -101,6 +101,11 @@ class ArticleList extends Handler
|
|||||||
$articles = $articles->orderBy('created_at', 'DESC')
|
$articles = $articles->orderBy('created_at', 'DESC')
|
||||||
->paginate(20);
|
->paginate(20);
|
||||||
|
|
||||||
|
// decode module settings
|
||||||
|
foreach ($articles as $article) {
|
||||||
|
$article->module_settings = json_decode($article->module_settings);
|
||||||
|
}
|
||||||
|
|
||||||
return Controller::VisitorsView($content->template, [
|
return Controller::VisitorsView($content->template, [
|
||||||
'page' => $content,
|
'page' => $content,
|
||||||
'articles' => $articles,
|
'articles' => $articles,
|
||||||
|
|||||||
+17
-45
@@ -1844,28 +1844,6 @@ h6 {
|
|||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 40em) {
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
}
|
|
||||||
h3 {
|
|
||||||
font-size: 1.9375rem;
|
|
||||||
}
|
|
||||||
h4 {
|
|
||||||
font-size: 1.5625rem;
|
|
||||||
}
|
|
||||||
h5 {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
}
|
|
||||||
h6 {
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
a:hover,a:focus {
|
a:hover,a:focus {
|
||||||
color: #779000;
|
color: #779000;
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
@@ -7689,29 +7667,6 @@ article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,secti
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@media screen and (min-width: 40em) {
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
}
|
|
||||||
h3 {
|
|
||||||
font-size: 1.9375rem;
|
|
||||||
}
|
|
||||||
h4 {
|
|
||||||
font-size: 1.5625rem;
|
|
||||||
}
|
|
||||||
h5 {
|
|
||||||
font-size: 1.25rem;
|
|
||||||
}
|
|
||||||
h6 {
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
@media screen and (min-width: 40em) {
|
@media screen and (min-width: 40em) {
|
||||||
|
|
||||||
.medium-text-left {
|
.medium-text-left {
|
||||||
@@ -9305,3 +9260,20 @@ article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,secti
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
padding-right: 15px;
|
padding-right: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
article h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
article h2 {
|
||||||
|
margin-top: 20px;
|
||||||
|
font-size: 1.5em;
|
||||||
|
}
|
||||||
|
|
||||||
|
article h3 {
|
||||||
|
margin-top: 20px;
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.comment aside {
|
||||||
|
line-height: 1;
|
||||||
|
}
|
||||||
@@ -17,22 +17,26 @@
|
|||||||
<small>{{$page->author->name}}</small>
|
<small>{{$page->author->name}}</small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@if(isset($page->module_settings->allowComments) && $page->module_settings->allowComments != 0)
|
||||||
<div class="m-t-25 text-center">
|
<div class="m-t-25 text-center">
|
||||||
<a href="#comments"><i class="fa fa-comments"></i> {{$page->comments->count()}}</a>
|
<a href="#comments"><i class="fa fa-comments"></i> {{$page->comments->count()}}</a>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
</aside>
|
</aside>
|
||||||
<div class="column large-11">
|
<div class="column large-11">
|
||||||
|
<article class="text-justify">
|
||||||
<h1>{{$page->title}}</h1>
|
<h1>{{$page->title}}</h1>
|
||||||
|
|
||||||
<article class="text-justify">
|
|
||||||
{!! $page->content !!}
|
{!! $page->content !!}
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@if(isset($page->module_settings->allowComments) && $page->module_settings->allowComments != 0)
|
||||||
<div class="row m-t-50">
|
<div class="row m-t-50">
|
||||||
<a name="comments"></a>
|
<a name="comments"></a>
|
||||||
|
|
||||||
<h3>Komentáře</h3>
|
|
||||||
|
<h2>Komentáře</h2>
|
||||||
@foreach($page->comments as $comment)
|
@foreach($page->comments as $comment)
|
||||||
|
|
||||||
<div class="row comment">
|
<div class="row comment">
|
||||||
@@ -96,7 +100,7 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@endif
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@endsection
|
@endsection
|
||||||
@@ -37,11 +37,13 @@
|
|||||||
<a href="{{route('page.content', ['url' => $article->url])}}">více</a>
|
<a href="{{route('page.content', ['url' => $article->url])}}">více</a>
|
||||||
</article>
|
</article>
|
||||||
|
|
||||||
|
@if(isset($article->module_settings->allowComments) && $article->module_settings->allowComments != 0)
|
||||||
<footer class="text-right">
|
<footer class="text-right">
|
||||||
<a href="{{route('page.content', ['url' => $article->url])}}#comments">
|
<a href="{{route('page.content', ['url' => $article->url])}}#comments">
|
||||||
<i class="fa fa-fw fa-comments"></i> {{$article->comments->count()}}
|
<i class="fa fa-fw fa-comments"></i> {{$article->comments->count()}}
|
||||||
</a>
|
</a>
|
||||||
</footer>
|
</footer>
|
||||||
|
@endif
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user