From 86b0d0c422e34c38837b5b5495ad6d295d0e73d2 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Mon, 1 Sep 2025 11:27:12 -0700 Subject: Squashed 'themes/PaperMod/' content from commit 5a46517 git-subtree-dir: themes/PaperMod git-subtree-split: 5a4651783fa9159123d947bd3511b355146d4797 --- layouts/partials/index_profile.html | 58 +++++++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 layouts/partials/index_profile.html (limited to 'layouts/partials/index_profile.html') diff --git a/layouts/partials/index_profile.html b/layouts/partials/index_profile.html new file mode 100644 index 0000000..6882f39 --- /dev/null +++ b/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}} +
-- cgit v1.3.1