diff options
Diffstat (limited to 'docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default')
10 files changed, 520 insertions, 0 deletions
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-codeblock-mermaid.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-codeblock-mermaid.html new file mode 100644 index 000000000..94ea0cad0 --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-codeblock-mermaid.html @@ -0,0 +1,4 @@ +<pre class="mermaid"> + {{- .Inner | safeHTML }} +</pre> +{{ .Page.Store.Set "hasMermaid" true }} diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-heading.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-heading.html new file mode 100644 index 000000000..e1b29119f --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-heading.html @@ -0,0 +1,5 @@ +<h{{ .Level }} id="{{ .Anchor | safeURL }}">{{ .Text | safeHTML }} +{{- if in (slice 2 3 4 6) .Level }}{{" " -}} +<a class="header-link" href="#{{ .Anchor | safeURL }}"><svg class="fill-current o-60 hover-accent-color-light" height="22px" viewBox="0 0 24 24" width="22px" xmlns="http://www.w3.org/2000/svg"><path d="M0 0h24v24H0z" fill="none"/><path d="M3.9 12c0-1.71 1.39-3.1 3.1-3.1h4V7H7c-2.76 0-5 2.24-5 5s2.24 5 5 5h4v-1.9H7c-1.71 0-3.1-1.39-3.1-3.1zM8 13h8v-2H8v2zm9-6h-4v1.9h4c1.71 0 3.1 1.39 3.1 3.1s-1.39 3.1-3.1 3.1h-4V17h4c2.76 0 5-2.24 5-5s-2.24-5-5-5z"/></svg></a> +{{- end -}} +</h{{ .Level }}> diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-link.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-link.html new file mode 100644 index 000000000..5583d53d7 --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/_markup/render-link.html @@ -0,0 +1,250 @@ +{{- /* Last modified: 2023-09-04T09:23:04-07:00 */}} + +{{- /* +Copyright 2023 Veriphor LLC + +Licensed under the Apache License, Version 2.0 (the "License"); you may not +use this file except in compliance with the License. You may obtain a copy of +the License at + +https://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, WITHOUT +WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the +License for the specific language governing permissions and limitations under +the License. +*/}} + +{{- /* +This render hook resolves internal destinations by looking for a matching: + + 1. Content page + 2. Page resource (a file in the current page bundle) + 3. Section resource (a file in the current section) + 4. Global resource (a file in the assets directory) + +It skips the section resource lookup if the current page is a leaf bundle. + +External destinations are not modified. + +You must place global resources in the assets directory. If you have placed +your resources in the static directory, and you are unable or unwilling to move +them, you must mount the static directory to the assets directory by including +both of these entries in your site configuration: + + [[module.mounts]] + source = 'assets' + target = 'assets' + + [[module.mounts]] + source = 'static' + target = 'assets' + +By default, if this render hook is unable to resolve a destination, including a +fragment if present, it passes the destination through without modification. To +emit a warning or error, set the error level in your site configuration: + + [params.render_hooks.link] + errorLevel = 'warning' # ignore (default), warning, or error (fails the build) + +When you set the error level to warning, and you are in a development +environment, you can visually highlight broken internal links: + + [params.render_hooks.link] + errorLevel = 'warning' # ignore (default), warning, or error (fails the build) + highlightBroken = true # true or false (default) + +This will add a "broken" class to anchor elements with invalid src attributes. +Add a rule to your CSS targeting the broken links: + + a.broken { + background: #ff0; + border: 2px solid #f00; + padding: 0.1em 0.2em; + } + +This render hook may be unable to resolve destinations created with the ref and +relref shortcodes. Unless you set the error level to ignore you should not use +either of these shortcodes in conjunction with this render hook. + +@context {string} Destination The link destination. +@context {page} Page A reference to the page containing the link. +@context {string} PlainText The link description as plain text. +@context {string} Text The link description. +@context {string} Title The link title. + +@returns {template.html} +*/}} + +{{- /* Initialize. */}} +{{- $renderHookName := "link" }} + +{{- /* Verify minimum required version. */}} +{{- $minHugoVersion := "0.120.0" }} +{{- if lt hugo.Version $minHugoVersion }} + {{- errorf "The %q render hook requires Hugo v%s or later." $renderHookName $minHugoVersion }} +{{- end }} + +{{- /* Error level when unable to resolve destination: ignore, warning, or error. */}} +{{- $errorLevel := or site.Params.render_hooks.link.errorLevel "ignore" | lower }} + +{{- /* If true, adds "broken" class to broken links. Applicable in development environment when errorLevel is warning. */}} +{{- $highlightBrokenLinks := or site.Params.render_hooks.link.highlightBroken false }} + +{{- /* Validate error level. */}} +{{- if not (in (slice "ignore" "warning" "error") $errorLevel) }} + {{- errorf "The %q render hook is misconfigured. The errorLevel %q is invalid. Please check your site configuration." $renderHookName $errorLevel }} +{{- end }} + +{{- /* Determine content path for warning and error messages. */}} +{{- $contentPath := "" }} +{{- with .Page.File }} + {{- $contentPath = .Path }} +{{- else }} + {{- $contentPath = .Path }} +{{- end }} + +{{- /* Parse destination. */}} +{{- $u := urls.Parse .Destination }} + +{{- /* Set common message. */}} +{{- $msg := printf "The %q render hook was unable to resolve the destination %q in %s" $renderHookName $u.String $contentPath }} + +{{- /* Set attributes for anchor element. */}} +{{- $attrs := dict "href" $u.String }} +{{- if $u.IsAbs }} + {{- /* Destination is a remote resource. */}} + {{- $attrs = merge $attrs (dict "rel" "external") }} +{{- else }} + {{- with $u.Path }} + {{- with $p := or ($.Page.GetPage .) ($.Page.GetPage (strings.TrimRight "/" .)) }} + {{- /* Destination is a page. */}} + {{- $href := .RelPermalink }} + {{- with $u.RawQuery }} + {{- $href = printf "%s?%s" $href . }} + {{- end }} + {{- with $u.Fragment }} + {{- $ctx := dict + "contentPath" $contentPath + "errorLevel" $errorLevel + "page" $p + "parsedURL" $u + "renderHookName" $renderHookName + }} + {{- partial "inline/h-rh-l/validate-fragment.html" $ctx }} + {{- $href = printf "%s#%s" $href . }} + {{- end }} + {{- $attrs = dict "href" $href }} + {{- else }} + {{- with $.Page.Resources.Get $u.Path }} + {{- /* Destination is a page resource; drop query and fragment. */}} + {{- $attrs = dict "href" .RelPermalink }} + {{- else }} + {{- with (and (ne $.Page.BundleType "leaf") ($.Page.CurrentSection.Resources.Get $u.Path)) }} + {{- /* Destination is a section resource, and current page is not a leaf bundle. */}} + {{- $attrs = dict "href" .RelPermalink }} + {{- else }} + {{- with resources.Get $u.Path }} + {{- /* Destination is a global resource; drop query and fragment. */}} + {{- $attrs = dict "href" .RelPermalink }} + {{- else }} + {{- if eq $errorLevel "warning" }} + {{- warnf $msg }} + {{- if and $highlightBrokenLinks hugo.IsDevelopment }} + {{- $attrs = merge $attrs (dict "class" "broken") }} + {{- end }} + {{- else if eq $errorLevel "error" }} + {{- errorf $msg }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- end }} + {{- else }} + {{- with $u.Fragment }} + {{- /* Destination is on the same page; prepend relative permalink. */}} + {{- $ctx := dict + "contentPath" $contentPath + "errorLevel" $errorLevel + "page" $.Page + "parsedURL" $u + "renderHookName" $renderHookName + }} + {{- partial "inline/h-rh-l/validate-fragment.html" $ctx }} + {{- $attrs = dict "href" (printf "%s#%s" $.Page.RelPermalink .) }} + {{- else }} + {{- if eq $errorLevel "warning" }} + {{- warnf $msg }} + {{- if and $highlightBrokenLinks hugo.IsDevelopment }} + {{- $attrs = merge $attrs (dict "class" "broken") }} + {{- end }} + {{- else if eq $errorLevel "error" }} + {{- errorf $msg }} + {{- end }} + {{- end }} + {{- end }} +{{- end }} +{{- with .Title }} + {{- $attrs = merge $attrs (dict "title" .) }} +{{- end -}} + +{{- /* Render anchor element. */ -}} +<a + {{- range $k, $v := $attrs }} + {{- printf " %s=%q" $k $v | safeHTMLAttr }} + {{- end -}} +>{{ .Text | safeHTML }}</a> + +{{- define "partials/inline/h-rh-l/validate-fragment.html" }} + {{- /* + Validates the fragment portion of a link destination. + + @context {string} contentPath The page containing the link. + @context {string} errorLevel The error level when unable to resolve destination; ignore (default), warning, or error. + @context {page} page The page corresponding to the link destination + @context {struct} parsedURL The link destination parsed by urls.Parse. + @context {string} renderHookName The name of the render hook. + */}} + + {{- /* Initialize. */}} + {{- $contentPath := .contentPath }} + {{- $errorLevel := .errorLevel }} + {{- $p := .page }} + {{- $u := .parsedURL }} + {{- $renderHookName := .renderHookName }} + + {{- /* Validate. */}} + {{- with $u.Fragment }} + {{- if $p.Fragments.Identifiers.Contains . }} + {{- if gt ($p.Fragments.Identifiers.Count .) 1 }} + {{- $msg := printf "The %q render hook detected duplicate heading IDs %q in %s" $renderHookName . $contentPath }} + {{- if eq $errorLevel "warning" }} + {{- warnf $msg }} + {{- else if eq $errorLevel "error" }} + {{- errorf $msg }} + {{- end }} + {{- end }} + {{- else }} + {{- /* Determine target path for warning and error message. */}} + {{- $targetPath := "" }} + {{- with $p.File }} + {{- $targetPath = .Path }} + {{- else }} + {{- $targetPath = .Path }} + {{- end }} + {{- /* Set common message. */}} + {{- $msg := printf "The %q render hook was unable to find heading ID %q in %s. See %s" $renderHookName . $targetPath $contentPath }} + {{- if eq $targetPath $contentPath }} + {{- $msg = printf "The %q render hook was unable to find heading ID %q in %s" $renderHookName . $targetPath }} + {{- end }} + {{- /* Throw warning or error. */}} + {{- if eq $errorLevel "warning" }} + {{- warnf $msg }} + {{- else if eq $errorLevel "error" }} + {{- errorf $msg }} + {{- end }} + {{- end }} + {{- end }} + +{{- end -}} diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html new file mode 100644 index 000000000..63b5b10f5 --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html @@ -0,0 +1,123 @@ +<!DOCTYPE html> +<html + class="no-js" + lang="{{ with $.Site.LanguageCode }} + {{ . }} + {{ else }} + en-us + {{ end }} + "> + <head> + <meta charset="utf-8" /> + {{/* https://www.zachleat.com/web/preload/ */}} + <link + rel="preload" + href="{{ "fonts/muli-latin-200.woff2" | absURL }}" + as="font" + type="font/woff2" + crossorigin /> + <link + rel="preload" + href="{{ "fonts/muli-latin-400.woff2" | absURL }}" + as="font" + type="font/woff2" + crossorigin /> + <link + rel="preload" + href="{{ "fonts/muli-latin-800.woff2" | absURL }}" + as="font" + type="font/woff2" + crossorigin /> + + <meta http-equiv="X-UA-Compatible" content="IE=edge" /> + {{/* NOTE: the Site's title, and if there is a page title, that is set too */}} + <title> + {{ block "title" . }} + {{ with .Title }}{{ . }} | {{ end }}{{ .Site.Title }} + {{ end }} + + </title> + + <meta name="viewport" content="width=device-width,minimum-scale=1" /> + {{ hugo.Generator }} + + {{ if hugo.IsProduction }} + <meta name="robots" content="index, follow" /> + {{ else }} + <meta name="robots" content="noindex, nofollow" /> + {{ end }} + + {{ range .AlternativeOutputFormats -}} + <link + rel="{{ .Rel }}" + type="{{ .MediaType.Type }}" + href="{{ .Permalink | safeURL }}" /> + {{ end -}} + + {{ $isDev := eq hugo.Environment "development" }} + {{ $stylesheet := resources.Get "output/css/app.css" }} + {{ if not $isDev }} + {{ $stylesheet = $stylesheet | minify | fingerprint }} + {{ end }} + {{ with $stylesheet }} + {{ if $isDev }} + <link + rel="stylesheet" + href="{{ .RelPermalink }}" + crossorigin="anonymous" /> + {{ else }} + <link + rel="stylesheet" + href="{{ .RelPermalink }}" + integrity="{{ .Data.Integrity }}" + crossorigin="anonymous" /> + {{ end }} + {{ $.Scratch.Set "stylesheet" . }} + {{ end }} + + + <meta + name="description" + content="{{ with .Description }} + {{ . }} + {{ else }} + {{ with .Site.Params.description }}{{ . }}{{ end }} + {{ end }} + " /> + + {{ block "scripts" . }} + {{- partial "site-scripts.html" . -}} + {{ end }} + {{ partial "site-manifest.html" . }} + {{- partial "head-additions.html" . -}} + {{- partial "opengraph/opengraph.html" . -}} + {{- template "_internal/schema.html" . -}} + {{- partial "opengraph/twitter_cards.html" . -}} + + {{ if hugo.IsProduction }} + {{ partial "gtag.html" . }} + {{ end }} + + {{ if .Param "math" }} + {{ partialCached "math.html" . }} + {{ end }} + + </head> + + <body + class="ma0 sans-serif bg-primary-color-light{{ with getenv "HUGO_ENV" }} + {{ . }} + {{ end }}"> + {{ partial "hooks/after-body-start.html" . }} + {{ block "nav" . }}{{ partial "site-nav.html" . }}{{ end }} + {{ block "header" . }}{{ end }} + <main role="main" class="content-with-sidebar min-vh-100 pb7 pb0-ns"> + {{ block "main" . }}{{ end }} + </main> + + {{ block "footer" . }}{{ partialCached "site-footer.html" . }}{{ end }} + + {{ partial "hooks/before-body-end.html" . }} + + </body> +</html> diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/documentation-home.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/documentation-home.html new file mode 100644 index 000000000..91f744c30 --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/documentation-home.html @@ -0,0 +1,4 @@ +{{ define "main" }} +{{ $section_to_display := (.Site.Taxonomies.categories.fundamentals).Pages | lang.Merge (.Sites.First.Taxonomies.categories.fundamentals).Pages }} + {{ partial "pagelayout.html" (dict "context" . "section_to_display" $section_to_display ) }} +{{ end }} diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/list.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/list.html new file mode 100644 index 000000000..3b7a2307e --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/list.html @@ -0,0 +1,5 @@ +{{ define "main" }} + {{ $paginator := .Paginate (.Pages | lang.Merge (where .Sites.First.RegularPages "Section" .Section)) }} + {{ $section_to_display := .Sections | default $paginator.Pages }} + {{ partial "pagelayout.html" (dict "context" . "section_to_display" $section_to_display ) }} +{{ end }} diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/page.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/page.html new file mode 100644 index 000000000..108d32323 --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/page.html @@ -0,0 +1,48 @@ +<header class="flex-none w-100"> + {{ if in (slice "functions" "methods") .Type }} + {{ with .FirstSection }} + <a href="{{ .RelPermalink }}" class="f6 fw8 mb0 link mid-gray dim mr3"> + {{ humanize .Title | upper }} + </a> + {{ end }} + {{ with .CurrentSection }} + <a href="{{ .RelPermalink }}" class="f6 fw8 mb0 link mid-gray dim mr3"> + {{ humanize .Title | upper }} + </a> + {{ end }} + {{ else }} + {{ range .Params.categories }} + <a href="{{ "/categories/" | relLangURL }}{{ . | urlize }}" class="f6 fw8 mb0 link mid-gray dim mr3"> + {{ humanize . | upper }} + </a> + {{ end }} + {{ end }} + <h1 class="lh-title mb3 mv0 pt3 primary-color-dark"> + {{ .Title }} + </h1> +</header> + +<aside class="bt bw1 pt3 mt2 mid-gray b--mid-gray fn w-100"> + {{ with .Params.description }} + <div class="mb4 f4 fw4 lh-copy"> + {{ . | markdownify }} + </div> + {{ end }} + + <!-- + NOTE: Removed to test builds without it. + partial "components/author-github-data" (dict "context" . "size" "110") --> +</aside> + +{{ with .Params.featured_image_path }} + <img src="{{ . }}" alt="Featured Image for {{ $.Title }}" class="mw-100"> +{{ end }} + +<div class="prose" id="prose"> + <div class="mb4"> + {{- partial "docs/functions-signatures.html" . -}} + {{- partial "docs/functions-return-type.html" . -}} + {{- partial "docs/functions-aliases.html" . -}} + </div> + {{ .Content }} +</div> diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html new file mode 100644 index 000000000..092a69270 --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/single.html @@ -0,0 +1,29 @@ +{{ define "main" }} + <article class="w-100 ph4 pb5 pb6-ns pt1 pt5-ns"> + <div class="flex-l"> + + <div class="order-0 w-20 dn db-l"> + {{ partial "nav-links-docs.html" . }} + </div> + <div class="order-1 flex-grow-1 ph0 ph5-ns mt0-ns mid-gray nested-copy-line-height no-underline nested-links nested-img nested-copy-seperator nested-blockquote"> + <div style="max-width: 40rem;" class="documentation-copy"> + <div id="readout" class="fixed right-0 bottom-0"></div> + {{ .Render "page" }} + {{ partial "related.html" . }} + </div> + </div> + <div id="right-sidebar" class="order-2 w-20 dn db-l sticky pt2"> + {{ partial "right-sidebar.html" . }} + </div> + + </div> + </article> + + <div id="page-footer" class="w-100 bg-light-gray"> + <div class="mw7 pa4 center nested-lh-copy lh-copy"> + {{ partial "docs/page-meta-data.html" . }} + {{ partial "page-edit.html" . }} + {{ partial "tags.html" . }} + </div> + </div> +{{ end }} diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/taxonomy.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/taxonomy.html new file mode 100644 index 000000000..77d1812d9 --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/taxonomy.html @@ -0,0 +1,4 @@ +{{ define "main" }} + {{ $section_to_display := .Pages }} + {{ partial "pagelayout.html" (dict "context" . "section_to_display" $section_to_display ) }} +{{ end }} diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/terms.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/terms.html new file mode 100644 index 000000000..499eec598 --- /dev/null +++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/terms.html @@ -0,0 +1,48 @@ +{{ define "main" }} +{{ $section_to_display := .Pages }} +<div class="w-100 ph4 pb5 pb6-ns pt1 pt3-ns"> + + <div class="flex"> + <div class="dn db-l w-20"> + {{ partial "nav-links-docs.html" . }} + </div> + + <div class="w-100 w-80-l ph0 ph4-l"> + <article class="w-100 nested-copy-line-height nested-links nested-img"> + <h1 class="primary-color-dark f2"> + {{ .Title }} + </h1> + </article> + <div class="pa3 pa4-ns w-100 v-top column-count-3-l column-gap-1-l"> + {{ range $key, $value := .Data.Terms }} + <div class="break-inside-avoid-l nested-copy-line-height mb5"> + <h2 class="f3"> + <a href="{{ "/" | relLangURL }}{{ $.Data.Plural | urlize }}/{{ $key | urlize }}" class="link black hover-blue"> + {{ $key }} <span class="f6 gray"> ↗</span> + </a> + </h2> + {{ range $value.Pages }} + <h3> + <a href="{{ .Permalink }}" class="link blue"> + {{ .Title }} + </a> + </h3> + {{ end }} + </div> + + {{ end }} + + </div> + + + + + </div> + + </div> + + + + +</div> +{{ end }} |