diff --git a/assets/icons/language.svg b/assets/icons/language.svg new file mode 100644 index 0000000..66ede1c --- /dev/null +++ b/assets/icons/language.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/assets/scss/partials/article.scss b/assets/scss/partials/article.scss index 459c22f..0d3efba 100644 --- a/assets/scss/partials/article.scss +++ b/assets/scss/partials/article.scss @@ -91,7 +91,8 @@ } } -.article-time { +.article-time, +.article-translations { display: flex; align-items: center; color: var(--card-text-color-tertiary); @@ -101,19 +102,21 @@ svg { vertical-align: middle; - margin-right: 15px; width: 20px; height: 20px; stroke-width: 1.33; } - time { + time, + a { font-size: 1.4rem; + color: var(--card-text-color-tertiary); } & > div { display: inline-flex; align-items: center; + gap: 15px; } } diff --git a/exampleSite/config.yaml b/exampleSite/config.yaml index 7ff0505..b2fe1d3 100644 --- a/exampleSite/config.yaml +++ b/exampleSite/config.yaml @@ -4,6 +4,16 @@ theme: hugo-theme-stack paginate: 5 title: Example Site +languages: + en: + languageName: English + title: Example Site + weight: 1 + cn: + languageName: 中文 + title: 演示站点 + weight: 2 + # Change it to your Disqus shortname before using disqusShortname: hugo-theme-stack diff --git a/exampleSite/content/page/about/index.cn.md b/exampleSite/content/page/about/index.cn.md new file mode 100644 index 0000000..060c006 --- /dev/null +++ b/exampleSite/content/page/about/index.cn.md @@ -0,0 +1,5 @@ +--- +title: 关于 +--- + +This is a test page for i18n support. \ No newline at end of file diff --git a/layouts/partials/article/components/details.html b/layouts/partials/article/components/details.html index 64d6c6e..2ec1241 100644 --- a/layouts/partials/article/components/details.html +++ b/layouts/partials/article/components/details.html @@ -42,4 +42,15 @@ {{ end }} {{ end }} + + {{ if .IsTranslated }} + + {{ end }} \ No newline at end of file