Skip to content

Commit

Permalink
chore: clean up code
Browse files Browse the repository at this point in the history
  • Loading branch information
razonyang authored and mergify[bot] committed Oct 5, 2023
1 parent 4a2c744 commit bca7aaa
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions layouts/partials/hb/modules/blog/post/card.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- $page := .Page }}
{{- $summary := default true .Summary }}
{{- $showSummary := default true .Summary }}
{{- $readingTime := default true .ReadingTime }}
{{- $meta := default true .Meta }}
<div class="hb-blog-post-card card border-0 overflow-hidden">
Expand Down Expand Up @@ -30,16 +30,16 @@
{{ partialCached "hb/modules/blog/post/meta/taxonomies" $page $page }}
</div>
{{- end }}
{{- if $summary }}
{{- if $page.Truncated }}
<div class="hb-blog-post-summary summary-truncated card-text text-secondary">
{{- default $page.Summary $page.Description -}}
</div>
{{- else -}}
<div class="hb-blog-post-summary card-text text-secondary">
{{- default $page.Summary $page.Description -}}
</div>
{{- if $showSummary }}
{{- $summary := $page.Summary }}
{{- $truncated := $page.Truncated }}
{{- with $page.Description }}
{{- $summary = . }}
{{- $truncated = false }}
{{- end }}
<div class="hb-blog-post-summary card-text text-secondary{{ cond $truncated ` summary-truncated` `` }}">
{{- $summary -}}
</div>
{{- end }}
</div>
</div>

0 comments on commit bca7aaa

Please sign in to comment.