mirror of
https://github.com/Vimux/Binario.git
synced 2024-12-24 05:23:33 +00:00
Add hideNoPostsWarning param
This commit is contained in:
parent
ecfa7f6421
commit
30e3277682
2 changed files with 3 additions and 2 deletions
|
@ -115,6 +115,7 @@ googleAnalytics = "" # Enable Google Analytics by entering your tracking id
|
|||
mathjax = true # Enable MathJax for all site pages
|
||||
mathjaxPath = "https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/MathJax.js" # Specify MathJax path. Optional
|
||||
mathjaxConfig = "TeX-AMS-MML_HTMLorMML" # Specify MathJax config. Optional
|
||||
hideNoPostsWarning = false # Don't show no posts empty state warning in main page, if true
|
||||
|
||||
[Params.Social]
|
||||
email = "example@example.com"
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
<main class="main">
|
||||
<div class="cards">
|
||||
{{ $mainSections := .Site.Params.mainSections | default (slice "post") }}
|
||||
{{ $paginator := .Paginate ( where .Data.Pages "Section" "in" $mainSections ) }}
|
||||
{{ $paginator := .Paginate (where .Data.Pages "Section" "in" $mainSections) }}
|
||||
{{ range $paginator.Pages }}
|
||||
<div class="card{{ if and (ge ($.Param "columns") 1) (le ($.Param "columns") 3) }} card--{{ $.Param "columns" }}col{{ else }} card--2col{{ end }}">
|
||||
{{ .Render "summary" }}
|
||||
</div>
|
||||
{{ end }}
|
||||
</div>
|
||||
{{- if eq $paginator.TotalNumberOfElements 0 }}
|
||||
{{- if and (not .Site.Params.hideNoPostsWarning) (eq $paginator.TotalNumberOfElements 0) }}
|
||||
<div class="empty block center">
|
||||
<div class="empty__icon">¯\_(ツ)_/¯</div>
|
||||
<h3 class="empty__title">{{ T "empty_title" }}</h3>
|
||||
|
|
Loading…
Reference in a new issue