Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/curttimson/hugo-theme-massively.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCurtis Timson <curt@live.co.uk>2018-04-17 15:14:02 +0300
committerGitHub <noreply@github.com>2018-04-17 15:14:02 +0300
commit9519926ab99b1dce508d95d97772f79c4d732f5e (patch)
tree027aeb8fc21b91b94484c9be44acf816860c12bf
parent07b3944a6f2d038b394c1682567883771daa2b4a (diff)
parent1782d2a7688464b276ff852c7b7f6bdffce2057d (diff)
Merge pull request #17 from pmviva/multilingual-supportv2.0.0
Multilingual support
-rw-r--r--exampleSite/config-prod.toml9
-rw-r--r--exampleSite/config.toml9
-rw-r--r--exampleSite/content/post/post.1.en.md (renamed from exampleSite/content/post/post.1.md)0
-rw-r--r--exampleSite/content/post/post.1.es.md7
-rw-r--r--exampleSite/content/post/post.2.en.md (renamed from exampleSite/content/post/post.2.md)0
-rw-r--r--exampleSite/content/post/post.2.es.md7
-rw-r--r--exampleSite/content/post/post.3.en.md (renamed from exampleSite/content/post/post.3.md)0
-rw-r--r--exampleSite/content/post/post.3.es.md7
-rw-r--r--exampleSite/content/post/post.4.en.md (renamed from exampleSite/content/post/post.4.md)0
-rw-r--r--exampleSite/content/post/post.4.es.md10
-rw-r--r--exampleSite/content/post/post.5.en.md (renamed from exampleSite/content/post/post.5.md)0
-rw-r--r--exampleSite/content/post/post.5.es.md7
-rw-r--r--exampleSite/content/post/post.6.en.md (renamed from exampleSite/content/post/post.6.md)0
-rw-r--r--exampleSite/content/post/post.6.es.md7
-rw-r--r--exampleSite/content/post/post.7.en.md (renamed from exampleSite/content/post/post.7.md)0
-rw-r--r--exampleSite/content/post/post.7.es.md7
-rw-r--r--exampleSite/content/post/post.8.en.md (renamed from exampleSite/content/post/post.8.md)0
-rw-r--r--exampleSite/content/post/post.8.es.md7
-rw-r--r--exampleSite/content/post/post.9.en.md (renamed from exampleSite/content/post/post.9.md)0
-rw-r--r--exampleSite/content/post/post.9.es.md8
-rw-r--r--exampleSite/content/post/post.en.md (renamed from exampleSite/content/post/post.md)0
-rw-r--r--exampleSite/content/post/post.es.md7
-rw-r--r--exampleSite/data/en/contactinfo.yaml (renamed from exampleSite/data/contactinfo.yaml)0
-rw-r--r--exampleSite/data/en/intro.yaml (renamed from exampleSite/data/intro.yaml)0
-rw-r--r--exampleSite/data/en/post.yaml (renamed from exampleSite/data/post.yaml)0
-rw-r--r--exampleSite/data/en/social.yaml (renamed from exampleSite/data/social.yaml)0
-rw-r--r--exampleSite/data/es/contactinfo.yaml9
-rw-r--r--exampleSite/data/es/intro.yaml7
-rw-r--r--exampleSite/data/es/post.yaml1
-rw-r--r--exampleSite/data/es/social.yaml9
-rw-r--r--i18n/en.toml28
-rw-r--r--i18n/es.toml28
-rw-r--r--layouts/_default/single.html4
-rw-r--r--layouts/index.html14
-rw-r--r--layouts/partials/copyright.html4
-rw-r--r--layouts/partials/footer/index.html29
-rw-r--r--layouts/partials/header.html2
-rw-r--r--layouts/partials/htmlhead.html6
-rw-r--r--layouts/partials/intro.html7
-rw-r--r--layouts/partials/nav.html14
-rw-r--r--layouts/partials/posts/featured.html5
-rw-r--r--layouts/partials/posts/list.html5
-rw-r--r--layouts/partials/posts/pagination.html6
-rw-r--r--layouts/partials/scripts/index.html12
-rw-r--r--package.json2
-rw-r--r--theme.toml2
46 files changed, 233 insertions, 53 deletions
diff --git a/exampleSite/config-prod.toml b/exampleSite/config-prod.toml
index 240e9a3..5e50c30 100644
--- a/exampleSite/config-prod.toml
+++ b/exampleSite/config-prod.toml
@@ -10,4 +10,11 @@ theme = "../.."
[params.settings]
googleanalytics = "UA-113904582-4"
- disqus = "hugo-massively" \ No newline at end of file
+ disqus = "hugo-massively"
+
+[languages]
+[languages.en]
+ languageName = "English"
+[languages.es]
+ languageName = "Español"
+ title = "Massively - Versión Español"
diff --git a/exampleSite/config.toml b/exampleSite/config.toml
index 9586ef1..b461dcf 100644
--- a/exampleSite/config.toml
+++ b/exampleSite/config.toml
@@ -10,4 +10,11 @@ theme = "../.."
[params.settings]
googleanalytics = "UA-113904582-3"
- disqus = "hugo-massively" \ No newline at end of file
+ disqus = "hugo-massively"
+
+[languages]
+[languages.en]
+ languageName = "English"
+[languages.es]
+ languageName = "Español"
+ title = "Massively - Versión Español"
diff --git a/exampleSite/content/post/post.1.md b/exampleSite/content/post/post.1.en.md
index 0a70435..0a70435 100644
--- a/exampleSite/content/post/post.1.md
+++ b/exampleSite/content/post/post.1.en.md
diff --git a/exampleSite/content/post/post.1.es.md b/exampleSite/content/post/post.1.es.md
new file mode 100644
index 0000000..99591e5
--- /dev/null
+++ b/exampleSite/content/post/post.1.es.md
@@ -0,0 +1,7 @@
++++
+title = 'Primis eget imperdiet lorem - Versión Español'
+slug = 'post1'
+image = 'images/pic03.jpg'
+date = "2017-04-22T00:00:00"
+description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
++++
diff --git a/exampleSite/content/post/post.2.md b/exampleSite/content/post/post.2.en.md
index a3c9972..a3c9972 100644
--- a/exampleSite/content/post/post.2.md
+++ b/exampleSite/content/post/post.2.en.md
diff --git a/exampleSite/content/post/post.2.es.md b/exampleSite/content/post/post.2.es.md
new file mode 100644
index 0000000..fda80b1
--- /dev/null
+++ b/exampleSite/content/post/post.2.es.md
@@ -0,0 +1,7 @@
++++
+title = 'Ante mattis interdum dolor - Versión Español'
+slug = 'post2'
+image = 'images/pic04.jpg'
+date = "2017-04-18T00:00:00"
+description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
++++
diff --git a/exampleSite/content/post/post.3.md b/exampleSite/content/post/post.3.en.md
index b38eda0..b38eda0 100644
--- a/exampleSite/content/post/post.3.md
+++ b/exampleSite/content/post/post.3.en.md
diff --git a/exampleSite/content/post/post.3.es.md b/exampleSite/content/post/post.3.es.md
new file mode 100644
index 0000000..9c3b9d0
--- /dev/null
+++ b/exampleSite/content/post/post.3.es.md
@@ -0,0 +1,7 @@
++++
+title = 'Augue lorem primis vestibulum - Versión Español'
+slug = 'post3'
+image = 'images/pic07.jpg'
+date = "2017-04-07T00:00:00"
+description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
++++
diff --git a/exampleSite/content/post/post.4.md b/exampleSite/content/post/post.4.en.md
index 61c90e8..61c90e8 100644
--- a/exampleSite/content/post/post.4.md
+++ b/exampleSite/content/post/post.4.en.md
diff --git a/exampleSite/content/post/post.4.es.md b/exampleSite/content/post/post.4.es.md
new file mode 100644
index 0000000..9f9b580
--- /dev/null
+++ b/exampleSite/content/post/post.4.es.md
@@ -0,0 +1,10 @@
++++
+title = 'Odio magna sed consectetur - Versión Español'
+slug = 'post4'
+image = 'images/pic06.jpg'
+date = "2017-04-11T00:00:00"
+description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
++++
+Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam sit amet dui nec dui commodo auctor non eu mauris. Duis varius finibus vestibulum. Praesent aliquam, erat sed dictum feugiat, velit erat iaculis elit, eget iaculis ex libero ac sapien. Sed maximus ut lectus et varius. Nullam posuere velit vitae est consectetur porttitor. Vestibulum tempor felis ante, nec volutpat risus vestibulum ac. Mauris at finibus felis, eu placerat arcu. Sed nec semper nunc. Proin eget mollis felis. Donec fermentum lectus non metus elementum, dignissim ornare felis congue. In rhoncus vehicula nibh, ac imperdiet dolor tincidunt sit amet.
+
+Nullam commodo, diam nec finibus ultrices, odio enim tempus risus, quis dapibus ex ligula non erat. In sed lectus id massa fermentum euismod fringilla vel ligula. Quisque tincidunt tortor non ante scelerisque convallis ut vitae nunc. Mauris id consectetur sapien, et vulputate turpis. Nulla et diam urna. Duis varius, metus sit amet mollis gravida, felis turpis sodales nulla, id dapibus lacus est ac felis. Cras porttitor orci sit amet lorem scelerisque laoreet. Sed non mi et velit bibendum efficitur ut et mauris. Curabitur sem nisl, condimentum suscipit magna sit amet, vehicula ultricies purus. Phasellus blandit ultrices ante, eget blandit turpis fringilla et. Nam commodo volutpat semper.
diff --git a/exampleSite/content/post/post.5.md b/exampleSite/content/post/post.5.en.md
index 0b64882..0b64882 100644
--- a/exampleSite/content/post/post.5.md
+++ b/exampleSite/content/post/post.5.en.md
diff --git a/exampleSite/content/post/post.5.es.md b/exampleSite/content/post/post.5.es.md
new file mode 100644
index 0000000..15cf9cd
--- /dev/null
+++ b/exampleSite/content/post/post.5.es.md
@@ -0,0 +1,7 @@
++++
+title = 'Tempus sed nulla imperdiet - Versión Español'
+slug = 'post5'
+image = 'images/pic05.jpg'
+date = "2017-04-14T00:00:00"
+description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
++++
diff --git a/exampleSite/content/post/post.6.md b/exampleSite/content/post/post.6.en.md
index 20847e5..20847e5 100644
--- a/exampleSite/content/post/post.6.md
+++ b/exampleSite/content/post/post.6.en.md
diff --git a/exampleSite/content/post/post.6.es.md b/exampleSite/content/post/post.6.es.md
new file mode 100644
index 0000000..e8b37f8
--- /dev/null
+++ b/exampleSite/content/post/post.6.es.md
@@ -0,0 +1,7 @@
++++
+title = 'Primis eget imperdiet lorem - Versión Español'
+slug = 'post6'
+image = 'images/pic03.jpg'
+date = "2017-03-22T00:00:00"
+description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
++++
diff --git a/exampleSite/content/post/post.7.md b/exampleSite/content/post/post.7.en.md
index 982860a..982860a 100644
--- a/exampleSite/content/post/post.7.md
+++ b/exampleSite/content/post/post.7.en.md
diff --git a/exampleSite/content/post/post.7.es.md b/exampleSite/content/post/post.7.es.md
new file mode 100644
index 0000000..05723d0
--- /dev/null
+++ b/exampleSite/content/post/post.7.es.md
@@ -0,0 +1,7 @@
++++
+title = 'Ante mattis interdum dolor - Versión Español'
+slug = 'post7'
+image = 'images/pic04.jpg'
+date = "2017-03-18T00:00:00"
+description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
++++
diff --git a/exampleSite/content/post/post.8.md b/exampleSite/content/post/post.8.en.md
index 06b1047..06b1047 100644
--- a/exampleSite/content/post/post.8.md
+++ b/exampleSite/content/post/post.8.en.md
diff --git a/exampleSite/content/post/post.8.es.md b/exampleSite/content/post/post.8.es.md
new file mode 100644
index 0000000..8783fe3
--- /dev/null
+++ b/exampleSite/content/post/post.8.es.md
@@ -0,0 +1,7 @@
++++
+title = 'Augue lorem primis vestibulum - Versión Español'
+slug = 'post8'
+image = 'images/pic07.jpg'
+date = "2017-03-07T00:00:00"
+description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
++++
diff --git a/exampleSite/content/post/post.9.md b/exampleSite/content/post/post.9.en.md
index 8397ee2..8397ee2 100644
--- a/exampleSite/content/post/post.9.md
+++ b/exampleSite/content/post/post.9.en.md
diff --git a/exampleSite/content/post/post.9.es.md b/exampleSite/content/post/post.9.es.md
new file mode 100644
index 0000000..f3811b4
--- /dev/null
+++ b/exampleSite/content/post/post.9.es.md
@@ -0,0 +1,8 @@
++++
+title = 'Comments example - Versión Español'
+slug = 'comments-example'
+image = 'images/pic04.jpg'
+date = "2018-02-20T00:00:00"
+description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
+disqusid = '9'
++++
diff --git a/exampleSite/content/post/post.md b/exampleSite/content/post/post.en.md
index 50647d8..50647d8 100644
--- a/exampleSite/content/post/post.md
+++ b/exampleSite/content/post/post.en.md
diff --git a/exampleSite/content/post/post.es.md b/exampleSite/content/post/post.es.md
new file mode 100644
index 0000000..ae0708e
--- /dev/null
+++ b/exampleSite/content/post/post.es.md
@@ -0,0 +1,7 @@
++++
+title = 'first post - Versión Español'
+slug = 'post'
+image = 'images/pic02.jpg'
+date = "2012-02-06T00:00:00"
+description = 'Donec eget ex magna. Interdum et malesuada fames ac ante ipsum primis in faucibus. Pellentesque venenatis dolor imperdiet dolor mattis sagittis magna etiam.'
++++
diff --git a/exampleSite/data/contactinfo.yaml b/exampleSite/data/en/contactinfo.yaml
index 9a492d9..9a492d9 100644
--- a/exampleSite/data/contactinfo.yaml
+++ b/exampleSite/data/en/contactinfo.yaml
diff --git a/exampleSite/data/intro.yaml b/exampleSite/data/en/intro.yaml
index 7b11ee4..7b11ee4 100644
--- a/exampleSite/data/intro.yaml
+++ b/exampleSite/data/en/intro.yaml
diff --git a/exampleSite/data/post.yaml b/exampleSite/data/en/post.yaml
index 18393d5..18393d5 100644
--- a/exampleSite/data/post.yaml
+++ b/exampleSite/data/en/post.yaml
diff --git a/exampleSite/data/social.yaml b/exampleSite/data/en/social.yaml
index 7d0bd7f..7d0bd7f 100644
--- a/exampleSite/data/social.yaml
+++ b/exampleSite/data/en/social.yaml
diff --git a/exampleSite/data/es/contactinfo.yaml b/exampleSite/data/es/contactinfo.yaml
new file mode 100644
index 0000000..9a492d9
--- /dev/null
+++ b/exampleSite/data/es/contactinfo.yaml
@@ -0,0 +1,9 @@
+contactformaction: 'post-action'
+
+address:
+- line: '1234 Somewhere Road #87257'
+- line: 'Nashville, TN 00000-0000'
+
+phone: '(800) 000-0000'
+
+email: 'someone@untitled.tld' \ No newline at end of file
diff --git a/exampleSite/data/es/intro.yaml b/exampleSite/data/es/intro.yaml
new file mode 100644
index 0000000..5d0742e
--- /dev/null
+++ b/exampleSite/data/es/intro.yaml
@@ -0,0 +1,7 @@
+title:
+- line: 'Esto es'
+- line: 'Massively'
+
+description:
+- line: 'Un template para sitios HTML5 + CSS3 gratuito y totalmente responsivo, diseñado por @ajlkn para HTML5 UP'
+- line: 'y publicado de forma gratuita bajo la licencia de Creative Commons.'
diff --git a/exampleSite/data/es/post.yaml b/exampleSite/data/es/post.yaml
new file mode 100644
index 0000000..792816d
--- /dev/null
+++ b/exampleSite/data/es/post.yaml
@@ -0,0 +1 @@
+linktext: 'Historia Completa'
diff --git a/exampleSite/data/es/social.yaml b/exampleSite/data/es/social.yaml
new file mode 100644
index 0000000..7d0bd7f
--- /dev/null
+++ b/exampleSite/data/es/social.yaml
@@ -0,0 +1,9 @@
+twitter: "https://twitter.com/"
+facebook: "https://facebook.com"
+instagram: "https://instagram.com"
+linkedin: "https://www.linkedin.com"
+github: "https://github.com/"
+youtube: "https://youtube.com/"
+googleplus: "https://plus.google.com/"
+lastfm: "https://last.fm/"
+flickr: "https://flickr.com/" \ No newline at end of file
diff --git a/i18n/en.toml b/i18n/en.toml
new file mode 100644
index 0000000..fbd9f5d
--- /dev/null
+++ b/i18n/en.toml
@@ -0,0 +1,28 @@
+[CONTACT_ADDRESS]
+ other = "Address"
+[CONTACT_EMAIL]
+ other = "Email"
+[CONTACT_FORM_FIELD_EMAIL]
+ other = "Email"
+[CONTACT_FORM_FIELD_MESSAGE]
+ other = "Message"
+[CONTACT_FORM_FIELD_NAME]
+ other = "Name"
+[CONTACT_FORM_SUBMIT_SEND_MESSAGE]
+ other = "Send A Message"
+[CONTACT_PHONE]
+ other = "Phone"
+[CONTACT_SOCIAL]
+ other = "Social"
+[COPYRIGHT_MESSAGE_1]
+ other = "Design: [HTML5 UP](https://html5up.net)"
+[COPYRIGHT_MESSAGE_2]
+ other = "Hugo Port: [curttimson](https://curtistimson.co.uk)"
+[INTRO_CONTINUE]
+ other = "Continue"
+[NAV_CONTACT]
+ other = "Contact"
+[PAGINATION_NEXT]
+ other = "Next"
+[PAGINATION_PREVIOUS]
+ other = "Prev"
diff --git a/i18n/es.toml b/i18n/es.toml
new file mode 100644
index 0000000..c10dffb
--- /dev/null
+++ b/i18n/es.toml
@@ -0,0 +1,28 @@
+[CONTACT_ADDRESS]
+ other = "Dirección"
+[CONTACT_EMAIL]
+ other = "Correo Electrónico"
+[CONTACT_FORM_FIELD_EMAIL]
+ other = "Correo Electrónico"
+[CONTACT_FORM_FIELD_MESSAGE]
+ other = "Mensaje"
+[CONTACT_FORM_FIELD_NAME]
+ other = "Nombre"
+[CONTACT_FORM_SUBMIT_SEND_MESSAGE]
+ other = "Enviar Un Mensaje"
+[CONTACT_PHONE]
+ other = "Teléfono"
+[CONTACT_SOCIAL]
+ other = "Social"
+[COPYRIGHT_MESSAGE_1]
+ other = "Diseño: [HTML5 UP](https://html5up.net)"
+[COPYRIGHT_MESSAGE_2]
+ other = "Implementacion Hugo: [curttimson](https://curtistimson.co.uk)"
+[INTRO_CONTINUE]
+ other = "Continuar"
+[NAV_CONTACT]
+ other = "Contacto"
+[PAGINATION_NEXT]
+ other = "Próximo"
+[PAGINATION_PREVIOUS]
+ other = "Previo"
diff --git a/layouts/_default/single.html b/layouts/_default/single.html
index 2499266..f1b3f27 100644
--- a/layouts/_default/single.html
+++ b/layouts/_default/single.html
@@ -1,5 +1,5 @@
{{ partial "htmlhead" . }}
- <body class="is-loading">
+ <body lang='{{ .Site.Language.Lang | default "en-us" }}' class="is-loading">
<!-- Wrapper -->
<div id="wrapper">
@@ -20,7 +20,7 @@
<p>{{ .Description }}</p>
</header>
{{ if .Params.image }}
- <div class="image main"><img src="{{ .Params.image | absURL }}" alt="" /></div>
+ <div class="image main"><img src="{{ .Params.image | relURL }}" alt="" /></div>
{{ end }}
{{ .Content }}
diff --git a/layouts/index.html b/layouts/index.html
index 9585426..237d062 100644
--- a/layouts/index.html
+++ b/layouts/index.html
@@ -1,11 +1,11 @@
{{ partial "htmlhead" . }}
- <body class="is-loading">
+ <body lang='{{ .Site.Language.Lang | default "en-us" }}' class="is-loading">
{{ $posts := where .Data.Pages "Type" .Site.Params.Posts.foldername }}
{{ $firstPost := first 1 $posts }}
- {{ if eq .Site.Params.Posts.featuredpost "true" }}
+ {{ if and (eq .Site.Params.Posts.featuredpost "true") (gt (len $posts) 1) }}
{{ .Scratch.Set "postsForPaging" (after 1 $posts) }}
{{ else }}
{{ .Scratch.Set "postsForPaging" $posts }}
@@ -28,24 +28,24 @@
<div id="main">
{{ if eq .Site.Params.Posts.featuredpost "true" }}
- {{ partial "posts/featured.html" (dict "firstpost" $firstPost) }}
+ {{ partial "posts/featured.html" (dict "firstpost" $firstPost "siteData" (index .Site.Data .Site.Language.Lang)) }}
{{ end }}
- {{ partial "posts/list.html" (dict "posts" $postsPaging) }}
+ {{ partial "posts/list.html" (dict "posts" $postsPaging "siteData" (index .Site.Data .Site.Language.Lang)) }}
<!-- Footer -->
{{ if gt $postsPaging.TotalPages 1 }}
<footer>
<div class="pagination">
{{ if $postsPaging.HasPrev }}
- <a href="{{ $postsPaging.Prev.URL | absURL }}" class="previous">Prev</a>
+ <a href="{{ $postsPaging.Prev.URL }}" class="previous"></a>
{{ end }}
{{ range $postsPaging.Pagers }}
{{ if lt .PageNumber 10 }}
- <a href="{{ .URL | absURL }}" class="page{{ if eq .PageNumber $postsPaging.PageNumber }} active{{ end }}">{{ .PageNumber }}</a>
+ <a href="{{ .URL }}" class="page{{ if eq .PageNumber $postsPaging.PageNumber }} active{{ end }}">{{ .PageNumber }}</a>
{{ end }}
{{ end }}
{{ if $postsPaging.HasNext }}
- <a href="{{ $postsPaging.Next.URL | absURL }}" class="next">Next</a>
+ <a href="{{ $postsPaging.Next.URL }}" class="next">{{ i18n "NEXT" . }}</a>
{{ end }}
</div>
</footer>
diff --git a/layouts/partials/copyright.html b/layouts/partials/copyright.html
index 03a85db..33cdc69 100644
--- a/layouts/partials/copyright.html
+++ b/layouts/partials/copyright.html
@@ -1,4 +1,4 @@
<!-- Copyright -->
<div id="copyright">
- <ul><li>&copy; {{ .Site.Title }}</li><li>Design: <a href="https://html5up.net">HTML5 UP</a></li><li>Hugo Port: <a href="https://curtistimson.co.uk">curttimson</a></li></ul>
-</div> \ No newline at end of file
+ <ul><li>&copy; {{ .Site.Title }}</li><li>{{ i18n "COPYRIGHT_MESSAGE_1" . | markdownify }}</li><li>{{ i18n "COPYRIGHT_MESSAGE_2" . | markdownify }}</li></ul>
+</div>
diff --git a/layouts/partials/footer/index.html b/layouts/partials/footer/index.html
index 692162d..52cbfa1 100644
--- a/layouts/partials/footer/index.html
+++ b/layouts/partials/footer/index.html
@@ -1,30 +1,31 @@
<!-- Footer -->
+{{ $data := index .Site.Data .Site.Language.Lang }}
<footer id="footer">
- {{ with .Site.Data.contactinfo.contactformaction }}
+ {{ with $data.contactinfo.contactformaction }}
<section>
<form method="post" action="{{ . }}">
<div class="field">
- <label for="name">Name</label>
+ <label for="name">{{ i18n "CONTACT_FORM_FIELD_NAME" . }}</label>
<input type="text" name="name" id="name" />
</div>
<div class="field">
- <label for="email">Email</label>
+ <label for="email">{{ i18n "CONTACT_FORM_FIELD_EMAIL" . }}</label>
<input type="text" name="email" id="email" />
</div>
<div class="field">
- <label for="message">Message</label>
+ <label for="message">{{ i18n "CONTACT_FORM_FIELD_MESSAGE" . }}</label>
<textarea name="message" id="message" rows="3"></textarea>
</div>
<ul class="actions">
- <li><input type="submit" value="Send Message" /></li>
+ <li><input type="submit" value='{{ i18n "CONTACT_FORM_SUBMIT_SEND_MESSAGE" . }}' /></li>
</ul>
</form>
</section>
{{ end }}
<section class="split contact">
- {{ with .Site.Data.contactinfo.address }}
+ {{ with $data.contactinfo.address }}
<section class="alt">
- <h3>Address</h3>
+ <h3>{{ i18n "CONTACT_ADDRESS" . }}</h3>
<p>
{{ range $i, $e := . }}
{{ if $i }} <br/> {{ end }} {{ .line }}
@@ -32,21 +33,21 @@
</p>
</section>
{{ end }}
- {{ with .Site.Data.contactinfo.phone }}
+ {{ with $data.contactinfo.phone }}
<section>
- <h3>Phone</h3>
+ <h3>{{ i18n "CONTACT_PHONE" . }}</h3>
<p><a href="tel:{{ . }}">{{ . }}</a></p>
</section>
{{ end }}
- {{ with .Site.Data.contactinfo.email }}
+ {{ with $data.contactinfo.email }}
<section>
- <h3>Email</h3>
+ <h3>{{ i18n "CONTACT_EMAIL" . }}</h3>
<p><a href="mailto:{{ . }}">{{ . }}</a></p>
</section>
{{ end }}
- {{ with .Site.Data.social }}
+ {{ with $data.social }}
<section>
- <h3>Social</h3>
+ <h3>{{ i18n "CONTACT_SOCIAL" . }}</h3>
<ul class="icons alt">
{{ with .twitter}}
<li><a href="{{ . }}" class="icon alt fa-twitter"><span class="label">Twitter</span></a></li>
@@ -79,4 +80,4 @@
</section>
{{ end }}
</section>
-</footer> \ No newline at end of file
+</footer>
diff --git a/layouts/partials/header.html b/layouts/partials/header.html
index 6933271..475dd94 100644
--- a/layouts/partials/header.html
+++ b/layouts/partials/header.html
@@ -1,4 +1,4 @@
<!-- Header -->
<header id="header">
- <a href='{{ "/" | absURL }}' class="logo">{{ .Site.Title }}</a>
+ <a href='{{ "/" | relLangURL }}' class="logo">{{ .Site.Title }}</a>
</header>
diff --git a/layouts/partials/htmlhead.html b/layouts/partials/htmlhead.html
index 1cc6df2..c8ae9d8 100644
--- a/layouts/partials/htmlhead.html
+++ b/layouts/partials/htmlhead.html
@@ -4,11 +4,11 @@
html5up.net | @ajlkn
Free for personal and commercial use under the CCA 3.0 license (html5up.net/license)
-->
-<html>
+<html lang='{{ .Site.Language.Lang | default "en-us" }}'>
<head>
<title>{{ if eq (.Site.Title) (.Title) }}{{ .Site.Title }}{{ else }}{{ .Title }} &middot; {{ .Site.Title }}{{ end }}</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
- <link rel="stylesheet" href='{{ "assets/css/main.css" | absURL }}' />
- <noscript><link rel="stylesheet" href='{{ "assets/css/noscript.css" | absURL }}' /></noscript>
+ <link rel="stylesheet" href='{{ "assets/css/main.css" | relURL }}' />
+ <noscript><link rel="stylesheet" href='{{ "assets/css/noscript.css" | relURL }}' /></noscript>
</head>
diff --git a/layouts/partials/intro.html b/layouts/partials/intro.html
index 35ef669..f22fa60 100644
--- a/layouts/partials/intro.html
+++ b/layouts/partials/intro.html
@@ -1,4 +1,5 @@
-{{ with .Site.Data.intro }}
+{{ $data := index .Site.Data .Site.Language.Lang }}
+{{ with $data.intro }}
<div id="intro">
<h1>
{{ range $i, $e := .title }}
@@ -11,7 +12,7 @@
{{ end }}
</p>
<ul class="actions">
- <li><a href="#header" class="button icon solo fa-arrow-down scrolly">Continue</a></li>
+ <li><a href="#header" class="button icon solo fa-arrow-down scrolly">{{ i18n "INTRO_CONTINUE" . }}</a></li>
</ul>
</div>
-{{ end }} \ No newline at end of file
+{{ end }}
diff --git a/layouts/partials/nav.html b/layouts/partials/nav.html
index 3e95003..1e127d0 100644
--- a/layouts/partials/nav.html
+++ b/layouts/partials/nav.html
@@ -1,12 +1,18 @@
<!-- Nav -->
+{{ $data := index .Site.Data .Site.Language.Lang }}
<nav id="nav">
<ul class="links">
- <li class="active"><a href='{{ "/" | absURL }}'>{{ .Site.Title }}</a></li>
- {{ with .Site.Data.contactinfo }}
- <li><a href='{{ "#footer" | absURL }}'>Contact</a></li>
+ <li class="active"><a href='{{ "/" | relLangURL }}'>{{ .Site.Title }}</a></li>
+ {{ with $data.contactinfo }}
+ <li><a href='{{ "#footer" | relLangURL }}'>{{ i18n "NAV_CONTACT" . }}</a></li>
+ {{ end }}
+ {{ if .IsTranslated }}
+ {{ range .AllTranslations }}
+ <li {{if eq ($.Site.Language) (.Language)}}class="active"{{end}}><a href='{{ .Permalink }}'>{{ .Language.LanguageName }}</a></li>
+ {{ end }}
{{ end }}
</ul>
- {{ with .Site.Data.social }}
+ {{ with $data.social }}
<ul class="icons">
{{ with .twitter }}
<li><a href="{{ . }}" class="icon fa-twitter"><span class="label">Twitter</span></a></li>
diff --git a/layouts/partials/posts/featured.html b/layouts/partials/posts/featured.html
index c14a398..53ad713 100644
--- a/layouts/partials/posts/featured.html
+++ b/layouts/partials/posts/featured.html
@@ -1,4 +1,5 @@
<!-- Featured Post -->
+{{ $data := .siteData }}
{{ range .firstpost }}
<article class="post featured">
<header class="major">
@@ -9,10 +10,10 @@
<p>{{ .Description }}</p>
</header>
{{ if .Params.image }}
- <a href="{{ .Permalink }}" class="image main"><img src="{{ .Params.image | absURL }}" alt="" /></a>
+ <a href="{{ .Permalink }}" class="image main"><img src="{{ .Params.image | relURL }}" alt="" /></a>
{{ end }}
<ul class="actions">
- <li><a href="{{ .Permalink }}" class="button big">{{ .Site.Data.post.linktext }}</a></li>
+ <li><a href="{{ .Permalink }}" class="button big">{{ $data.post.linktext }}</a></li>
</ul>
</article>
{{ end }}
diff --git a/layouts/partials/posts/list.html b/layouts/partials/posts/list.html
index 49a0745..9bdfebc 100644
--- a/layouts/partials/posts/list.html
+++ b/layouts/partials/posts/list.html
@@ -1,4 +1,5 @@
<!-- Posts -->
+{{ $data := .siteData }}
<section class="posts">
{{ range .posts.Pages }}
<article>
@@ -9,11 +10,11 @@
<h2><a href="{{ .Permalink }}">{{ .Title }}</a></h2>
</header>
{{ if .Params.image }}
- <a href="{{ .Permalink }}" class="image fit"><img src="{{ .Params.image | absURL }}" alt="" /></a>
+ <a href="{{ .Permalink }}" class="image fit"><img src="{{ .Params.image | relURL }}" alt="" /></a>
{{ end }}
<p>{{ .Description }}</p>
<ul class="actions">
- <li><a href="{{ .Permalink }}" class="button">{{ .Site.Data.post.linktext }}</a></li>
+ <li><a href="{{ .Permalink }}" class="button">{{ $data.post.linktext }}</a></li>
</ul>
</article>
{{ end }}
diff --git a/layouts/partials/posts/pagination.html b/layouts/partials/posts/pagination.html
index 559b068..e67a900 100644
--- a/layouts/partials/posts/pagination.html
+++ b/layouts/partials/posts/pagination.html
@@ -3,15 +3,15 @@
<footer>
<div class="pagination">
{{ if .paging.HasPrev }}
- <a href="{{ .paging.Prev.URL | absURL }}" class="previous">Prev</a>
+ <a href="{{ .paging.Prev.URL }}" class="previous">{{ i18n "PAGINATION_PREVIOUS" . }}</a>
{{ end }}
{{ range .paging.Pagers }}
{{ if lt .PageNumber 10 }}
- <a href="{{ .URL | absURL }}" class="page{{ if eq .PageNumber .paging.PageNumber }} active{{ end }}">{{ .PageNumber }}</a>
+ <a href="{{ .URL }}" class="page{{ if eq .PageNumber .paging.PageNumber }} active{{ end }}">{{ .PageNumber }}</a>
{{ end }}
{{ end }}
{{ if .paging.HasNext }}
- <a href="{{ .paging.Next.URL | absURL }}" class="next">Next</a>
+ <a href="{{ .paging.Next.URL }}" class="next">{{ i18n "PAGINATION_NEXT" . }}</a>
{{ end }}
</div>
</footer>
diff --git a/layouts/partials/scripts/index.html b/layouts/partials/scripts/index.html
index 2ef0ce0..92c8ed9 100644
--- a/layouts/partials/scripts/index.html
+++ b/layouts/partials/scripts/index.html
@@ -1,10 +1,10 @@
<!-- Scripts -->
-<script src='{{ "assets/js/jquery.min.js" | absURL }}'></script>
-<script src='{{ "assets/js/jquery.scrollex.min.js" | absURL }}'></script>
-<script src='{{ "assets/js/jquery.scrolly.min.js" | absURL }}'></script>
-<script src='{{ "assets/js/skel.min.js" | absURL }}'></script>
-<script src='{{ "assets/js/util.js" | absURL }}'></script>
-<script src='{{ "assets/js/main.js" | absURL }}'></script>
+<script src='{{ "assets/js/jquery.min.js" | relURL }}'></script>
+<script src='{{ "assets/js/jquery.scrollex.min.js" | relURL }}'></script>
+<script src='{{ "assets/js/jquery.scrolly.min.js" | relURL }}'></script>
+<script src='{{ "assets/js/skel.min.js" | relURL }}'></script>
+<script src='{{ "assets/js/util.js" | relURL }}'></script>
+<script src='{{ "assets/js/main.js" | relURL }}'></script>
{{ partial "scripts/googleanalytics" . }}
{{ partial "scripts/disqus" . }}
diff --git a/package.json b/package.json
index 8f3a480..593d0b6 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "hugo-theme-massively",
- "version": "1.0.1",
+ "version": "2.0.0",
"description": "HTML5 UP theme Massively for Hugo",
"main": "index.js",
"scripts": {
diff --git a/theme.toml b/theme.toml
index 29bdf4d..f422033 100644
--- a/theme.toml
+++ b/theme.toml
@@ -5,7 +5,7 @@ description = "An elegant open-source and mobile-first theme"
homepage = "https://html5up.net/uploads/demos/massively/index.html"
tags = ["blog", "html5up"]
features = ["blog"]
-min_version = 0.19
+min_version = 0.20
[author]
name = "Curtis Timson"