Ver código fonte

Add translation for blog

tags/v1.0.0
hawkeye116477 6 anos atrás
pai
commit
a5c5ba29d0
Nenhuma conta vinculada ao e-mail do autor do commit

+ 0
- 2
exampleSite/data/blog.yml Ver arquivo

@@ -1,6 +1,4 @@
enable : true
heading : Latest
headingSpan : Posts
sharing : true
staticmanComments:
enable: false

+ 2
- 0
exampleSite/data/en/blog.yml Ver arquivo

@@ -0,0 +1,2 @@
heading : Latest
headingSpan : Posts

+ 2
- 0
exampleSite/data/pl/blog.yml Ver arquivo

@@ -0,0 +1,2 @@
heading : Najnowsze
headingSpan : wpisy

+ 7
- 1
i18n/en.yaml Ver arquivo

@@ -27,4 +27,10 @@
- id: commentNotify
translation: Notify me of new comments on this post
- id: addComment
translation: Add comment
translation: Add comments
- id: readMore
translation: Read more
- id: viewAllPost
translation: View All Post
- id: share
translation: Share

+ 6
- 0
i18n/pl.yaml Ver arquivo

@@ -28,3 +28,9 @@
translation: Powiadom mnie o nowych komentarzach do tego wpisu
- id: addComment
translation: Dodaj komentarz
- id: readMore
translation: Czytaj więcej
- id: viewAllPost
translation: Wyświetl wszystkie wpisy
- id: share
translation: Podziel się

+ 1
- 1
layouts/_default/list.html Ver arquivo

@@ -18,7 +18,7 @@
<div class="content">
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
<p>{{ .Summary }}</p>
<a class="btn btn-transparent" href="{{ .Permalink }}">Read more</a>
<a class="btn btn-transparent" href="{{ .Permalink }}">{{ i18n "readMore" }}</a>
</div>
</div>
</article>

+ 5
- 4
layouts/partials/blog.html Ver arquivo

@@ -1,12 +1,13 @@
{{ if .Site.Data.blog.enable}}
{{"<!-- Start Blog Section -->" | safeHTML}}
{{ $data := index .Site.Data .Site.Language.Lang }}
<section id="blog" class="section">
<div class="container">
<div class="row">
<div class="col-lg-12">
{{"<!-- section title -->" | safeHTML}}
<div class="title text-center wow fadeInDown">
<h2> {{ with .Site.Data.blog.heading }} {{ . }} {{ end }} <span class="color"> {{ with .Site.Data.blog.headingSpan }} {{ . }} {{ end }} </span></h2>
<h2> {{ with $data.blog.heading }} {{ . }} {{ end }} <span class="color"> {{ with $data.blog.headingSpan }} {{ . }} {{ end }} </span></h2>
<div class="border-meghna"></div>
</div>
</div>
@@ -23,7 +24,7 @@
<div class="content">
<h3><a href="{{ .Permalink }}">{{ .Title }}</a></h3>
<p>{{ .Summary }}</p>
<a class="btn btn-transparent" href="{{ .Permalink }}">Read more</a>
<a class="btn btn-transparent" href="{{ .Permalink }}">{{ i18n "readMore" }}</a>
</div>
</div>
</article>
@@ -31,10 +32,10 @@
{{ end }}

<div class="all-post text-center col-lg-12">
<a class="btn btn-main" href="/blog">View All Post</a>
<a class="btn btn-main" href="/blog">{{ i18n "viewAllPost" }}</a>
</div>
</div>
</div>
</section>
{{"<!-- /blog -->" | safeHTML}}
{{ end }}
{{ end }}

+ 1
- 1
layouts/partials/share_post.html Ver arquivo

@@ -1,7 +1,7 @@
{{ $url := printf "%s" .Permalink | absLangURL }}
<!-- Sharingbutton Facebook -->
<div class="social-share pt-4">
<h4>Share:</h4>
<h4>{{ i18n "share" }}:</h4>
<!-- Sharingbutton Facebook -->
<a class="resp-sharing-button__link" href="https://facebook.com/sharer/sharer.php?u={{ $url }}" target="_blank" rel="noopener" aria-label="">
<div class="resp-sharing-button resp-sharing-button--facebook resp-sharing-button--small"><div aria-hidden="true" class="resp-sharing-button__icon resp-sharing-button__icon--solid">

Carregando…
Cancelar
Salvar