From 01e2d857201119413889b1ba5370b19e16f4bb9f Mon Sep 17 00:00:00 2001 From: Edoardo Rosa <6991986+notdodo@users.noreply.github.com> Date: Sun, 26 Nov 2023 19:12:32 +0100 Subject: [PATCH] enh: add video to homepage --- layouts/_default/baseof.html | 28 ++++++++++++++++++------- layouts/partials/header/fixed-fill.html | 4 ++-- layouts/partials/home/page.html | 10 +++++---- 3 files changed, 29 insertions(+), 13 deletions(-) diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 3aaa9f41..600ad9ce 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -9,20 +9,34 @@ -
- {{ i18n - "nav.skip_to_main" }} -
{{ $header := print "partials/header/" .Site.Params.header.layout ".html" }} {{ if templates.Exists $header }} {{ partial $header . }} {{ else }} {{ partial "partials/header/basic.html" . }} {{ end }} + {{ if .IsHome }} + {{ if .Site.Params.homePageVideo }} + +
+ +
+ {{ end }} + {{ end }} +
+ {{ i18n + "nav.skip_to_main" }} +
-
+
{{ block "main" . }}{{ end }} {{ if and (.Site.Params.footer.showScrollToTop | default true) (gt .WordCount 1) }} {{- partial "scroll-to-top.html" . -}} diff --git a/layouts/partials/header/fixed-fill.html b/layouts/partials/header/fixed-fill.html index 4d73a1f4..912adaa3 100644 --- a/layouts/partials/header/fixed-fill.html +++ b/layouts/partials/header/fixed-fill.html @@ -1,6 +1,6 @@ -
+
-
+
{{ partial "partials/header/basic.html" . }}
diff --git a/layouts/partials/home/page.html b/layouts/partials/home/page.html index d715b78a..e4e8866a 100644 --- a/layouts/partials/home/page.html +++ b/layouts/partials/home/page.html @@ -1,8 +1,10 @@
- {{ with .Title }} -
-

{{ . | emojify }}

-
+ {{ if .Site.Params.homepage.showTitle | default true }} + {{ with .Title }} +
+

{{ . | emojify }}

+
+ {{ end }} {{ end }}
{{ .Content | emojify }}