diff options
Diffstat (limited to 'layouts/partials/post/actions.html')
-rw-r--r-- | layouts/partials/post/actions.html | 151 |
1 files changed, 76 insertions, 75 deletions
diff --git a/layouts/partials/post/actions.html b/layouts/partials/post/actions.html index 4bc1d27..75accc7 100644 --- a/layouts/partials/post/actions.html +++ b/layouts/partials/post/actions.html @@ -1,89 +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="{{ i18n "global.share_on" }} {{ .name }}" aria-label="{{ i18n "global.share_on" }} {{ .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" }}"> - {{ else }} - <a class="post-action-btn btn btn--default" href="#" aria-label="{{ i18n "post.back_to_top" }}"> - {{ end }} - <i class="fa fa-list" aria-hidden="true"></i> + </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 }} |