Add hideNoPostsWarning param

This commit is contained in:
vimux 2019-01-14 09:26:42 -05:00
parent ecfa7f6421
commit 30e3277682
No known key found for this signature in database
GPG key ID: 5A34FDC4EE832E34
2 changed files with 3 additions and 2 deletions

View file

@ -115,6 +115,7 @@ googleAnalytics = "" # Enable Google Analytics by entering your tracking id
mathjax = true # Enable MathJax for all site pages 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 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 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] [Params.Social]
email = "example@example.com" email = "example@example.com"

View file

@ -9,7 +9,7 @@
</div> </div>
{{ end }} {{ end }}
</div> </div>
{{- if eq $paginator.TotalNumberOfElements 0 }} {{- if and (not .Site.Params.hideNoPostsWarning) (eq $paginator.TotalNumberOfElements 0) }}
<div class="empty block center"> <div class="empty block center">
<div class="empty__icon">¯\_(ツ)_/¯</div> <div class="empty__icon">¯\_(ツ)_/¯</div>
<h3 class="empty__title">{{ T "empty_title" }}</h3> <h3 class="empty__title">{{ T "empty_title" }}</h3>