From 1f697a41b135d21c2431d209d3e47086bd6c815a Mon Sep 17 00:00:00 2001 From: Melkor333 Date: Wed, 28 Jul 2021 18:24:15 +0200 Subject: [PATCH 1/3] Allow multilang data --- layouts/index.html | 21 +++++++++++---------- layouts/partials/_avatar.html | 4 ++-- layouts/partials/_contacts.html | 4 ++-- layouts/partials/_diplomas.html | 4 ++-- layouts/partials/_education.html | 4 ++-- layouts/partials/_experience.html | 4 ++-- layouts/partials/_interests.html | 4 ++-- layouts/partials/_languages.html | 4 ++-- layouts/partials/_profile.html | 4 ++-- layouts/partials/_skills.html | 4 ++-- 10 files changed, 29 insertions(+), 28 deletions(-) diff --git a/layouts/index.html b/layouts/index.html index 5081ad6..8f8408a 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -4,21 +4,22 @@
-

{{.Site.Data.content.BasicInfo.FirstName}} {{.Site.Data.content.BasicInfo.LastName}}

+ {{ $data := or (index .Site.Data .Site.Language.Lang).content .Site.Data.content }} +

{{ $data.BasicInfo.FirstName}} {{ $data.BasicInfo.LastName}}

- {{ partial "_profile.html" . }} - {{ partial "_experience.html" . }} - {{ partial "_education.html" . }} + {{ partial "_profile.html" $data }} + {{ partial "_experience.html" $data }} + {{ partial "_education.html" $data }}
- {{ partial "_avatar.html" . }} - {{ partial "_contacts.html" . }} - {{ partial "_skills.html" . }} - {{ partial "_languages.html" . }} - {{ partial "_diplomas.html" . }} - {{ partial "_interests.html" . }} + {{ partial "_avatar.html" $data }} + {{ partial "_contacts.html" $data }} + {{ partial "_skills.html" $data }} + {{ partial "_languages.html" $data }} + {{ partial "_diplomas.html" $data }} + {{ partial "_interests.html" $data }}
diff --git a/layouts/partials/_avatar.html b/layouts/partials/_avatar.html index b903168..403d962 100644 --- a/layouts/partials/_avatar.html +++ b/layouts/partials/_avatar.html @@ -1,7 +1,7 @@ -{{ if .Site.Data.content.BasicInfo.Photo }} +{{ if .BasicInfo.Photo }}
- photo of me + photo of me
{{ end }} \ No newline at end of file diff --git a/layouts/partials/_contacts.html b/layouts/partials/_contacts.html index 8089052..57d1159 100644 --- a/layouts/partials/_contacts.html +++ b/layouts/partials/_contacts.html @@ -1,7 +1,7 @@ -{{ if .Site.Data.content.BasicInfo.Contacts }} +{{ if .BasicInfo.Contacts }}