diff --git a/themes/ccchh/layouts/index.html b/themes/ccchh/layouts/index.html index c75d145..5963234 100644 --- a/themes/ccchh/layouts/index.html +++ b/themes/ccchh/layouts/index.html @@ -7,7 +7,12 @@ {{- $events := where (.Site.GetPage "blog").Pages ".Params.categories" "event" }} {{- $lookback := time.ParseDuration "-6h" }} {{- $upcoming := where $events ".Params.date" "ge" (time.Now.Add $lookback) }} - {{ if $upcoming }} + + {{- $article := where (.Site.GetPage "blog").Pages ".Params.categories" "article" }} + {{- $articleDisplayTime := time.ParseDuration "-126h" }} + {{- $articleNew := where $article ".Params.publishDate" "ge" (time.Now.Add $articleDisplayTime) }} + + {{ if or $upcoming $articleNew }}
{{- end }} - - {{- end }} - {{- $article := where (.Site.GetPage "blog").Pages ".Params.categories" "article" }} - {{- $articleDisplayTime := time.ParseDuration "-126h" }} - {{- $articleNew := where $article ".Params.publishDate" "ge" (time.Now.Add $articleDisplayTime) }} - {{ if $articleNew }} -