From 15e3dedcee1d0830871ffc692143318a87646101 Mon Sep 17 00:00:00 2001 From: Christian Segundo Date: Thu, 25 Jul 2024 02:12:22 +0200 Subject: wip --- .../adityatelange/hugo-PaperMod/layouts/404.html | 3 + .../layouts/_default/_markup/render-image.html | 1 + .../hugo-PaperMod/layouts/_default/archives.html | 83 ++ .../hugo-PaperMod/layouts/_default/baseof.html | 27 + .../hugo-PaperMod/layouts/_default/index.json | 7 + .../hugo-PaperMod/layouts/_default/list.html | 121 +++ .../hugo-PaperMod/layouts/_default/rss.xml | 83 ++ .../hugo-PaperMod/layouts/_default/search.html | 29 + .../hugo-PaperMod/layouts/_default/single.html | 65 ++ .../hugo-PaperMod/layouts/_default/terms.html | 27 + .../layouts/partials/anchored_headings.html | 2 + .../hugo-PaperMod/layouts/partials/author.html | 9 + .../layouts/partials/breadcrumbs.html | 19 + .../hugo-PaperMod/layouts/partials/comments.html | 3 + .../hugo-PaperMod/layouts/partials/cover.html | 43 + .../hugo-PaperMod/layouts/partials/edit_post.html | 8 + .../layouts/partials/extend_footer.html | 3 + .../layouts/partials/extend_head.html | 4 + .../hugo-PaperMod/layouts/partials/footer.html | 144 ++++ .../hugo-PaperMod/layouts/partials/head.html | 157 ++++ .../hugo-PaperMod/layouts/partials/header.html | 149 ++++ .../hugo-PaperMod/layouts/partials/home_info.html | 13 + .../layouts/partials/index_profile.html | 58 ++ .../layouts/partials/post_canonical.html | 9 + .../hugo-PaperMod/layouts/partials/post_meta.html | 23 + .../layouts/partials/post_nav_links.html | 19 + .../layouts/partials/share_icons.html | 95 +++ .../layouts/partials/social_icons.html | 8 + .../hugo-PaperMod/layouts/partials/svg.html | 940 +++++++++++++++++++++ .../partials/templates/_funcs/get-page-images.html | 47 ++ .../layouts/partials/templates/opengraph.html | 59 ++ .../layouts/partials/templates/schema_json.html | 124 +++ .../layouts/partials/templates/twitter_cards.html | 38 + .../hugo-PaperMod/layouts/partials/toc.html | 97 +++ .../layouts/partials/translation_list.html | 19 + .../adityatelange/hugo-PaperMod/layouts/robots.txt | 7 + .../hugo-PaperMod/layouts/shortcodes/collapse.html | 8 + .../hugo-PaperMod/layouts/shortcodes/figure.html | 31 + .../layouts/shortcodes/inTextImg.html | 5 + .../hugo-PaperMod/layouts/shortcodes/ltr.html | 15 + .../hugo-PaperMod/layouts/shortcodes/rawhtml.html | 2 + .../hugo-PaperMod/layouts/shortcodes/rtl.html | 15 + 42 files changed, 2619 insertions(+) create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/404.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/_markup/render-image.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/archives.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/baseof.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/index.json create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/list.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/rss.xml create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/search.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/single.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/terms.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/anchored_headings.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/author.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/breadcrumbs.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/comments.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/cover.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/edit_post.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/extend_footer.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/extend_head.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/footer.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/head.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/header.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/home_info.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/index_profile.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/post_canonical.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/post_meta.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/post_nav_links.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/share_icons.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/social_icons.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/svg.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/_funcs/get-page-images.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/opengraph.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/schema_json.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/twitter_cards.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/toc.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/translation_list.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/robots.txt create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/collapse.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/figure.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/inTextImg.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/ltr.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/rawhtml.html create mode 100644 _vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/rtl.html (limited to '_vendor/github.com/adityatelange/hugo-PaperMod/layouts') diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/404.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/404.html new file mode 100644 index 0000000..a405573 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/404.html @@ -0,0 +1,3 @@ +{{- define "main" }} +
404
+{{- end }}{{/* end main */ -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/_markup/render-image.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/_markup/render-image.html new file mode 100644 index 0000000..1acb87d --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/_markup/render-image.html @@ -0,0 +1 @@ +{{ .Text }} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/archives.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/archives.html new file mode 100644 index 0000000..eea3fc8 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/archives.html @@ -0,0 +1,83 @@ +{{- define "main" }} + + + +{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} + +{{- if site.Params.ShowAllPagesInArchive }} +{{- $pages = site.RegularPages }} +{{- end }} + +{{- range $pages.GroupByPublishDate "2006" }} +{{- if ne .Key "0001" }} +
+ {{- $year := replace .Key "0001" "" }} +

+ + {{- $year -}} + +  {{ len .Pages }} +

+ {{- range .Pages.GroupByDate "January" }} +
+

+ + {{- .Key -}} + +  {{ len .Pages }} +

+
+ {{- range .Pages }} + {{- if eq .Kind "page" }} +
+

+ {{- .Title | markdownify }} + {{- if .Draft }} + + + + + + {{- end }} +

+
+ {{- partial "post_meta.html" . -}} +
+ +
+ {{- end }} + {{- end }} +
+
+ {{- end }} +
+{{- end }} +{{- end }} + +{{- end }}{{/* end main */}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/baseof.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/baseof.html new file mode 100644 index 0000000..df611bf --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/baseof.html @@ -0,0 +1,27 @@ +{{- if lt hugo.Version "0.112.4" }} +{{- errorf "=> hugo v0.112.4 or greater is required for hugo-PaperMod to build " }} +{{- end -}} + + + + + + {{- partial "head.html" . }} + + + + {{- partialCached "header.html" . .Page -}} +
+ {{- block "main" . }}{{ end }} +
+ {{ partialCached "footer.html" . .Layout .Kind (.Param "hideFooter") (.Param "ShowCodeCopyButtons") -}} + + + diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/index.json b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/index.json new file mode 100644 index 0000000..feeb437 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/index.json @@ -0,0 +1,7 @@ +{{- $.Scratch.Add "index" slice -}} +{{- range site.RegularPages -}} + {{- if and (not .Params.searchHidden) (ne .Layout `archives`) (ne .Layout `search`) }} + {{- $.Scratch.Add "index" (dict "title" .Title "content" .Plain "permalink" .Permalink "summary" .Summary) -}} + {{- end }} +{{- end -}} +{{- $.Scratch.Get "index" | jsonify -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/list.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/list.html new file mode 100644 index 0000000..81aea6e --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/list.html @@ -0,0 +1,121 @@ +{{- define "main" }} + +{{- if (and site.Params.profileMode.enabled .IsHome) }} +{{- partial "index_profile.html" . }} +{{- else }} {{/* if not profileMode */}} + +{{- if not .IsHome | and .Title }} + +{{- end }} + +{{- if .Content }} +
+ {{- if not (.Param "disableAnchoredHeadings") }} + {{- partial "anchored_headings.html" .Content -}} + {{- else }}{{ .Content }}{{ end }} +
+{{- end }} + +{{- $pages := union .RegularPages .Sections }} + +{{- if .IsHome }} +{{- $pages = where site.RegularPages "Type" "in" site.Params.mainSections }} +{{- $pages = where $pages "Params.hiddenInHomeList" "!=" "true" }} +{{- end }} + +{{- $paginator := .Paginate $pages }} + +{{- if and .IsHome site.Params.homeInfoParams (eq $paginator.PageNumber 1) }} +{{- partial "home_info.html" . }} +{{- end }} + +{{- $term := .Data.Term }} +{{- range $index, $page := $paginator.Pages }} + +{{- $class := "post-entry" }} + +{{- $user_preferred := or site.Params.disableSpecial1stPost site.Params.homeInfoParams }} +{{- if (and $.IsHome (eq $paginator.PageNumber 1) (eq $index 0) (not $user_preferred)) }} +{{- $class = "first-entry" }} +{{- else if $term }} +{{- $class = "post-entry tag-entry" }} +{{- end }} + +
+ {{- $isHidden := (.Param "cover.hiddenInList") | default (.Param "cover.hidden") | default false }} + {{- partial "cover.html" (dict "cxt" . "IsSingle" false "isHidden" $isHidden) }} +
+

+ {{- .Title }} + {{- if .Draft }} + + + + + + {{- end }} +

+
+ {{- if (ne (.Param "hideSummary") true) }} +
+

{{ .Summary | plainify | htmlUnescape }}{{ if .Truncated }}...{{ end }}

+
+ {{- end }} + {{- if not (.Param "hideMeta") }} + + {{- end }} + +
+{{- end }} + +{{- if gt $paginator.TotalPages 1 }} + +{{- end }} + +{{- end }}{{/* end profileMode */}} + +{{- end }}{{- /* end main */ -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/rss.xml b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/rss.xml new file mode 100644 index 0000000..fed8ae9 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/rss.xml @@ -0,0 +1,83 @@ +{{- /* Deprecate site.Author.email in favor of site.Params.author.email */}} +{{- $authorEmail := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .email }} + {{- $authorEmail = . }} + {{- end }} + {{- end }} +{{- else }} + {{- with site.Author.email }} + {{- $authorEmail = . }} + {{- warnf "The author key in site configuration is deprecated. Use params.author.email instead." }} + {{- end }} +{{- end }} + +{{- /* Deprecate site.Author.name in favor of site.Params.author.name */}} +{{- $authorName := "" }} +{{- with site.Params.author }} + {{- if reflect.IsMap . }} + {{- with .name }} + {{- $authorName = . }} + {{- end }} + {{- else }} + {{- $authorName = . }} + {{- end }} +{{- else }} + {{- with site.Author.name }} + {{- $authorName = . }} + {{- warnf "The author key in site configuration is deprecated. Use params.author.name instead." }} + {{- end }} +{{- end }} + +{{- $pctx := . }} +{{- if .IsHome }}{{ $pctx = site }}{{ end }} +{{- $pages := slice }} +{{- if or $.IsHome $.IsSection }} +{{- $pages = $pctx.RegularPages }} +{{- else }} +{{- $pages = $pctx.Pages }} +{{- end }} +{{- $limit := site.Config.Services.RSS.Limit }} +{{- if ge $limit 1 }} +{{- $pages = $pages | first $limit }} +{{- end }} +{{- printf "" | safeHTML }} + + + {{ if eq .Title site.Title }}{{ site.Title }}{{ else }}{{ with .Title }}{{ . }} on {{ end }}{{ site.Title }}{{ end }} + {{ .Permalink }} + Recent content {{ if ne .Title site.Title }}{{ with .Title }}in {{ . }} {{ end }}{{ end }}on {{ site.Title }} + {{- with site.Params.images }} + + {{ site.Title }} + {{ index . 0 | absURL }} + {{ index . 0 | absURL }} + + {{- end }} + Hugo -- {{ hugo.Version }} + {{ site.Language.LanguageCode }}{{ with $authorEmail }} + {{.}}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with $authorEmail }} + {{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }}{{ with site.Copyright }} + {{ . | markdownify | plainify | strings.TrimPrefix "© " }}{{ end }}{{ if not .Date.IsZero }} + {{ (index $pages.ByLastmod.Reverse 0).Lastmod.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }}{{ end }} + {{- with .OutputFormats.Get "RSS" }} + {{ printf "" .Permalink .MediaType | safeHTML }} + {{- end }} + {{- range $pages }} + {{- if and (ne .Layout `search`) (ne .Layout `archives`) }} + + {{ .Title }} + {{ .Permalink }} + {{ .PublishDate.Format "Mon, 02 Jan 2006 15:04:05 -0700" | safeHTML }} + {{- with $authorEmail }}{{ . }}{{ with $authorName }} ({{ . }}){{ end }}{{ end }} + {{ .Permalink }} + {{ with .Description | html }}{{ . }}{{ else }}{{ .Summary | html }}{{ end -}} + {{- if and site.Params.ShowFullTextinRSS .Content }} + {{ (printf "" .Content) | safeHTML }} + {{- end }} + + {{- end }} + {{- end }} + + diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/search.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/search.html new file mode 100644 index 0000000..bb7d436 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/search.html @@ -0,0 +1,29 @@ +{{- define "main" }} + + + + + +{{- end }}{{/* end main */}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/single.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/single.html new file mode 100644 index 0000000..19a624f --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/single.html @@ -0,0 +1,65 @@ +{{- define "main" }} + +
+
+ {{ partial "breadcrumbs.html" . }} +

+ {{ .Title }} + {{- if .Draft }} + + + + + + {{- end }} +

+ {{- if .Description }} +
+ {{ .Description }} +
+ {{- end }} + {{- if not (.Param "hideMeta") }} + + {{- end }} +
+ {{- $isHidden := (.Param "cover.hiddenInSingle") | default (.Param "cover.hidden") | default false }} + {{- partial "cover.html" (dict "cxt" . "IsSingle" true "isHidden" $isHidden) }} + {{- if (.Param "ShowToc") }} + {{- partial "toc.html" . }} + {{- end }} + + {{- if .Content }} +
+ {{- if not (.Param "disableAnchoredHeadings") }} + {{- partial "anchored_headings.html" .Content -}} + {{- else }}{{ .Content }}{{ end }} +
+ {{- end }} + + + + {{- if (.Param "comments") }} + {{- partial "comments.html" . }} + {{- end }} +
+ +{{- end }}{{/* end main */}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/terms.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/terms.html new file mode 100644 index 0000000..6fd2654 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/_default/terms.html @@ -0,0 +1,27 @@ +{{- define "main" }} + +{{- if .Title }} + +{{- end }} + + + +{{- end }}{{/* end main */ -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/anchored_headings.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/anchored_headings.html new file mode 100644 index 0000000..377af89 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/anchored_headings.html @@ -0,0 +1,2 @@ +{{- /* formats .Content headings by adding an anchor */ -}} +{{ . | replaceRE "()" "${1}${3}" | safeHTML }} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/author.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/author.html new file mode 100644 index 0000000..8f2758f --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/author.html @@ -0,0 +1,9 @@ +{{- if or .Params.author site.Params.author }} +{{- $author := (.Params.author | default site.Params.author) }} +{{- $author_type := (printf "%T" $author) }} +{{- if (or (eq $author_type "[]string") (eq $author_type "[]interface {}")) }} +{{- (delimit $author ", " ) }} +{{- else }} +{{- $author }} +{{- end }} +{{- end -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/breadcrumbs.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/breadcrumbs.html new file mode 100644 index 0000000..2686ca0 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/breadcrumbs.html @@ -0,0 +1,19 @@ +{{- if (.Param "ShowBreadCrumbs") -}} + +{{- end -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/comments.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/comments.html new file mode 100644 index 0000000..918451a --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/comments.html @@ -0,0 +1,3 @@ +{{- /* Comments area start */ -}} +{{- /* to add comments read => https://gohugo.io/content-management/comments/ */ -}} +{{- /* Comments area end */ -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/cover.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/cover.html new file mode 100644 index 0000000..e92b555 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/cover.html @@ -0,0 +1,43 @@ +{{- with .cxt}} {{/* Apply proper context from dict */}} +{{- if (and .Params.cover.image (not $.isHidden)) }} +{{- $alt := (.Params.cover.alt | default .Params.cover.caption | plainify) }} +{{- $loading := cond $.IsSingle "eager" "lazy" }} +
+ {{- $responsiveImages := (.Params.cover.responsiveImages | default site.Params.cover.responsiveImages) | default true }} + {{- $addLink := (and site.Params.cover.linkFullImages $.IsSingle) }} + {{- $pageBundleCover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} + {{- $globalResourcesCover := (resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }} + {{- $cover := (or $pageBundleCover $globalResourcesCover)}} + {{- if $cover -}}{{/* i.e it is present in page bundle */}} + {{- if $addLink }}{{ end -}} + {{- $sizes := (slice "360" "480" "720" "1080" "1500") }} + {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} + {{- if hugo.IsExtended -}} + {{- $processableFormats = $processableFormats | append "webp" -}} + {{- end -}} + {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} + {{- if (and (in $processableFormats $cover.MediaType.SubType) ($responsiveImages) (eq $prod true)) }} + {{ $alt }} + {{- else }}{{/* Unprocessable image or responsive images disabled */}} + {{ $alt }} + {{- end }} + {{- else }}{{/* For absolute urls and external links, no img processing here */}} + {{- if $addLink }}{{ end -}} + {{ $alt }} + {{- end }} + {{- if $addLink }}{{ end -}} + {{/* Display Caption */}} + {{- if $.IsSingle }} + {{ with .Params.cover.caption }}

{{ . | markdownify }}

{{- end }} + {{- end }} +
+{{- end }}{{/* End image */}} +{{- end -}}{{/* End context */ -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/edit_post.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/edit_post.html new file mode 100644 index 0000000..4f2c4de --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/edit_post.html @@ -0,0 +1,8 @@ +{{- if and (or .Params.editPost.URL site.Params.editPost.URL) (not (.Param "editPost.disabled")) -}} +{{- $fileUrlPath := path.Join .File.Path }} + +{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}} + + {{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}} + +{{- end }} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/extend_footer.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/extend_footer.html new file mode 100644 index 0000000..0519748 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/extend_footer.html @@ -0,0 +1,3 @@ +{{- /* Footer custom content area start */ -}} +{{- /* Insert any custom code web-analytics, resources, etc. here */ -}} +{{- /* Footer custom content area end */ -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/extend_head.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/extend_head.html new file mode 100644 index 0000000..150cbef --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/extend_head.html @@ -0,0 +1,4 @@ +{{- /* Head custom content area start */ -}} +{{- /* Insert any custom code (web-analytics, resources, etc.) - it will appear in the section of every page. */ -}} +{{- /* Can be overwritten by partial with the same name in the global layouts. */ -}} +{{- /* Head custom content area end */ -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/footer.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/footer.html new file mode 100644 index 0000000..832cdba --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/footer.html @@ -0,0 +1,144 @@ +{{- if not (.Param "hideFooter") }} + +{{- end }} + +{{- if (not site.Params.disableScrollToTop) }} + + + + + +{{- end }} + +{{- partial "extend_footer.html" . }} + + + +{{- if (not site.Params.disableScrollToTop) }} + +{{- end }} + +{{- if (not site.Params.disableThemeToggle) }} + +{{- end }} + +{{- if (and (eq .Kind "page") (ne .Layout "archives") (ne .Layout "search") (.Param "ShowCodeCopyButtons")) }} + +{{- end }} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/head.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/head.html new file mode 100644 index 0000000..3e55c67 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/head.html @@ -0,0 +1,157 @@ + + + +{{- if hugo.IsProduction | or (eq site.Params.env "production") | and (ne .Params.robotsNoIndex true) }} + +{{- else }} + +{{- end }} + +{{- /* Title */}} +{{ if .IsHome }}{{ else }}{{ if .Title }}{{ .Title }} | {{ end }}{{ end }}{{ site.Title }} + +{{- /* Meta */}} +{{- if .IsHome }} +{{ with site.Params.keywords -}}{{ end }} +{{- else }} + +{{- end }} + + + +{{- if site.Params.analytics.google.SiteVerificationTag }} + +{{- end }} +{{- if site.Params.analytics.yandex.SiteVerificationTag }} + +{{- end }} +{{- if site.Params.analytics.bing.SiteVerificationTag }} + +{{- end }} +{{- if site.Params.analytics.naver.SiteVerificationTag }} + +{{- end }} + +{{- /* Styles */}} + +{{- /* includes */}} +{{- $includes := slice }} +{{- $includes = $includes | append (" " | resources.FromString "assets/css/includes-blank.css")}} + +{{- if not (eq site.Params.assets.disableScrollBarStyle true) }} + {{- $ScrollStyle := (resources.Get "css/includes/scroll-bar.css") }} + {{- $includes = (append $ScrollStyle $includes) }} +{{- end }} + +{{- $includes_all := $includes | resources.Concat "assets/css/includes.css" }} + +{{- $theme_vars := (resources.Get "css/core/theme-vars.css") }} +{{- $reset := (resources.Get "css/core/reset.css") }} +{{- $media := (resources.Get "css/core/zmedia.css") }} +{{- $license_css := (resources.Get "css/core/license.css") }} +{{- $common := (resources.Match "css/common/*.css") | resources.Concat "assets/css/common.css" }} + +{{- /* markup.highlight.noClasses should be set to `false` */}} +{{- $chroma_styles := (resources.Get "css/includes/chroma-styles.css") }} +{{- $chroma_mod := (resources.Get "css/includes/chroma-mod.css") }} + +{{- /* order is important */}} +{{- $core := (slice $theme_vars $reset $common $chroma_styles $chroma_mod $includes_all $media) | resources.Concat "assets/css/core.css" | resources.Minify }} +{{- $extended := (resources.Match "css/extended/*.css") | resources.Concat "assets/css/extended.css" | resources.Minify }} + +{{- /* bundle all required css */}} +{{- /* Add extended css after theme style */ -}} +{{- $stylesheet := (slice $license_css $core $extended) | resources.Concat "assets/css/stylesheet.css" }} + +{{- if not site.Params.assets.disableFingerprinting }} +{{- $stylesheet := $stylesheet | fingerprint }} + +{{- else }} + +{{- end }} + +{{- /* Search */}} +{{- if (eq .Layout `search`) -}} + +{{- $fastsearch := resources.Get "js/fastsearch.js" | js.Build (dict "params" (dict "fuseOpts" site.Params.fuseOpts)) | resources.Minify }} +{{- $fusejs := resources.Get "js/fuse.basic.min.js" }} +{{- $license_js := resources.Get "js/license.js" }} +{{- if not site.Params.assets.disableFingerprinting }} +{{- $search := (slice $fusejs $license_js $fastsearch ) | resources.Concat "assets/js/search.js" | fingerprint }} + +{{- else }} +{{- $search := (slice $fusejs $fastsearch ) | resources.Concat "assets/js/search.js" }} + +{{- end }} +{{- end -}} + +{{- /* Favicons */}} + + + + + + + + +{{- /* RSS */}} +{{ range .AlternativeOutputFormats -}} + +{{ end -}} +{{- range .AllTranslations -}} + +{{ end -}} + + + +{{- partial "extend_head.html" . -}} + +{{- /* Misc */}} +{{- if hugo.IsProduction | or (eq site.Params.env "production") }} +{{- template "_internal/google_analytics.html" . }} +{{- template "partials/templates/opengraph.html" . }} +{{- template "partials/templates/twitter_cards.html" . }} +{{- template "partials/templates/schema_json.html" . }} +{{- end -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/header.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/header.html new file mode 100644 index 0000000..44336e1 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/header.html @@ -0,0 +1,149 @@ +{{- /* theme-toggle is enabled */}} +{{- if (not site.Params.disableThemeToggle) }} +{{- /* theme is light */}} +{{- if (eq site.Params.defaultTheme "light") }} + +{{- /* theme is dark */}} +{{- else if (eq site.Params.defaultTheme "dark") }} + +{{- else }} +{{- /* theme is auto */}} + +{{- end }} +{{- /* theme-toggle is disabled and theme is auto */}} +{{- else if (and (ne site.Params.defaultTheme "light") (ne site.Params.defaultTheme "dark"))}} + +{{- end }} + +
+ +
diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/home_info.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/home_info.html new file mode 100644 index 0000000..199dfb7 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/home_info.html @@ -0,0 +1,13 @@ +{{- with site.Params.homeInfoParams }} +
+
+

{{ .Title | markdownify }}

+
+
+ {{ .Content | markdownify }} +
+
+ {{ partial "social_icons.html" (dict "align" site.Params.homeInfoParams.AlignSocialIconsTo) }} +
+
+{{- end -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/index_profile.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/index_profile.html new file mode 100644 index 0000000..6882f39 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/index_profile.html @@ -0,0 +1,58 @@ +
+ {{- with site.Params.profileMode }} +
+ {{- if .imageUrl -}} + {{- $img := "" }} + {{- if not (urls.Parse .imageUrl).IsAbs }} + {{- $img = resources.Get .imageUrl }} + {{- end }} + {{- if $img }} + {{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}} + {{- if hugo.IsExtended -}} + {{- $processableFormats = $processableFormats | append "webp" -}} + {{- end -}} + {{- $prod := (hugo.IsProduction | or (eq site.Params.env "production")) }} + {{- if and (in $processableFormats $img.MediaType.SubType) (eq $prod true)}} + {{- if (not (and (not .imageHeight) (not .imageWidth))) }} + {{- $img = $img.Resize (printf "%dx%d" .imageWidth .imageHeight) }} + {{- else if .imageHeight }} + {{- $img = $img.Resize (printf "x%d" .imageHeight) }} + {{ else if .imageWidth }} + {{- $img = $img.Resize (printf "%dx" .imageWidth) }} + {{ else }} + {{- $img = $img.Resize "150x150" }} + {{- end }} + {{- end }} + {{ .imageTitle | default + {{- else }} + {{ .imageTitle | default + {{- end }} + {{- end }} +

{{ .title | default site.Title | markdownify }}

+ {{ .subtitle | markdownify }} + {{- partial "social_icons.html" -}} + + {{- with .buttons }} + + {{- end }} +
+ {{- end}} +
diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/post_canonical.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/post_canonical.html new file mode 100644 index 0000000..abfc1e3 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/post_canonical.html @@ -0,0 +1,9 @@ +{{ if and (.Params.canonicalURL) (.Params.ShowCanonicalLink ) -}} +{{ $url := urls.Parse .Params.canonicalURL }} + +{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated (or .Params.editPost.URL site.Params.editPost.URL) }} | {{- end -}} + + {{- (site.Params.CanonicalLinkText | default .Params.CanonicalLinkText) | default "Originally published at" -}} +  {{ $url.Host }} + +{{- end }} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/post_meta.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/post_meta.html new file mode 100644 index 0000000..b0c0417 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/post_meta.html @@ -0,0 +1,23 @@ +{{- $scratch := newScratch }} + +{{- if not .Date.IsZero -}} +{{- $scratch.Add "meta" (slice (printf "%s" (.Date) (.Date | time.Format (default "January 2, 2006" site.Params.DateFormat)))) }} +{{- end }} + +{{- if (.Param "ShowReadingTime") -}} +{{- $scratch.Add "meta" (slice (i18n "read_time" .ReadingTime | default (printf "%d min" .ReadingTime))) }} +{{- end }} + +{{- if (.Param "ShowWordCount") -}} +{{- $scratch.Add "meta" (slice (i18n "words" .WordCount | default (printf "%d words" .WordCount))) }} +{{- end }} + +{{- if not (.Param "hideAuthor") -}} +{{- with (partial "author.html" .) }} +{{- $scratch.Add "meta" (slice .) }} +{{- end }} +{{- end }} + +{{- with ($scratch.Get "meta") }} +{{- delimit . " · " | safeHTML -}} +{{- end -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/post_nav_links.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/post_nav_links.html new file mode 100644 index 0000000..b988641 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/post_nav_links.html @@ -0,0 +1,19 @@ +{{- $pages := where site.RegularPages "Type" "in" site.Params.mainSections }} +{{- if and (gt (len $pages) 1) (in $pages . ) }} + +{{- end }} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/share_icons.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/share_icons.html new file mode 100644 index 0000000..910ba7f --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/share_icons.html @@ -0,0 +1,95 @@ +{{- $pageurl := .Permalink }} +{{- $title := .Title }} + +{{- $.Scratch.Set "tags" ""}} + +{{- with .Params.Tags }} +{{- $hashtags := newScratch}} +{{- range . }}{{ $hashtags.Add "tags" (slice (replaceRE "(\\s)" "" . ))}}{{end}} +{{- $.Scratch.Set "tags" (delimit ($hashtags.Get "tags") ",") }} +{{- end -}} + +{{- $custom := false }} +{{- $ShareButtons := (.Param "ShareButtons")}} +{{- with $ShareButtons }}{{ $custom = true }}{{ end }} + + diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/social_icons.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/social_icons.html new file mode 100644 index 0000000..ce76a30 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/social_icons.html @@ -0,0 +1,8 @@ +
+ {{- range site.Params.socialIcons }} + + {{ partial "svg.html" . }} + + {{- end }} +
diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/svg.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/svg.html new file mode 100644 index 0000000..755929b --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/svg.html @@ -0,0 +1,940 @@ +{{- $icon_name := ( trim .name " " | lower )}} +{{- if (eq $icon_name "123rf") -}} + + + + +{{- else if (eq $icon_name "500px") -}} + + + +{{- else if (eq $icon_name "adobestock") -}} + + + + +{{- else if (eq $icon_name "anilist") -}} + + + +{{- else if or (eq $icon_name "ao3") (eq $icon_name "archiveofourown") -}} + + + + + + +{{- else if (eq $icon_name "applemusic") -}} + + + +{{- else if (eq $icon_name "applepodcasts") -}} + + + +{{- else if (eq $icon_name "bandcamp") -}} + + + +{{- else if (eq $icon_name "behance") -}} + + + +{{- else if (eq $icon_name "bilibili") -}} + + + + + + + +{{- else if (eq $icon_name "bitcoin") -}} + + + +{{- else if (eq $icon_name "bluesky") -}} + + + +{{- else if (eq $icon_name "bugcrowd") -}} + + + +{{- else if (eq $icon_name "buttondown") -}} + + + + + + + + + + +{{- else if (eq $icon_name "buymeacoffee") -}} + + + + + + + + + + + + + + + + +{{- else if (eq $icon_name "codeberg") -}} + + + +{{- else if (eq $icon_name "codeforces") -}} + + + +{{- else if (eq $icon_name "codepen") -}} + + + + + + + +{{- else if (eq $icon_name "credly") -}} + + + +{{- else if (eq $icon_name "cryptohack") -}} + + + + + + +{{- else if (eq $icon_name "ctftime") -}} + + + + + + +{{- else if (eq $icon_name "cv") -}} + + + + + + +{{- else if (eq $icon_name "deezer") -}} + + + +{{- else if (eq $icon_name "dev") -}} + + + +{{- else if (eq $icon_name "deviantart") -}} + + + +{{- else if (eq $icon_name "discogs") -}} + + + +{{- else if (eq $icon_name "discord") -}} + + + +{{- else if (eq $icon_name "douban") -}} + + + + + +{{- else if (eq $icon_name "dreamstime") -}} + + + +{{- else if (eq $icon_name "dribbble") -}} + + + + + +{{- else if (eq $icon_name "email") -}} + + + + +{{- else if (eq $icon_name "ethereum") -}} + + + +{{- else if (eq $icon_name "exercism") -}} + + + + +{{- else if (eq $icon_name "facebook") -}} + + + +{{- else if (eq $icon_name "fediverse") -}} + + + + + + + + + + +{{- else if (eq $icon_name "firefish") -}} + + + +{{- else if (eq $icon_name "flickr") -}} + + + +{{- else if (eq $icon_name "freepik") -}} + + + + + + +{{- else if (eq $icon_name "git") -}} + + + +{{- else if (eq $icon_name "gitea") -}} + + + +{{- else if (eq $icon_name "github") -}} + + + + +{{- else if (eq $icon_name "gitlab") -}} + + + + +{{- else if (eq $icon_name "goodreads") -}} + + + +{{- else if (eq $icon_name "googleplaystore") -}} + + + +{{- else if (eq $icon_name "googlepodcasts") -}} + + + +{{- else if (eq $icon_name "googlescholar") -}} + + + +{{- else if (eq $icon_name "gurushots") -}} + + + + + + + + + + + + +{{- else if (eq $icon_name "hackerone") -}} + + + +{{- else if (eq $icon_name "hackerrank") -}} + + + + + + +{{- else if (eq $icon_name "hackthebox") -}} + + + + + + +{{- else if (eq $icon_name "imdb") -}} + + + +{{- else if (eq $icon_name "instagram") -}} + + + + + +{{- else if (eq $icon_name "intigriti") -}} + + + +{{- else if (eq $icon_name "itchio") -}} + + + +{{- else if (eq $icon_name "juejin") -}} + + + +{{- else if (eq $icon_name "kaggle") -}} + + + +{{- else if (eq $icon_name "kakaotalk") -}} + + + + + + + +{{- else if (eq $icon_name "keybase") -}} + + + +{{- else if (eq $icon_name "keyoxide") -}} + + + + +{{- else if (eq $icon_name "kofi") -}} + + + +{{- else if (eq $icon_name "komoot") -}} + + + +{{- else if (eq $icon_name "lastfm") -}} + + + +{{- else if (eq $icon_name "leetcode") -}} + + + +{{- else if (eq $icon_name "letterboxd") -}} + + + +{{- else if (eq $icon_name "liberapay") -}} + + + + + + +{{- else if (eq $icon_name "lichess" ) -}} + + + +{{- else if (eq $icon_name "linkedin") -}} + + + + + +{{- else if (eq $icon_name "mastodon") -}} + + + + +{{- else if (eq $icon_name "matrix") -}} + + + +{{- else if (eq $icon_name "medium") -}} + + + + + +{{- else if (eq $icon_name "microblog") -}} + + + + + + +{{- else if (eq $icon_name "mixcloud") -}} + + + +{{- else if (eq $icon_name "monero") -}} + + + +{{- else if (eq $icon_name "neteasecloudmusic") -}} + + + +{{- else if (eq $icon_name "nuget") -}} + + + + + + + + +{{- else if (eq $icon_name "orcid") -}} + + + +{{- else if (eq $icon_name "osu!") -}} + + + + + + +{{- else if (eq $icon_name "overcast") -}} + + + +{{- else if (eq $icon_name "patreon") -}} + + + + + + +{{- else if (eq $icon_name "paypal") -}} + + + +{{- else if (eq $icon_name "peertube") -}} + + + +{{- else if or (eq $icon_name "pgpkey") (eq $icon_name "key") -}} + + + + +{{- else if (eq $icon_name "phone") -}} + + + + + +{{- else if (eq $icon_name "pinterest") -}} + + + +{{- else if (eq $icon_name "pixelfed") -}} + + + +{{- else if (eq $icon_name "pleroma") -}} + + + +{{- else if (eq $icon_name "pocketcasts") -}} + + + +{{- else if (eq $icon_name "polywork") -}} + + + +{{- else if (eq $icon_name "printables") -}} + + + +{{- else if (eq $icon_name "qq") -}} + + + + +{{- else if (eq $icon_name "reddit") -}} + + + +{{- else if (eq $icon_name "raycast") -}} + + + +{{- else if (eq $icon_name "researchgate") -}} + + + +{{- else if (eq $icon_name "rootme") -}} + + + + + + + + +{{- else if (eq $icon_name "rss") -}} + + + + + +{{- else if (eq $icon_name "serverfault") -}} + + + +{{- else if (eq $icon_name "sessionmessenger") -}} + + + + +{{- else if (eq $icon_name "shutterstock") -}} + + + + +{{- else if (eq $icon_name "signal") -}} + + + +{{- else if (eq $icon_name "sketchfab") -}} + + + +{{- else if (eq $icon_name "slack") -}} + + + + + + + +{{- else if (eq $icon_name "snapchat") -}} + + + +{{- else if (eq $icon_name "soundcloud") -}} + + + +{{- else if (eq $icon_name "sourcehut") -}} + + + + +{{- else if (eq $icon_name "spacehey") -}} + + + + + +{{- else if (eq $icon_name "spotify") -}} + + + +{{- else if (eq $icon_name "stackoverflow") -}} + + + +{{- else if (eq $icon_name "steam") -}} + + + + + + + + + +{{- else if (eq $icon_name "strava") -}} + + + + +{{- else if (eq $icon_name "substack") -}} + + + +{{- else if (eq $icon_name "tableau") -}} + + + + + + + + + + +{{- else if (eq $icon_name "telegram") -}} + + + +{{- else if (eq $icon_name "thingiverse") -}} + + + +{{- else if (eq $icon_name "threads") -}} + + + + +{{- else if (eq $icon_name "threema") -}} + + + + +{{- else if (eq $icon_name "tidal") -}} + + + +{{- else if (eq $icon_name "tiktok") -}} + + + +{{- else if (eq $icon_name "tryhackme") -}} + + + +{{- else if (eq $icon_name "tumblr") -}} + + + +{{- else if (eq $icon_name "twitch") -}} + + + +{{- else if (eq $icon_name "twitter") -}} + + + + +{{- else if (eq $icon_name "unsplash") -}} + + + + +{{- else if (eq $icon_name "vimeo") -}} + + + +{{- else if or (eq $icon_name "vk") (eq $icon_name "vkontakte") -}} + + + +{{- else if (eq $icon_name "wantedly") -}} + + + +{{- else if (eq $icon_name "wechat") -}} + + + + +{{- else if (eq $icon_name "wordpress") -}} + + + +{{- else if (eq $icon_name "x") -}} + + + + +{{- else if (eq $icon_name "xda") -}} + + + +{{- else if (eq $icon_name "xing") -}} + + + + +{{- else if (eq $icon_name "xmpp") -}} + + + + +{{- else if (eq $icon_name "ycombinator") -}} + + + +{{- else if (eq $icon_name "youtube") -}} + + + + + +{{- else if (eq $icon_name "zhihu") -}} + + + +{{- else if $icon_name -}} + + + + +{{- end -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/_funcs/get-page-images.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/_funcs/get-page-images.html new file mode 100644 index 0000000..268ceb4 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/_funcs/get-page-images.html @@ -0,0 +1,47 @@ +{{- $imgs := slice }} +{{- $imgParams := .Params.images }} +{{- $resources := .Resources.ByType "image" -}} +{{/* Find featured image resources if the images parameter is empty. */}} +{{- if not $imgParams }} + {{- $featured := $resources.GetMatch "*feature*" -}} + {{- if not $featured }}{{ $featured = $resources.GetMatch "{*cover*,*thumbnail*}" }}{{ end -}} + {{- with $featured }} + {{- $imgs = $imgs | append (dict + "Image" . + "RelPermalink" .RelPermalink + "Permalink" .Permalink) }} + {{- end }} +{{- end }} +{{/* Use the first one of site images as the fallback. */}} +{{- if and (not $imgParams) (not $imgs) }} + {{- with site.Params.images }} + {{- $imgParams = first 1 . }} + {{- end }} +{{- end }} +{{/* Parse page's images parameter. */}} +{{- range $imgParams }} + {{- $img := . }} + {{- $url := urls.Parse $img }} + {{- if eq $url.Scheme "" }} + {{/* Internal image. */}} + {{- with $resources.GetMatch $img -}} + {{/* Image resource. */}} + {{- $imgs = $imgs | append (dict + "Image" . + "RelPermalink" .RelPermalink + "Permalink" .Permalink) }} + {{- else }} + {{- $imgs = $imgs | append (dict + "RelPermalink" (relURL $img) + "Permalink" (absURL $img) + ) }} + {{- end }} + {{- else }} + {{/* External image */}} + {{- $imgs = $imgs | append (dict + "RelPermalink" $img + "Permalink" $img + ) }} + {{- end }} +{{- end }} +{{- return $imgs }} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/opengraph.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/opengraph.html new file mode 100644 index 0000000..95f037c --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/opengraph.html @@ -0,0 +1,59 @@ + + + + +{{- if .Params.cover.image -}} +{{- if (ne .Params.cover.relative true) }} + +{{- else}} + +{{- end}} +{{- else }} + +{{- $images := partial "partials/templates/_funcs/get-page-images" . -}} +{{- range first 6 $images }} + +{{ end -}} +{{- end }} + +{{- if .IsPage }} +{{- $iso8601 := "2006-01-02T15:04:05-07:00" -}} + +{{ with .PublishDate }}{{ end }} +{{ with .Lastmod }}{{ end }} +{{- end -}} + +{{- with .Params.audio }}{{ end }} +{{- with .Params.locale }}{{ end }} +{{- with site.Params.title }}{{ end }} +{{- with .Params.videos }}{{- range . }} + +{{ end }}{{ end }} + +{{- /* If it is part of a series, link to related articles */}} +{{- $permalink := .Permalink }} +{{- $siteSeries := site.Taxonomies.series }} +{{- if $siteSeries }} +{{ with .Params.series }}{{- range $name := . }} + {{- $series := index $siteSeries ($name | urlize) }} + {{- range $page := first 6 $series.Pages }} + {{- if ne $page.Permalink $permalink }}{{ end }} + {{- end }} +{{ end }}{{ end }} +{{- end }} + +{{- /* Deprecate site.Social.facebook_admin in favor of site.Params.social.facebook_admin */}} +{{- $facebookAdmin := "" }} +{{- with site.Params.social }} + {{- if reflect.IsMap . }} + {{- $facebookAdmin = .facebook_admin }} + {{- end }} +{{- else }} + {{- with site.Social.facebook_admin }} + {{- $facebookAdmin = . }} + {{- warnf "The social key in site configuration is deprecated. Use params.social.facebook_admin instead." }} + {{- end }} +{{- end }} + +{{- /* Facebook Page Admin ID for Domain Insights */}} +{{ with $facebookAdmin }}{{ end }} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/schema_json.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/schema_json.html new file mode 100644 index 0000000..ed4d689 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/schema_json.html @@ -0,0 +1,124 @@ +{{ if .IsHome }} + +{{- else if (or .IsPage .IsSection) }} +{{/* BreadcrumbList */}} +{{- $url := replace .Parent.Permalink ( printf "%s" site.Home.Permalink) "" }} +{{- $lang_url := strings.TrimPrefix ( printf "%s/" .Lang) $url }} +{{- $bc_list := (split $lang_url "/")}} + +{{- $scratch := newScratch }} + +{{- if .IsPage }} + +{{- end }}{{/* .IsPage end */}} + +{{- end -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/twitter_cards.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/twitter_cards.html new file mode 100644 index 0000000..46b0d04 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/templates/twitter_cards.html @@ -0,0 +1,38 @@ +{{- if .Params.cover.image -}} + +{{- if (ne $.Params.cover.relative true) }} + +{{- else }} + +{{- end}} +{{- else }} +{{- $images := partial "partials/templates/_funcs/get-page-images" . -}} +{{- with index $images 0 -}} + + +{{- else -}} + +{{- end -}} +{{- end }} + + +{{- /* Deprecate site.Social.twitter in favor of site.Params.social.twitter */}} +{{- $twitterSite := "" }} +{{- with site.Params.social }} + {{- if reflect.IsMap . }} + {{- $twitterSite = .twitter }} + {{- end }} +{{- else }} + {{- with site.Social.twitter }} + {{- $twitterSite = . }} + {{- warnf "The social key in site configuration is deprecated. Use params.social.twitter instead." }} + {{- end }} +{{- end }} + +{{- with $twitterSite }} + {{- $content := . }} + {{- if not (strings.HasPrefix . "@") }} + {{- $content = printf "@%v" $twitterSite }} + {{- end }} + +{{- end }} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/toc.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/toc.html new file mode 100644 index 0000000..28f8694 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/toc.html @@ -0,0 +1,97 @@ +{{- $headers := findRE "(.|\n])+?
" .Content -}} +{{- $has_headers := ge (len $headers) 1 -}} +{{- if $has_headers -}} +
+
+ + {{- i18n "toc" | default "Table of Contents" }} + + +
+ {{- if (.Param "UseHugoToc") }} + {{- .TableOfContents -}} + {{- else }} + {{- $largest := 6 -}} + {{- range $headers -}} + {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}} + {{- $headerLevel := len (seq $headerLevel) -}} + {{- if lt $headerLevel $largest -}} + {{- $largest = $headerLevel -}} + {{- end -}} + {{- end -}} + + {{- $firstHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers 0) 1) 0)) -}} + + {{- $.Scratch.Set "bareul" slice -}} +
    + {{- range seq (sub $firstHeaderLevel $largest) -}} +
      + {{- $.Scratch.Add "bareul" (sub (add $largest .) 1) -}} + {{- end -}} + {{- range $i, $header := $headers -}} + {{- $headerLevel := index (findRE "[1-6]" . 1) 0 -}} + {{- $headerLevel := len (seq $headerLevel) -}} + + {{/* get id="xyz" */}} + {{- $id := index (findRE "(id=\"(.*?)\")" $header 9) 0 }} + + {{- /* strip id="" to leave xyz, no way to get regex capturing groups in hugo */ -}} + {{- $cleanedID := replace (replace $id "id=\"" "") "\"" "" }} + {{- $header := replaceRE "((.|\n])+?)" "$1" $header -}} + + {{- if ne $i 0 -}} + {{- $prevHeaderLevel := index (findRE "[1-6]" (index $headers (sub $i 1)) 1) 0 -}} + {{- $prevHeaderLevel := len (seq $prevHeaderLevel) -}} + {{- if gt $headerLevel $prevHeaderLevel -}} + {{- range seq $prevHeaderLevel (sub $headerLevel 1) -}} +
        + {{/* the first should not be recorded */}} + {{- if ne $prevHeaderLevel . -}} + {{- $.Scratch.Add "bareul" . -}} + {{- end -}} + {{- end -}} + {{- else -}} + + {{- if lt $headerLevel $prevHeaderLevel -}} + {{- range seq (sub $prevHeaderLevel 1) -1 $headerLevel -}} + {{- if in ($.Scratch.Get "bareul") . -}} +
      + {{/* manually do pop item */}} + {{- $tmp := $.Scratch.Get "bareul" -}} + {{- $.Scratch.Delete "bareul" -}} + {{- $.Scratch.Set "bareul" slice}} + {{- range seq (sub (len $tmp) 1) -}} + {{- $.Scratch.Add "bareul" (index $tmp (sub . 1)) -}} + {{- end -}} + {{- else -}} +
    + + {{- end -}} + {{- end -}} + {{- end -}} + {{- end }} +
  • + {{- $header | plainify | safeHTML -}} + {{- else }} +
  • + {{- $header | plainify | safeHTML -}} + {{- end -}} + {{- end -}} + + {{- $firstHeaderLevel := $largest }} + {{- $lastHeaderLevel := len (seq (index (findRE "[1-6]" (index $headers (sub (len $headers) 1)) 1) 0)) }} +
  • + {{- range seq (sub $lastHeaderLevel $firstHeaderLevel) -}} + {{- if in ($.Scratch.Get "bareul") (add . $firstHeaderLevel) }} +
+ {{- else }} + + + {{- end -}} + {{- end }} + + {{- end }} +
+
+
+{{- end }} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/translation_list.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/translation_list.html new file mode 100644 index 0000000..0028251 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/partials/translation_list.html @@ -0,0 +1,19 @@ +{{- if .IsTranslated -}} +{{- if (ne .Layout "search") }} +{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) }} | {{- end -}} +{{- end }} +{{- i18n "translations" | default "Translations" }}: + +{{- end -}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/robots.txt b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/robots.txt new file mode 100644 index 0000000..f26f508 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/robots.txt @@ -0,0 +1,7 @@ +User-agent: * +{{- if hugo.IsProduction | or (eq site.Params.env "production") }} +Disallow: +{{- else }} +Disallow: / +{{- end }} +Sitemap: {{ "sitemap.xml" | absURL }} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/collapse.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/collapse.html new file mode 100644 index 0000000..17d8d3b --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/collapse.html @@ -0,0 +1,8 @@ +{{ if .Get "summary" }} +{{ else }} +{{ warnf "missing value for param 'summary': %s" .Position }} +{{ end }} +

+ {{ .Get "summary" | markdownify }} + {{ .Inner | markdownify }} +

diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/figure.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/figure.html new file mode 100644 index 0000000..8c93eff --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/figure.html @@ -0,0 +1,31 @@ + + {{- if .Get "link" -}} + + {{- end }} + {{ with .Get + {{- if .Get "link" }}{{ end -}} + {{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}} +
+ {{ with (.Get "title") -}} + {{ . }} + {{- end -}} + {{- if or (.Get "caption") (.Get "attr") -}}

+ {{- .Get "caption" | markdownify -}} + {{- with .Get "attrlink" }} + + {{- end -}} + {{- .Get "attr" | markdownify -}} + {{- if .Get "attrlink" }}{{ end }}

+ {{- end }} +
+ {{- end }} + diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/inTextImg.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/inTextImg.html new file mode 100644 index 0000000..0239fd6 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/inTextImg.html @@ -0,0 +1,5 @@ +{{- $Img := (.Get "url") }} +{{- $height := (.Get "height") }} +{{- $alt := (.Get "alt") }} + +{{$alt}} diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/ltr.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/ltr.html new file mode 100644 index 0000000..4ad7682 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/ltr.html @@ -0,0 +1,15 @@ +{{ $.Scratch.Set "md" false }} + +{{ if .IsNamedParams }} +{{ $.Scratch.Set "md" (.Get "md") }} +{{ else }} +{{ $.Scratch.Set "md" (.Get 0) }} +{{ end }} + +
+ {{ if eq ($.Scratch.Get "md") false }} + {{ .Inner }} + {{ else }} + {{ .Inner | markdownify }} + {{ end }} +
diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/rawhtml.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/rawhtml.html new file mode 100644 index 0000000..9350c13 --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/rawhtml.html @@ -0,0 +1,2 @@ + +{{- .Inner -}} \ No newline at end of file diff --git a/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/rtl.html b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/rtl.html new file mode 100644 index 0000000..a69b8ce --- /dev/null +++ b/_vendor/github.com/adityatelange/hugo-PaperMod/layouts/shortcodes/rtl.html @@ -0,0 +1,15 @@ +{{ $.Scratch.Set "md" false }} + +{{ if .IsNamedParams }} +{{ $.Scratch.Set "md" (.Get "md") }} +{{ else }} +{{ $.Scratch.Set "md" (.Get 0) }} +{{ end }} + +
+ {{ if eq ($.Scratch.Get "md") false }} + {{ .Inner }} + {{ else }} + {{ .Inner | markdownify }} + {{ end }} +
-- cgit v1.2.3