From 568553394d0a8b34668a75c9839a0f1f426469b2 Mon Sep 17 00:00:00 2001 From: Dimitri Staessens Date: Sun, 6 Oct 2019 21:10:46 +0200 Subject: theme: Switch to docsy theme --- themes/docsy/layouts/shortcodes/blocks/cover.html | 40 +++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 themes/docsy/layouts/shortcodes/blocks/cover.html (limited to 'themes/docsy/layouts/shortcodes/blocks/cover.html') diff --git a/themes/docsy/layouts/shortcodes/blocks/cover.html b/themes/docsy/layouts/shortcodes/blocks/cover.html new file mode 100644 index 0000000..5e14d6d --- /dev/null +++ b/themes/docsy/layouts/shortcodes/blocks/cover.html @@ -0,0 +1,40 @@ +{{ $_hugo_config := `{ "version": 1 }` }} +{{ $blockID := printf "td-cover-block-%d" .Ordinal }} +{{ $promo_image := (.Page.Resources.ByType "image").GetMatch "**background*" }} +{{ $logo_image := (.Page.Resources.ByType "image").GetMatch "**logo*" }} +{{ $col_id := .Get "color" | default "dark" }} +{{ $image_anchor := .Get "image_anchor" | default "smart" }} +{{ $logo_anchor := .Get "logo_anchor" | default "smart" }} +{{/* Height can be one of: auto, min, med, max, full. */}} +{{ $height := .Get "height" | default "max" }} +{{ with $promo_image }} +{{ $promo_image_big := (.Fill (printf "1920x1080 %s" $image_anchor)) }} +{{ $promo_image_small := (.Fill (printf "960x540 %s" $image_anchor)) }} + + + +{{ end }} +
+
+
+
+
+ {{ with .Get "title" }}

{{ $title := . }}{{ with $logo_image }}{{ $logo_image_resized := (.Fit (printf "70x70 %s" $logo_anchor)) }}{{ end }}{{ $title | html }}

{{ end }} + {{ with .Get "subtitle" }}

{{ . | html }}

{{ end }} +
+ {{ .Inner | markdownify}} +
+
+
+
+
+
-- cgit v1.2.3