Skip to content

Commit

Permalink
load pagination css only pagination used
Browse files Browse the repository at this point in the history
  • Loading branch information
HidegonSan committed Nov 26, 2023
1 parent c7657e2 commit f7a2e3e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 1 deletion.
File renamed without changes.
2 changes: 1 addition & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ <h1 class="post-title">
{{- end }}

{{- if (.Param "tags")}}
<h3>Tags</h3>
<h3>Tags</h3>{{/* Added by Hidegon */}}
{{- $tags := .Language.Params.Taxonomies.tag | default "tags" }}
<ul class="post-tags">
{{- range ($.GetTerms $tags) }}
Expand Down
2 changes: 2 additions & 0 deletions layouts/partials/extend_head.html
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@

{{- partial "head/css/image_modal_css.html" . -}}

{{- partial "head/css/pagination_css.html" . -}}

{{/* libraries */}}

{{- partial "head/katex.html" . -}}
Expand Down
9 changes: 9 additions & 0 deletions layouts/partials/head/css/pagination_css.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{/* image modal css */}}

{{- if or (.Page.Store.Get "hasPagination") -}}
<style>
{{- with resources.Get "css/custom/pagination.css" | toCSS | minify -}}
{{- .Content | safeCSS -}}
{{- end -}}
</style>
{{- end -}}
1 change: 1 addition & 0 deletions layouts/partials/pagination.html
Original file line number Diff line number Diff line change
Expand Up @@ -160,3 +160,4 @@
{{- end }}
{{- end -}}

{{- .Page.Store.Set "hasPagination" true -}}

0 comments on commit f7a2e3e

Please sign in to comment.