diff options
author | tdro <tdro@noreply.example.com> | 2022-11-14 08:37:26 -0500 |
---|---|---|
committer | tdro <tdro@noreply.example.com> | 2022-11-14 08:37:26 -0500 |
commit | db3820c0c5d84226e01d6f1dcef10929979935ba (patch) | |
tree | 5ca4d33841e518e2db1ace4c0486e46b1b907136 /themes | |
parent | e8d6280abb4b7cdfc03bec80af6506399e5fdf51 (diff) | |
download | canory-db3820c0c5d84226e01d6f1dcef10929979935ba.tar.gz canory-db3820c0c5d84226e01d6f1dcef10929979935ba.tar.bz2 canory-db3820c0c5d84226e01d6f1dcef10929979935ba.zip |
themes/default/layouts/partials/meta: Remove dead logic
Feed data self and markdown may no longer be needed
Diffstat (limited to 'themes')
4 files changed, 10 insertions, 23 deletions
diff --git a/themes/default/layouts/partials/meta-context-menu.html b/themes/default/layouts/partials/meta-context-menu.html index 26c3842..79ffacc 100644 --- a/themes/default/layouts/partials/meta-context-menu.html +++ b/themes/default/layouts/partials/meta-context-menu.html @@ -1,12 +1,7 @@ {{- $id := delimit (shuffle (seq 1 7)) "" -}} {{- $author := partial "function-authors-data.html" . -}} -{{- $href := print .Site.BaseURL "/" $author.user "/messages/" (path.Base .Permalink) "/" -}} -{{- $plain := print .Site.BaseURL "/" $author.user "/messages/" (path.Base .Permalink) "/index.txt" -}} - -{{- with .Params.feed.self -}} - {{- $href = print $.Site.BaseURL "/" $.Params.feed.self -}} - {{- $plain = print $.Site.BaseURL "/" $.Params.feed.self "/index.txt" -}} -{{- end -}} +{{- $href := print .Permalink -}} +{{- $plain := print $href "index.txt" -}} <micro-metadata-menu> <context-control> diff --git a/themes/default/layouts/partials/meta-markdown.html b/themes/default/layouts/partials/meta-markdown.html index ca8ff37..c6e7bdf 100644 --- a/themes/default/layouts/partials/meta-markdown.html +++ b/themes/default/layouts/partials/meta-markdown.html @@ -1,13 +1,8 @@ {{- if not .ExpiryDate -}} - {{- $author := partial "function-authors-data.html" . -}} - {{- $source := print $author.user "/messages/" .File.LogicalName -}} - {{- $href := print .Site.BaseURL "/" (partial "function-paths.html" "markdown") "/" $source -}} - {{- $title := $href -}} - - {{- with .Params.feed -}} - {{- $href = print $.Site.BaseURL "/" $.Params.feed.markdown -}} - {{- $title = $href -}} - {{- end -}} + {{- $relURL := strings.TrimPrefix .Page.Site.BaseURL .Page.Permalink -}} + {{- $source := print (path.Dir $relURL) ".md" -}} + {{- $href := print .Site.BaseURL "/" (partial "function-paths.html" "markdown") $source -}} + {{- $title := .File.LogicalName -}} <micro-metadata-source> <a href="{{ $href }}" title="{{ $title }}"> diff --git a/themes/default/layouts/partials/meta-permalink.html b/themes/default/layouts/partials/meta-permalink.html index e9950cf..6c3c05f 100644 --- a/themes/default/layouts/partials/meta-permalink.html +++ b/themes/default/layouts/partials/meta-permalink.html @@ -1,5 +1,7 @@ +{{- $href := print .Permalink "#" (partial "card-id.html" .) -}} + <micro-metadata-permalink> - <a title="#{{ partial "card-id.html" . }}" href="#{{ partial "card-id.html" . }}"> + <a title="#{{ partial "card-id.html" . }}" href="{{ $href }}"> {{- safeHTML (readFile (print (partial "function-paths.html" "static") "/icons/feather/link.svg")) -}} <span>permalink</span> {{- /* This comment removes trailing newlines and white spaces. */ -}} diff --git a/themes/default/layouts/partials/meta-view.html b/themes/default/layouts/partials/meta-view.html index 866cf82..6ec5d31 100644 --- a/themes/default/layouts/partials/meta-view.html +++ b/themes/default/layouts/partials/meta-view.html @@ -1,9 +1,4 @@ -{{- $author := partial "function-authors-data.html" . -}} -{{- $href := print .Site.BaseURL "/" $author.user "/messages/" (path.Base .Permalink) "/" -}} - -{{- with .Params.feed.self -}} - {{- $href = print $.Site.BaseURL "/" $.Params.feed.self -}} -{{- end -}} +{{- $href := print .Permalink -}} <micro-metadata-view> {{- /* This comment removes trailing newlines and white spaces. */ -}} |