diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 65da63b..d2e9536 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -33,8 +33,8 @@ disqusShortname: does-not-exist # Enable global emoji support enableEmoji: true - # Custom parameters + params: # Copyright Notice copyright: © 2020 Copyright. diff --git a/exampleSite/data/en/author.yaml b/exampleSite/data/en/author.yaml new file mode 100644 index 0000000..36e4dcb --- /dev/null +++ b/exampleSite/data/en/author.yaml @@ -0,0 +1,16 @@ +# some information about you +name: "Jane Doe" +nickname: "Jane" +image: "images/avatar.png" +# give your some contact information. they will be used in the footer +contactInfo: + email: "janedoe@example.com" + phone: "+0123456789" + +# some summary about what you do +summary: + - I am a Developer + - I am a Devops + - I love servers + - I work on open-source projects + - I love to work with some fun projects" diff --git a/exampleSite/data/en/home.yaml b/exampleSite/data/en/home.yaml deleted file mode 100644 index d6edb58..0000000 --- a/exampleSite/data/en/home.yaml +++ /dev/null @@ -1,6 +0,0 @@ -summary: - - I am a Developer - - I am a Devops - - I love servers - - I work on open-source projects - - I love to work with some fun projects" \ No newline at end of file diff --git a/exampleSite/data/fr/author.yaml b/exampleSite/data/fr/author.yaml new file mode 100644 index 0000000..ec8beb5 --- /dev/null +++ b/exampleSite/data/fr/author.yaml @@ -0,0 +1,14 @@ +nickname: "Jane" +image: "images/avatar.png" +# give your some contact information. they will be used in the footer +contactInfo: + email: "janedoe@example.com" + phone: "+0123456789" + +# some summary about what you do +summary: + - Je suis un développeur + - Je suis un Devops + - J'aime les serveurs + - Je travaille sur des projets open-source + - J'aime travailler avec des projets amusants diff --git a/exampleSite/data/fr/home.yaml b/exampleSite/data/fr/home.yaml deleted file mode 100644 index 5c2b116..0000000 --- a/exampleSite/data/fr/home.yaml +++ /dev/null @@ -1,6 +0,0 @@ -summary: - - Je suis un développeur - - Je suis un Devops - - J'aime les serveurs - - Je travaille sur des projets open-source - - J'aime travailler avec des projets amusants \ No newline at end of file diff --git a/i18n/en.toml b/i18n/en.toml index 658fec3..5e42a76 100644 --- a/i18n/en.toml +++ b/i18n/en.toml @@ -1,5 +1,5 @@ # More documentation here: https://github.com/nicksnyder/go-i18n -[profile] +[greeting] other = "Hello, I am" [home] @@ -17,7 +17,7 @@ other = "Contact me:" [newsletter_text] other = "Stay up to date with email notification" -[newsletter_input] +[newsletter_input_placeholder] other = "Enter email" [newsletter_warning] diff --git a/i18n/fr.toml b/i18n/fr.toml index 7b6bb7a..04bedff 100644 --- a/i18n/fr.toml +++ b/i18n/fr.toml @@ -1,5 +1,5 @@ # More documentation here: https://github.com/nicksnyder/go-i18n -[profile] +[greeting] other = "Bonjour, je suis" [home] @@ -17,7 +17,7 @@ other = "Contactez moi :" [newsletter_text] other = "Restez à jour par e-mail" -[newsletter_input] +[newsletter_input_placeholder] other = "Entrez une adresse e-mail" [newsletter_warning] diff --git a/layouts/index.html b/layouts/index.html index 9afd9a3..74dd04e 100644 --- a/layouts/index.html +++ b/layouts/index.html @@ -29,28 +29,14 @@ {{- partial "sections/home.html" . -}} + {{ $sections:= .Site.Data.sections }} {{ if (index .Site.Data .Site.Language.Lang).sections }} + {{ $sections = (index .Site.Data .Site.Language.Lang).sections }} + {{ end }} + + {{ if $sections }} {{ $background:= "bg-white"}} - {{ range sort (index .Site.Data .Site.Language.Lang).sections "section.weight" }} - {{ if .section.enable }} -
- {{ if .section.template }} - {{- partial .section.template . -}} - {{ else }} - {{- partial (printf "sections/%s.html" (replace (lower .section.name) " " "-")) . -}} - {{ end }} -
- - {{ if eq $background "bg-white" }} - {{ $background = "bg-dimmed" }} - {{ else }} - {{ $background = "bg-white" }} - {{end}} - {{ end }} - {{ end }} - {{ else if .Site.Data.sections }} - {{ $background:= "bg-white"}} - {{ range sort .Site.Data.sections "section.weight" }} + {{ range sort $sections "section.weight" }} {{ if .section.enable }}
{{ if .section.template }} diff --git a/layouts/partials/cards/project.html b/layouts/partials/cards/project.html index a0f9add..052adeb 100644 --- a/layouts/partials/cards/project.html +++ b/layouts/partials/cards/project.html @@ -8,7 +8,7 @@
{{ if .logo }} - {{ .name }} + {{ .name }} {{ end }}
{{ .name }}
diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index 1745f6f..5d14a51 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -1,11 +1,21 @@ +{{ $author:= .Site.Data.author }} +{{ if (index .Site.Data .Site.Language.Lang).author }} + {{ $author = (index .Site.Data .Site.Language.Lang).author }} +{{ end }} + +{{ $sections:= .Site.Data.sections }} +{{ if (index .Site.Data .Site.Language.Lang).sections }} + {{ $sections = (index .Site.Data .Site.Language.Lang).sections }} +{{ end }} +