From 7170eda1729b25b46bbcada3629d73b6abaa6d84 Mon Sep 17 00:00:00 2001 From: Aditya Telange <21258296+adityatelange@users.noreply.github.com> Date: Sat, 6 Feb 2021 23:50:19 +0530 Subject: [PATCH] translation list separate partial --- layouts/_default/search.html | 17 +---------------- layouts/_default/single.html | 20 ++------------------ layouts/partials/translation_list.html | 19 +++++++++++++++++++ 3 files changed, 22 insertions(+), 34 deletions(-) create mode 100644 layouts/partials/translation_list.html diff --git a/layouts/_default/search.html b/layouts/_default/search.html index 4d0c415c..8ad0bef4 100644 --- a/layouts/_default/search.html +++ b/layouts/_default/search.html @@ -15,22 +15,7 @@ {{- end }} {{- if not (.Param "hideMeta") }}
{{- end}} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 9716ad14..658d79cc 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -31,24 +31,8 @@ {{- end }} {{- if not (.Param "hideMeta") }} {{- end}} diff --git a/layouts/partials/translation_list.html b/layouts/partials/translation_list.html new file mode 100644 index 00000000..a2c2d86c --- /dev/null +++ b/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 }} +