summaryrefslogtreecommitdiffstats
path: root/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-12-13 21:05:10 +0100
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>2021-12-13 21:05:10 +0100
commit6183184b966dafda6e4863dc30de450a8bb1bacd (patch)
treed4038593adb6557e56de6921c757773058e959bf /docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts
parenta037be774d567c6a29cc7f10c94c9f746ca6d2aa (diff)
parent45e6fdb315d113ba13e20a633ed0c67e3f25170d (diff)
Diffstat (limited to 'docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts')
-rw-r--r--docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html4
-rw-r--r--docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/docs/page-meta-data.html7
-rw-r--r--docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-docs-mobile.html2
-rw-r--r--docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-global-mobile.html2
-rw-r--r--docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-mobile.html8
-rw-r--r--docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/get-featured-image.html24
-rw-r--r--docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/opengraph.html42
-rw-r--r--docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/twitter_cards.html22
-rw-r--r--docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-footer.html2
-rw-r--r--docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html2
10 files changed, 100 insertions, 15 deletions
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html
index 0de21a255..47019072c 100644
--- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/_default/baseof.html
@@ -47,9 +47,9 @@
{{ end }}
{{ partial "site-manifest.html" . }}
{{- partial "head-additions.html" . -}}
- {{- template "_internal/opengraph.html" . -}}
+ {{- partial "opengraph/opengraph.html" . -}}
{{- template "_internal/schema.html" . -}}
- {{- template "_internal/twitter_cards.html" . -}}
+ {{- partial "opengraph/twitter_cards.html" . -}}
{{ if eq (getenv "HUGO_ENV") "production" | or (eq .Site.Params.env "production") }}
{{ partial "gtag" . }}
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/docs/page-meta-data.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/docs/page-meta-data.html
index 8b3fbbafc..dc8ddd01e 100644
--- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/docs/page-meta-data.html
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/docs/page-meta-data.html
@@ -1,6 +1,3 @@
-<h6 class="f4 dark-gray mb2">
- <a href="{{ .Permalink }}" class="hide-child link primary-color">
- <span class="nl3 child">{{ partial "svg/link-permalink.svg" (dict "size" "14px") }}</span>
- “{{ .Title }}”
- </a> was last updated: {{ .Lastmod.Format "January 2, 2006" }}{{ with .GitInfo }}: <a class="hide-child link primary-color" href="{{$.Site.Params.ghrepo}}commit/{{ .Hash }}">{{ .Subject }} ({{ .AbbreviatedHash }})</a>{{end }}
+<h6 class="f6 dark-gray mb2">
+ Last updated: {{ .Lastmod.Format "January 2, 2006" }}{{ with .GitInfo }}: <a class="hide-child link primary-color" href="{{$.Site.Params.ghrepo}}commit/{{ .Hash }}">{{ .Subject }} ({{ .AbbreviatedHash }})</a>{{end }}
</h6>
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-docs-mobile.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-docs-mobile.html
index ad9d535b4..a8fc27e21 100644
--- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-docs-mobile.html
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-docs-mobile.html
@@ -1,6 +1,6 @@
{{ $currentPage := . }}
{{ $menu := .Site.Menus.docs.ByWeight }}
-<ul class="list dib ph0 ma0 scrolling-touch tc">
+<ul class="list dib ph0 scrolling-touch tc">
{{ range $menu }}{{ $post := printf "%s" .Post }}
<li class="tl dib ma0 hover-bg-black w-100{{ if eq $post "break" }} mb2 bb b--mid-gray{{ end }}">
<a href="{{.URL}}" class="ttu f6 link primary-color-light hover-white db brand-font mb1 ma0 w-100 pv2 ph4{{if $currentPage.IsMenuCurrent "main" . }} bg-primary-color{{end}}">
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-global-mobile.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-global-mobile.html
index 4a1631d96..6ad98923e 100644
--- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-global-mobile.html
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-links-global-mobile.html
@@ -1,6 +1,6 @@
{{ $currentPage := . }}
{{ $menu := .Site.Menus.global }}
-<ul class="list hidden dib ph0 ma0 scrolling-touch tc">
+<ul class="list hidden dib ph0 scrolling-touch tc">
{{ range $menu }}
<li class="tl dib ma0 hover-bg-black w-100">
<a href="{{.URL}}" class="ttu f6 link primary-color-light overflow hover-white db brand-font ma0 w-100 pv3 ph4{{if $currentPage.IsMenuCurrent "main" . }} bg-primary-color{{end}}">
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-mobile.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-mobile.html
index 00b1a691c..b04866e52 100644
--- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-mobile.html
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/nav-mobile.html
@@ -1,12 +1,12 @@
-<div class="globalmenu mobilemenu pb3 dn">
+<div class="globalmenu mobilemenu pb1 dn">
{{ partial "nav-links-global-mobile.html" . }}
</div>
-<div class="docsmenu mobilemenu pb3 dn">
+<div class="docsmenu mobilemenu pb1 dn">
{{ partial "nav-links-docs-mobile.html" . }}
</div>
<div class="flex dn-l justify-between">
- <button class="js-toggle flex-auto dib dn-l f6 tc db mt4-ns ph3 pv2 link mr2 white bg-primary-color-dark hover-bg-primary-color ba b--white-40 w-auto" data-target=".globalmenu">Menu</button>
+ <button class="js-toggle flex-auto dib dn-l f6 tc db ph3 pv2 link mr2 white bg-primary-color-dark hover-bg-primary-color ba b--white-40 w-auto" data-target=".globalmenu">Menu</button>
- <button class="js-toggle flex-auto dib dn-l f6 tc db mt4-ns ph3 pv2 link white bg-primary-color-dark hover-bg-primary-color ba b--white-40 w-auto" data-target=".docsmenu">Docs Menu</button>
+ <button class="js-toggle flex-auto dib dn-l f6 tc db ph3 pv2 link white bg-primary-color-dark hover-bg-primary-color ba b--white-40 w-auto" data-target=".docsmenu">Docs Menu</button>
</div>
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/get-featured-image.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/get-featured-image.html
new file mode 100644
index 000000000..79b315a44
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/get-featured-image.html
@@ -0,0 +1,24 @@
+{{ $images := $.Resources.ByType "image" }}
+{{ $featured := $images.GetMatch "*feature*" }}
+{{ if not $featured }}{{ $featured = $images.GetMatch "{*cover*,*thumbnail*}" }}{{ end }}
+{{ if not $featured }}
+ {{ $featured = resources.Get "/opengraph/gohugoio-card-base-1.png" }}
+ {{ $size := 80 }}
+ {{ $title := $.LinkTitle }}
+ {{ if gt (len $title) 20 }}
+ {{ $size = 70 }}
+ {{ end }}
+
+ {{ $text := $title }}
+ {{ $textOptions := dict
+ "color" "#FFF"
+ "size" $size
+ "lineSpacing" 10
+ "x" 65 "y" 80
+ "font" (resources.Get "/opengraph/mulish-black.ttf")
+ }}
+
+ {{ $featured = $featured | images.Filter (images.Text $text $textOptions) }}
+{{ end }}
+
+{{ return $featured }} \ No newline at end of file
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/opengraph.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/opengraph.html
new file mode 100644
index 000000000..c8ff64889
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/opengraph.html
@@ -0,0 +1,42 @@
+<meta property="og:title" content="{{ .Title }}" />
+<meta property="og:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end }}" />
+<meta property="og:type" content="{{ if .IsPage }}article{{ else }}website{{ end }}" />
+<meta property="og:url" content="{{ .Permalink }}" />
+
+{{- with $.Params.images -}}
+{{- range first 6 . }}<meta property="og:image" content="{{ . | absURL }}" />{{ end -}}
+{{- else -}}
+{{- $featured := partial "opengraph/get-featured-image.html" . }}
+{{- with $featured -}}
+<meta property="og:image" content="{{ $featured.Permalink }}"/>
+{{- else -}}
+{{- with $.Site.Params.images }}<meta property="og:image" content="{{ index . 0 | absURL }}"/>{{ end -}}
+{{- end -}}
+{{- end -}}
+
+{{- if .IsPage }}
+{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}}
+<meta property="article:section" content="{{ .Section }}" />
+{{ with .PublishDate }}<meta property="article:published_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
+{{ with .Lastmod }}<meta property="article:modified_time" {{ .Format $iso8601 | printf "content=%q" | safeHTMLAttr }} />{{ end }}
+{{- end -}}
+
+{{- with .Params.audio }}<meta property="og:audio" content="{{ . }}" />{{ end }}
+{{- with .Params.locale }}<meta property="og:locale" content="{{ . }}" />{{ end }}
+{{- with .Site.Params.title }}<meta property="og:site_name" content="{{ . }}" />{{ end }}
+{{- with .Params.videos }}{{- range . }}
+<meta property="og:video" content="{{ . | absURL }}" />
+{{ end }}{{ end }}
+
+{{- /* If it is part of a series, link to related articles */}}
+{{- $permalink := .Permalink }}
+{{- $siteSeries := .Site.Taxonomies.series }}
+{{ with .Params.series }}{{- range $name := . }}
+ {{- $series := index $siteSeries ($name | urlize) }}
+ {{- range $page := first 6 $series.Pages }}
+ {{- if ne $page.Permalink $permalink }}<meta property="og:see_also" content="{{ $page.Permalink }}" />{{ end }}
+ {{- end }}
+{{ end }}{{ end }}
+
+{{- /* Facebook Page Admin ID for Domain Insights */}}
+{{- with .Site.Social.facebook_admin }}<meta property="fb:admins" content="{{ . }}" />{{ end }} \ No newline at end of file
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/twitter_cards.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/twitter_cards.html
new file mode 100644
index 000000000..9d25d0315
--- /dev/null
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/opengraph/twitter_cards.html
@@ -0,0 +1,22 @@
+{{- with $.Params.images -}}
+<meta name="twitter:card" content="summary_large_image"/>
+<meta name="twitter:image" content="{{ index . 0 | absURL }}"/>
+{{ else -}}
+{{- $featured := partial "opengraph/get-featured-image.html" . }}
+{{- with $featured -}}
+<meta name="twitter:card" content="summary_large_image"/>
+<meta name="twitter:image" content="{{ $featured.Permalink }}"/>
+{{- else -}}
+{{- with $.Site.Params.images -}}
+<meta name="twitter:card" content="summary_large_image"/>
+<meta name="twitter:image" content="{{ index . 0 | absURL }}"/>
+{{ else -}}
+<meta name="twitter:card" content="summary"/>
+{{- end -}}
+{{- end -}}
+{{- end }}
+<meta name="twitter:title" content="{{ .Title }}"/>
+<meta name="twitter:description" content="{{ with .Description }}{{ . }}{{ else }}{{if .IsPage}}{{ .Summary }}{{ else }}{{ with .Site.Params.description }}{{ . }}{{ end }}{{ end }}{{ end -}}"/>
+{{ with .Site.Social.twitter -}}
+<meta name="twitter:site" content="@{{ . }}"/>
+{{ end -}} \ No newline at end of file
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-footer.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-footer.html
index cff476788..e54184996 100644
--- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-footer.html
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-footer.html
@@ -41,7 +41,7 @@
<img src="/images/gopher-side_color.svg" alt="" class="absolute-l bottom-0 dn db-l h4 right-0 z-999"/>
- <div class="bg-primary-color-dark bottom-0 left-0 right-0 dn-l fixed pb3 ph3 w-100">
+ <div class="bg-primary-color-dark bottom-0 left-0 right-0 dn-l fixed pb3 ph3 pt3 w-100">
{{- partial "nav-mobile.html" . -}}
</div>
diff --git a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html
index b6c521dc9..8c97ac454 100644
--- a/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html
+++ b/docs/_vendor/github.com/gohugoio/gohugoioTheme/layouts/partials/site-search.html
@@ -3,4 +3,4 @@
<label class="clip" for="search-input">Search</label>
<input type="search" id="search-input" class="needs-js bg-left bn f5 input-reset lh-solid mt3 mt0-ns pl4 pv2 w5 white" placeholder="Search the Docs" name="search-input" value="" style="background: url('/images/icon-search.png') 5px 11px/16px 16px no-repeat; background-color: rgba(255,255,255,0);">
</fieldset>
-</form> \ No newline at end of file
+</form>