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 ++++++++++++++++++++++ .../docsy/layouts/shortcodes/blocks/feature.html | 10 ++++++ themes/docsy/layouts/shortcodes/blocks/lead.html | 12 +++++++ .../docsy/layouts/shortcodes/blocks/link-down.html | 7 ++++ .../docsy/layouts/shortcodes/blocks/section.html | 12 +++++++ 5 files changed, 81 insertions(+) create mode 100644 themes/docsy/layouts/shortcodes/blocks/cover.html create mode 100644 themes/docsy/layouts/shortcodes/blocks/feature.html create mode 100644 themes/docsy/layouts/shortcodes/blocks/lead.html create mode 100644 themes/docsy/layouts/shortcodes/blocks/link-down.html create mode 100644 themes/docsy/layouts/shortcodes/blocks/section.html (limited to 'themes/docsy/layouts/shortcodes/blocks') 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}} +
+
+
+
+
+
diff --git a/themes/docsy/layouts/shortcodes/blocks/feature.html b/themes/docsy/layouts/shortcodes/blocks/feature.html new file mode 100644 index 0000000..d734dfb --- /dev/null +++ b/themes/docsy/layouts/shortcodes/blocks/feature.html @@ -0,0 +1,10 @@ +{{ $icon := .Get "icon" | default "fa-lightbulb" }} +{{ $url_text := .Get "url_text" }} +
+
+ +
+

{{ .Get "title" | markdownify }}

+

{{ .Inner }}

+ {{ with .Get "url" }}

{{ with $url_text }}{{ $url_text }}{{ else }}{{ T "ui_read_more" }}{{ end }} …

{{ end }} +
diff --git a/themes/docsy/layouts/shortcodes/blocks/lead.html b/themes/docsy/layouts/shortcodes/blocks/lead.html new file mode 100644 index 0000000..f57ebb1 --- /dev/null +++ b/themes/docsy/layouts/shortcodes/blocks/lead.html @@ -0,0 +1,12 @@ +{{ $_hugo_config := `{ "version": 1 }` }} +{{ $col_id := .Get "color" | default .Ordinal }} +{{ $height := .Get "height" | default "auto" }} +{{/* Height can be one of: auto, min, med, max, full. */}} + +
+
+ + {{ .Inner | markdownify }} + +
+
diff --git a/themes/docsy/layouts/shortcodes/blocks/link-down.html b/themes/docsy/layouts/shortcodes/blocks/link-down.html new file mode 100644 index 0000000..6395866 --- /dev/null +++ b/themes/docsy/layouts/shortcodes/blocks/link-down.html @@ -0,0 +1,7 @@ +{{ with .Parent }} +{{ $id := $.Get "id" | default (printf "td-block-%d" ( add .Ordinal 1 )) }} +{{ $color := $.Get "color" | default "blue" }} + +{{ else }} +{{ errorf "The link-down shortcode is supposed to be nested inside a shortcode"}} +{{ end }} \ No newline at end of file diff --git a/themes/docsy/layouts/shortcodes/blocks/section.html b/themes/docsy/layouts/shortcodes/blocks/section.html new file mode 100644 index 0000000..d5897f6 --- /dev/null +++ b/themes/docsy/layouts/shortcodes/blocks/section.html @@ -0,0 +1,12 @@ +{{ $_hugo_config := `{ "version": 1 }` }} +{{ $col_id := .Get "color" | default .Ordinal }} +{{ $height := .Get "height" | default "auto" }} +{{ $type := .Get "type" | default "" }} + +
+
+
+ {{ .Inner | markdownify}} +
+
+
-- cgit v1.2.3