summaryrefslogtreecommitdiffhomepage
path: root/themes/docsy/layouts/shortcodes
diff options
context:
space:
mode:
authorIan Lewis <ianmlewis@gmail.com>2019-10-18 00:19:24 -0400
committerIan Lewis <ianlewis@google.com>2019-11-13 13:03:16 -0800
commita2b055de52cb90180ad57c26119fe72e61d70494 (patch)
treea156c39ba5e044fa42600a6c2d7ddd7dd91c350c /themes/docsy/layouts/shortcodes
parentcf5b8ec088eac99ede97a6c9e381485695638dee (diff)
Updated to Docsy HEAD
This updates the vendored docsy to https://github.com/google/docsy/tree/1a09abe6d7eaf02e44f79de3eadf8178a3792e81
Diffstat (limited to 'themes/docsy/layouts/shortcodes')
-rw-r--r--themes/docsy/layouts/shortcodes/alert.html5
-rw-r--r--themes/docsy/layouts/shortcodes/blocks/cover.html3
-rw-r--r--themes/docsy/layouts/shortcodes/blocks/lead.html5
-rw-r--r--themes/docsy/layouts/shortcodes/blocks/section.html8
-rw-r--r--themes/docsy/layouts/shortcodes/pageinfo.html5
-rw-r--r--themes/docsy/layouts/shortcodes/swaggerui.html16
6 files changed, 34 insertions, 8 deletions
diff --git a/themes/docsy/layouts/shortcodes/alert.html b/themes/docsy/layouts/shortcodes/alert.html
index a95d8b2f8..ff3b0b342 100644
--- a/themes/docsy/layouts/shortcodes/alert.html
+++ b/themes/docsy/layouts/shortcodes/alert.html
@@ -1,5 +1,6 @@
+{{ $_hugo_config := `{ "version": 1 }` }}
{{ $color := .Get "color" | default "primary" }}
<div class="alert alert-{{ $color }}" role="alert">
{{ with .Get "title" }}<h4 class="alert-heading">{{ . | safeHTML }}</h4>{{ end }}
-{{ .Inner }}
-</div> \ No newline at end of file
+{{ .Inner | markdownify }}
+</div>
diff --git a/themes/docsy/layouts/shortcodes/blocks/cover.html b/themes/docsy/layouts/shortcodes/blocks/cover.html
index b9afb0408..5e14d6dca 100644
--- a/themes/docsy/layouts/shortcodes/blocks/cover.html
+++ b/themes/docsy/layouts/shortcodes/blocks/cover.html
@@ -1,3 +1,4 @@
+{{ $_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*" }}
@@ -30,7 +31,7 @@
{{ with .Get "title" }}<h1 class="display-1 mt-0 mt-md-5 pb-4">{{ $title := . }}{{ with $logo_image }}{{ $logo_image_resized := (.Fit (printf "70x70 %s" $logo_anchor)) }}<img class="td-cover-logo" src="{{ $logo_image_resized.RelPermalink }}" alt="{{ $title | html }} Logo">{{ end }}{{ $title | html }}</h1>{{ end }}
{{ with .Get "subtitle" }}<p class="display-2 text-uppercase mb-0">{{ . | html }}</p>{{ end }}
<div class="pt-3 lead">
- {{ .Inner }}
+ {{ .Inner | markdownify}}
</div>
</div>
</div>
diff --git a/themes/docsy/layouts/shortcodes/blocks/lead.html b/themes/docsy/layouts/shortcodes/blocks/lead.html
index a0c302214..f57ebb155 100644
--- a/themes/docsy/layouts/shortcodes/blocks/lead.html
+++ b/themes/docsy/layouts/shortcodes/blocks/lead.html
@@ -1,3 +1,4 @@
+{{ $_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. */}}
@@ -5,7 +6,7 @@
<section class="row td-box td-box--{{ $col_id }} position-relative td-box--gradient td-box--height-{{ $height }}">
<div class="container text-center td-arrow-down">
<span class="h4 mb-0">
- {{ .Inner }}
+ {{ .Inner | markdownify }}
</span>
</div>
-</section> \ No newline at end of file
+</section>
diff --git a/themes/docsy/layouts/shortcodes/blocks/section.html b/themes/docsy/layouts/shortcodes/blocks/section.html
index bbd4e1723..d5897f648 100644
--- a/themes/docsy/layouts/shortcodes/blocks/section.html
+++ b/themes/docsy/layouts/shortcodes/blocks/section.html
@@ -1,10 +1,12 @@
+{{ $_hugo_config := `{ "version": 1 }` }}
{{ $col_id := .Get "color" | default .Ordinal }}
{{ $height := .Get "height" | default "auto" }}
+{{ $type := .Get "type" | default "" }}
<a id="td-block-{{ .Ordinal }}" class="td-offset-anchor"></a>
<section class="row td-box td-box--{{ $col_id }} td-box--gradient td-box--height-{{ $height }}">
<div class="col">
- <div class="row">
- {{ .Inner }}
+ <div class="row {{ $type }}">
+ {{ .Inner | markdownify}}
</div>
</div>
-</section> \ No newline at end of file
+</section>
diff --git a/themes/docsy/layouts/shortcodes/pageinfo.html b/themes/docsy/layouts/shortcodes/pageinfo.html
new file mode 100644
index 000000000..303f8c5fd
--- /dev/null
+++ b/themes/docsy/layouts/shortcodes/pageinfo.html
@@ -0,0 +1,5 @@
+{{ $_hugo_config := `{ "version": 1 }` }}
+{{ $color := .Get "color" | default "primary" }}
+<div class="pageinfo pageinfo-{{ $color }}">
+{{ .Inner }}
+</div>
diff --git a/themes/docsy/layouts/shortcodes/swaggerui.html b/themes/docsy/layouts/shortcodes/swaggerui.html
new file mode 100644
index 000000000..f0d59a158
--- /dev/null
+++ b/themes/docsy/layouts/shortcodes/swaggerui.html
@@ -0,0 +1,16 @@
+{{ $original := .Get "src" }}
+<div id="ohpen_swagger_ui"></div>
+<script>
+window.onload = function() {
+ const ui = SwaggerUIBundle({
+ url: {{ $original }},
+ dom_id: '#ohpen_swagger_ui',
+ presets: [
+ SwaggerUIBundle.presets.apis,
+ SwaggerUIStandalonePreset
+ ]
+ })
+
+ window.ui = ui
+}
+</script> \ No newline at end of file