Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/kakawait/hugo-tranquilpeak-theme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThibaud Lepretre <thibaud.lepretre@gmail.com>2021-09-08 12:42:08 +0300
committerThibaud Lepretre <thibaud.lepretre@gmail.com>2021-09-08 12:42:08 +0300
commit185f536dd949516571836b7de165a18a833c558e (patch)
tree5b08a3d2dde9b853e2b14db72d4c885c545ebd2e
parentdb1b8d77b793ba2910790e0fa2cb9c1a0618b3e0 (diff)
Put if condition before div
fixes #413
-rw-r--r--layouts/partials/post/actions.html152
1 files changed, 76 insertions, 76 deletions
diff --git a/layouts/partials/post/actions.html b/layouts/partials/post/actions.html
index 82b4844..75accc7 100644
--- a/layouts/partials/post/actions.html
+++ b/layouts/partials/post/actions.html
@@ -1,90 +1,90 @@
+{{ if not (eq .Params.showActions false) }}
<div class="post-actions-wrap">
- {{ if not (eq .Params.showActions false) }}
- <nav {{ if eq .Params.showPagination false }}style="visibility: hidden"{{ end }}>
- <ul class="post-actions post-action-nav">
- {{ if .Site.Params.swapPaginator }}
- <li class="post-action">
- {{ with .PrevInSection }}
- <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}" aria-label="{{ i18n "pagination.previous" }}: {{ .Title }}">
- {{ else }}
- <a class="post-action-btn btn btn--disabled">
- {{ end }}
- <i class="fa fa-angle-left"></i>
- <span class="hide-xs hide-sm text-small icon-ml">{{ i18n "pagination.previous" }}</span>
- </a>
- </li>
- <li class="post-action">
- {{ with .NextInSection }}
- <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}" aria-label="{{ i18n "pagination.next" }}: {{ .Title }}">
- {{ else }}
- <a class="post-action-btn btn btn--disabled">
- {{ end }}
- <span class="hide-xs hide-sm text-small icon-mr">{{ i18n "pagination.next" }}</span>
- <i class="fa fa-angle-right"></i>
- </a>
- </li>
+ <nav {{ if eq .Params.showPagination false }}style="visibility: hidden"{{ end }}>
+ <ul class="post-actions post-action-nav">
+ {{ if .Site.Params.swapPaginator }}
+ <li class="post-action">
+ {{ with .PrevInSection }}
+ <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}" aria-label="{{ i18n "pagination.previous" }}: {{ .Title }}">
{{ else }}
- <li class="post-action">
- {{ with .NextInSection }}
- <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}" aria-label="{{ i18n "pagination.next" }}: {{ .Title }}">
- {{ else }}
- <a class="post-action-btn btn btn--disabled">
- {{ end }}
- <i class="fa fa-angle-left"></i>
- <span class="hide-xs hide-sm text-small icon-ml">{{ i18n "pagination.next" }}</span>
- </a>
- </li>
- <li class="post-action">
- {{ with .PrevInSection }}
- <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}" aria-label="{{ i18n "pagination.previous" }}: {{ .Title }}">
- {{ else }}
- <a class="post-action-btn btn btn--disabled">
- {{ end }}
- <span class="hide-xs hide-sm text-small icon-mr">{{ i18n "pagination.previous" }}</span>
- <i class="fa fa-angle-right"></i>
- </a>
- </li>
+ <a class="post-action-btn btn btn--disabled">
{{ end }}
- </ul>
- </nav>
- <ul class="post-actions post-action-share" >
- {{ if (not (eq .Params.showSocial false)) }}
- <li class="post-action hide-lg hide-md hide-sm">
- <a class="post-action-btn btn btn--default btn-open-shareoptions" href="#btn-open-shareoptions" aria-label="{{ i18n "post.share" }}">
- <i class="fa fa-share-alt" aria-hidden="true"></i>
- </a>
+ <i class="fa fa-angle-left"></i>
+ <span class="hide-xs hide-sm text-small icon-ml">{{ i18n "pagination.previous" }}</span>
+ </a>
</li>
- {{ range .Site.Params.sharingOptions }}
- <li class="post-action hide-xs">
- <a class="post-action-btn btn btn--default" target="new" href="{{ printf .url $.Permalink }}" title="{{ replace (i18n "global.share_on") "%s" .name }}" aria-label="{{ replace (i18n "global.share_on") "%s" .name }}">
- <i class="{{ .icon }}" aria-hidden="true"></i>
+ <li class="post-action">
+ {{ with .NextInSection }}
+ <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}" aria-label="{{ i18n "pagination.next" }}: {{ .Title }}">
+ {{ else }}
+ <a class="post-action-btn btn btn--disabled">
+ {{ end }}
+ <span class="hide-xs hide-sm text-small icon-mr">{{ i18n "pagination.next" }}</span>
+ <i class="fa fa-angle-right"></i>
</a>
- </li>
- {{ end }}
- {{ end }}
- {{ if and (and (.Site.Params.comment.disqus.enable) (not (.Site.Config.Privacy.Disqus.Disable))) .Site.DisqusShortname }}
+ </li>
+ {{ else }}
<li class="post-action">
- <a class="post-action-btn btn btn--default" href="#disqus_thread" aria-label="{{ i18n "post.comment" }}">
- <i class="far fa-comment"></i>
- </a>
+ {{ with .NextInSection }}
+ <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}" aria-label="{{ i18n "pagination.next" }}: {{ .Title }}">
+ {{ else }}
+ <a class="post-action-btn btn btn--disabled">
+ {{ end }}
+ <i class="fa fa-angle-left"></i>
+ <span class="hide-xs hide-sm text-small icon-ml">{{ i18n "pagination.next" }}</span>
+ </a>
</li>
- {{ else if .Site.Params.comment.gitalk.enable }}
<li class="post-action">
- <a class="post-action-btn btn btn--default" href="#gitalk" aria-label="{{ i18n "post.comment" }}">
- <i class="fa fa-comment"></i>
- </a>
+ {{ with .PrevInSection }}
+ <a class="post-action-btn btn btn--default tooltip--top" href="{{ .RelPermalink }}" data-tooltip="{{ .Title }}" aria-label="{{ i18n "pagination.previous" }}: {{ .Title }}">
+ {{ else }}
+ <a class="post-action-btn btn btn--disabled">
+ {{ end }}
+ <span class="hide-xs hide-sm text-small icon-mr">{{ i18n "pagination.previous" }}</span>
+ <i class="fa fa-angle-right"></i>
+ </a>
</li>
{{ end }}
- <li class="post-action">
- {{ if findRE "<!--\\s*[t|T][o|O][c|C]\\s*-->" .Content }}
- <a class="post-action-btn btn btn--default" href="#table-of-contents" aria-label="{{ i18n "post.toc" }}">
- <i class="fa fa-list" aria-hidden="true"></i>
- {{ else }}
- <a class="post-action-btn btn btn--default" href="#top" aria-label="{{ i18n "post.back_to_top" }}">
- <i class="fa fa-arrow-up" aria-hidden="true"></i>
- {{ end }}
+ </ul>
+ </nav>
+<ul class="post-actions post-action-share" >
+ {{ if (not (eq .Params.showSocial false)) }}
+ <li class="post-action hide-lg hide-md hide-sm">
+ <a class="post-action-btn btn btn--default btn-open-shareoptions" href="#btn-open-shareoptions" aria-label="{{ i18n "post.share" }}">
+ <i class="fa fa-share-alt" aria-hidden="true"></i>
+ </a>
+ </li>
+ {{ range .Site.Params.sharingOptions }}
+ <li class="post-action hide-xs">
+ <a class="post-action-btn btn btn--default" target="new" href="{{ printf .url $.Permalink }}" title="{{ replace (i18n "global.share_on") "%s" .name }}" aria-label="{{ replace (i18n "global.share_on") "%s" .name }}">
+ <i class="{{ .icon }}" aria-hidden="true"></i>
</a>
</li>
- </ul>
+ {{ end }}
+ {{ end }}
+ {{ if and (and (.Site.Params.comment.disqus.enable) (not (.Site.Config.Privacy.Disqus.Disable))) .Site.DisqusShortname }}
+ <li class="post-action">
+ <a class="post-action-btn btn btn--default" href="#disqus_thread" aria-label="{{ i18n "post.comment" }}">
+ <i class="far fa-comment"></i>
+ </a>
+ </li>
+ {{ else if .Site.Params.comment.gitalk.enable }}
+ <li class="post-action">
+ <a class="post-action-btn btn btn--default" href="#gitalk" aria-label="{{ i18n "post.comment" }}">
+ <i class="fa fa-comment"></i>
+ </a>
+ </li>
{{ end }}
+ <li class="post-action">
+ {{ if findRE "<!--\\s*[t|T][o|O][c|C]\\s*-->" .Content }}
+ <a class="post-action-btn btn btn--default" href="#table-of-contents" aria-label="{{ i18n "post.toc" }}">
+ <i class="fa fa-list" aria-hidden="true"></i>
+ {{ else }}
+ <a class="post-action-btn btn btn--default" href="#top" aria-label="{{ i18n "post.back_to_top" }}">
+ <i class="fa fa-arrow-up" aria-hidden="true"></i>
+ {{ end }}
+ </a>
+ </li>
+</ul>
</div>
+{{ end }}