summaryrefslogtreecommitdiffhomepage
path: root/themes/docsy/layouts/shortcodes
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2019-11-18 13:40:27 -0800
committerAdin Scannell <ascannell@google.com>2020-04-21 12:00:59 -0700
commit957e26a6f30d40e2bff042d76a327d0a2cfbabae (patch)
tree3e95d46355585ae4661de5cef30cdca72a7c94bb /themes/docsy/layouts/shortcodes
parentdc2f198866c5fd8162a79978eb3633975d3ba11f (diff)
Move website to a simpler jekyll-based template
This will allow us to merge the site into the main repository. This merge allows the documentation to be kept up-to-date and synchronized with the main project. Builds will be triggered on any update, removing the need for the cron-based reploy.
Diffstat (limited to 'themes/docsy/layouts/shortcodes')
-rw-r--r--themes/docsy/layouts/shortcodes/alert.html6
-rw-r--r--themes/docsy/layouts/shortcodes/blocks/cover.html40
-rw-r--r--themes/docsy/layouts/shortcodes/blocks/feature.html10
-rw-r--r--themes/docsy/layouts/shortcodes/blocks/lead.html12
-rw-r--r--themes/docsy/layouts/shortcodes/blocks/link-down.html7
-rw-r--r--themes/docsy/layouts/shortcodes/blocks/section.html12
-rw-r--r--themes/docsy/layouts/shortcodes/imgproc.html21
-rw-r--r--themes/docsy/layouts/shortcodes/pageinfo.html5
-rw-r--r--themes/docsy/layouts/shortcodes/readfile.md8
-rw-r--r--themes/docsy/layouts/shortcodes/swaggerui.html16
10 files changed, 0 insertions, 137 deletions
diff --git a/themes/docsy/layouts/shortcodes/alert.html b/themes/docsy/layouts/shortcodes/alert.html
deleted file mode 100644
index ff3b0b342..000000000
--- a/themes/docsy/layouts/shortcodes/alert.html
+++ /dev/null
@@ -1,6 +0,0 @@
-{{ $_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 | markdownify }}
-</div>
diff --git a/themes/docsy/layouts/shortcodes/blocks/cover.html b/themes/docsy/layouts/shortcodes/blocks/cover.html
deleted file mode 100644
index 5e14d6dca..000000000
--- a/themes/docsy/layouts/shortcodes/blocks/cover.html
+++ /dev/null
@@ -1,40 +0,0 @@
-{{ $_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)) }}
-<link rel="preload" as="image" href="{{ $promo_image_small.RelPermalink }}" media="(max-width: 1200px)">
-<link rel="preload" as="image" href="{{ $promo_image_big.RelPermalink }}" media="(min-width: 1200px)">
-<style>
-#{{ $blockID }} {
- background-image: url({{ $promo_image_small.RelPermalink }});
-}
-@media only screen and (min-width: 1200px) {
- #{{ $blockID }} {
- background-image: url({{ $promo_image_big.RelPermalink }});
- }
-}
-</style>
-{{ end }}
-<section id="{{ $blockID }}" class="row td-cover-block td-cover-block--height-{{ $height }} js-td-cover td-overlay td-overlay--dark -bg-{{ $col_id }}">
- <div class="container td-overlay__inner">
- <div class="row">
- <div class="col-12">
- <div class="text-center">
- {{ 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 | markdownify}}
- </div>
- </div>
- </div>
- </div>
- </div>
-</section>
diff --git a/themes/docsy/layouts/shortcodes/blocks/feature.html b/themes/docsy/layouts/shortcodes/blocks/feature.html
deleted file mode 100644
index d734dfb66..000000000
--- a/themes/docsy/layouts/shortcodes/blocks/feature.html
+++ /dev/null
@@ -1,10 +0,0 @@
-{{ $icon := .Get "icon" | default "fa-lightbulb" }}
-{{ $url_text := .Get "url_text" }}
-<div class="col-lg-4 mb-5 mb-lg-0 text-center ">
- <div class="mb-4 h1">
- <i class="{{ if not (or (hasPrefix $icon "fas ") (hasPrefix $icon "fab ")) }}fas {{ end }}{{ $icon }}"></i>
- </div>
- <h4 class="h3">{{ .Get "title" | markdownify }}</h4>
- <p class="mb-0">{{ .Inner }}</p>
- {{ with .Get "url" }}<p><a href="{{ . }}">{{ with $url_text }}{{ $url_text }}{{ else }}{{ T "ui_read_more" }}{{ end }} …</a></p>{{ end }}
-</div>
diff --git a/themes/docsy/layouts/shortcodes/blocks/lead.html b/themes/docsy/layouts/shortcodes/blocks/lead.html
deleted file mode 100644
index f57ebb155..000000000
--- a/themes/docsy/layouts/shortcodes/blocks/lead.html
+++ /dev/null
@@ -1,12 +0,0 @@
-{{ $_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. */}}
-<a id="td-block-{{ .Ordinal }}" class="td-offset-anchor"></a>
-<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 | markdownify }}
- </span>
- </div>
-</section>
diff --git a/themes/docsy/layouts/shortcodes/blocks/link-down.html b/themes/docsy/layouts/shortcodes/blocks/link-down.html
deleted file mode 100644
index 639586633..000000000
--- a/themes/docsy/layouts/shortcodes/blocks/link-down.html
+++ /dev/null
@@ -1,7 +0,0 @@
-{{ with .Parent }}
-{{ $id := $.Get "id" | default (printf "td-block-%d" ( add .Ordinal 1 )) }}
-{{ $color := $.Get "color" | default "blue" }}
-<a class="btn btn-link text-{{ $color }}" href="#{{ $id }}"><i class="fa fa-chevron-circle-down" style="font-size: 400%"></i></a>
-{{ 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
deleted file mode 100644
index d5897f648..000000000
--- a/themes/docsy/layouts/shortcodes/blocks/section.html
+++ /dev/null
@@ -1,12 +0,0 @@
-{{ $_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 {{ $type }}">
- {{ .Inner | markdownify}}
- </div>
- </div>
-</section>
diff --git a/themes/docsy/layouts/shortcodes/imgproc.html b/themes/docsy/layouts/shortcodes/imgproc.html
deleted file mode 100644
index bb80a8502..000000000
--- a/themes/docsy/layouts/shortcodes/imgproc.html
+++ /dev/null
@@ -1,21 +0,0 @@
-{{ $original := .Page.Resources.GetMatch (printf "**%s*" (.Get 0)) }}
-{{ $command := .Get 1 }}
-{{ $options := .Get 2 }}
-{{ if eq $command "Fit"}}
-{{ .Scratch.Set "image" ($original.Fit $options) }}
-{{ else if eq $command "Resize"}}
-{{ .Scratch.Set "image" ($original.Resize $options) }}
-{{ else if eq $command "Fill"}}
-{{ .Scratch.Set "image" ($original.Fill $options) }}
-{{ else }}
-{{ errorf "Invalid image processing command: Must be one of Fit, Fill or Resize."}}
-{{ end }}
-{{ $image := .Scratch.Get "image" }}
-<div class="card rounded p-2 td-post-card mb-4 mt-4" style="max-width: {{ add $image.Width 10 }}px">
- <img class="card-img-top" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}">
- {{ with .Inner }}
- <div class="card-body px-0 pt-2 pb-0">
- <p class="card-text">{{ . }}{{ with $image.Params.byline }}<small class="text-muted"><br/>{{ . | html }}</small>{{ end }}</p>
- </div>
- {{ end }}
-</div> \ No newline at end of file
diff --git a/themes/docsy/layouts/shortcodes/pageinfo.html b/themes/docsy/layouts/shortcodes/pageinfo.html
deleted file mode 100644
index 303f8c5fd..000000000
--- a/themes/docsy/layouts/shortcodes/pageinfo.html
+++ /dev/null
@@ -1,5 +0,0 @@
-{{ $_hugo_config := `{ "version": 1 }` }}
-{{ $color := .Get "color" | default "primary" }}
-<div class="pageinfo pageinfo-{{ $color }}">
-{{ .Inner }}
-</div>
diff --git a/themes/docsy/layouts/shortcodes/readfile.md b/themes/docsy/layouts/shortcodes/readfile.md
deleted file mode 100644
index 117c7e870..000000000
--- a/themes/docsy/layouts/shortcodes/readfile.md
+++ /dev/null
@@ -1,8 +0,0 @@
-{{$file := .Get "file"}}
-{{- if eq (.Get "markdown") "true" -}}
-{{- $file | readFile | markdownify -}}
-{{- else if (.Get "highlight") -}}
-{{- highlight ($file | readFile) (.Get "highlight") "" -}}
-{{- else -}}
-{{ $file | readFile | safeHTML }}
-{{- end -}}
diff --git a/themes/docsy/layouts/shortcodes/swaggerui.html b/themes/docsy/layouts/shortcodes/swaggerui.html
deleted file mode 100644
index f0d59a158..000000000
--- a/themes/docsy/layouts/shortcodes/swaggerui.html
+++ /dev/null
@@ -1,16 +0,0 @@
-{{ $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