From 5c68750e0cd265464aa55b1f1d89e54f7e71ccc0 Mon Sep 17 00:00:00 2001 From: amzrk2 Date: Thu, 18 Jun 2020 14:17:51 +0800 Subject: Optimize toc & license settings logic --- layouts/_default/single.html | 2 +- layouts/partials/sidebar.html | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'layouts') diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 413cacc..26a8213 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -16,7 +16,7 @@ -{{ if and (.Site.Params.showLicense) (ne .Params.noLicense true) }} +{{ if and (or .Site.Params.showLicense .Params.showLicense) (ne .Params.showLicense false) }}

{{ i18n "postCopyrightFront" }} - {{ if and (in .Site.Params.mainSections .Type) (and (.Site.Params.showToc) (ne .Params.noToc true)) }} + {{ if in .Site.Params.mainSections .Type }} + {{ if and (or .Site.Params.showToc .Params.showToc) (ne .Params.showToc false) }}

{{ end }} + {{ end }}