Skip to content

Commit

Permalink
Merge pull request #124 from radio-t/105-prep-pagination
Browse files Browse the repository at this point in the history
Pagination on prep post
  • Loading branch information
webkonstantin authored Jan 19, 2020
2 parents 31b7bfc + 1dc824c commit a2c2ba7
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
5 changes: 4 additions & 1 deletion hugo/layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,14 @@ <h1 class="number-title">{{ partial "number-title" . }}</h1>
<h1 class="number-title">{{ partial "number-title" . }}</h1>
<div class="post-time">{{ partial "post-time" . }}</div>
</div>
<div class="col-md">{{ partial "comments" . }}</div>
<div class="col-md">{{ partial "comments-policy" }}</div>
<div class="col-md-2">{{ partial "share" . }}</div>
</div>
{{ partial "post-footer" . }}
</div>
<div class="hide-comment-policy">
{{ partial "comments-block" }}
</div>
{{ else }}
<div class="container-fluid">
<div class="row">
Expand Down
5 changes: 4 additions & 1 deletion hugo/layouts/partials/comments-block.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
<div class="post-comments py-5 border-top">
<div class="container-fluid">
<div class="row justify-content-center">
<div class="col-md-8">{{ partial "comments" }}</div>
<div class="col-md-8">
{{ partial "comments-policy" }}
{{ partial "comments" }}
</div>
</div>
</div>
</div>
8 changes: 8 additions & 0 deletions hugo/layouts/partials/comments-policy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<p class="comment-policy">Тут у нас свобода слова, но за хамство можем забанить.
<br>Пожалуйста, прочитайте наши
<a
href="/comment-policy"
rel="noopener noreferrer"
class="policy-link">правила</a>,
прежде чем комментировать.
</p>
13 changes: 0 additions & 13 deletions hugo/layouts/partials/comments.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,3 @@
<p class="comment-policy">Тут у нас свобода слова, но за хамство можем забанить.
<br>Пожалуйста, прочитайте наши
<a
href="/comment-policy"
rel="noopener noreferrer"
class="policy-link">правила</a>,
прежде чем комментировать.
</p>

<div class="row justify-content-between header-pagination">
{{ partial "pagination" . }}
</div>

<div id="comments" data-controller="comments-embed">
<noscript>Please enable JavaScript to view the comments powered by Remark42.</noscript>
</div>
7 changes: 3 additions & 4 deletions hugo/src/scss/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -734,6 +734,9 @@ $ripple-scale-out: 3.4;
color: $text-muted;
font-size: $small-font-size;
border-left: 2px solid $gray-500;
.hide-comment-policy & {
display: none;
}
}
.page-cover-image {
display: block;
Expand Down Expand Up @@ -810,7 +813,3 @@ $ripple-scale-out: 3.4;
.switch-theme-btn {
border-width: 0 !important;
}

.header-pagination {
margin-bottom: 1em;
}

0 comments on commit a2c2ba7

Please sign in to comment.