Renamed microhook and sidebar widgets
This commit is contained in:
parent
df3c3285d6
commit
fb170b6b40
4 changed files with 1 additions and 1 deletions
13
layouts/partials/sidebar-widgets/sidebar.html
Normal file
13
layouts/partials/sidebar-widgets/sidebar.html
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
{{ $isPost := eq .Page.Type "post" -}}
|
||||
{{ $showOnPosts := $.Site.Params.sidebar_show_on_posts -}}
|
||||
{{ $showOnPages := $.Site.Params.sidebar_show_on_pages -}}
|
||||
{{ $shouldShowSidebar := or .IsHome (and $showOnPosts $isPost) (and $showOnPages (not $isPost)) -}}
|
||||
{{ if $shouldShowSidebar -}}
|
||||
<div class="sidebar">
|
||||
{{ if templates.Exists "partials/sidebar.html" }}
|
||||
{{ partial "sidebar.html" . }}
|
||||
{{ else }}
|
||||
{{ partial "sidebar-widgets/recommendations.html" . }}
|
||||
{{ end }}
|
||||
</div>
|
||||
{{ end -}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue